@synsci/cli-darwin-x64-baseline 1.1.70 → 1.1.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/skills/citation-management/SKILL.md +1109 -0
- package/bin/skills/citation-management/assets/bibtex_template.bib +264 -0
- package/bin/skills/citation-management/assets/citation_checklist.md +386 -0
- package/bin/skills/citation-management/references/bibtex_formatting.md +908 -0
- package/bin/skills/citation-management/references/citation_validation.md +794 -0
- package/bin/skills/citation-management/references/google_scholar_search.md +725 -0
- package/bin/skills/citation-management/references/metadata_extraction.md +870 -0
- package/bin/skills/citation-management/references/pubmed_search.md +839 -0
- package/bin/skills/citation-management/scripts/doi_to_bibtex.py +182 -0
- package/bin/skills/citation-management/scripts/extract_metadata.py +570 -0
- package/bin/skills/citation-management/scripts/format_bibtex.py +349 -0
- package/bin/skills/citation-management/scripts/search_google_scholar.py +251 -0
- package/bin/skills/citation-management/scripts/search_pubmed.py +348 -0
- package/bin/skills/citation-management/scripts/validate_citations.py +494 -0
- package/bin/skills/clinical-decision-support/README.md +129 -0
- package/bin/skills/clinical-decision-support/SKILL.md +506 -0
- package/bin/skills/clinical-decision-support/assets/biomarker_report_template.tex +380 -0
- package/bin/skills/clinical-decision-support/assets/clinical_pathway_template.tex +222 -0
- package/bin/skills/clinical-decision-support/assets/cohort_analysis_template.tex +359 -0
- package/bin/skills/clinical-decision-support/assets/color_schemes.tex +149 -0
- package/bin/skills/clinical-decision-support/assets/example_gbm_cohort.md +208 -0
- package/bin/skills/clinical-decision-support/assets/recommendation_strength_guide.md +328 -0
- package/bin/skills/clinical-decision-support/assets/treatment_recommendation_template.tex +529 -0
- package/bin/skills/clinical-decision-support/references/biomarker_classification.md +719 -0
- package/bin/skills/clinical-decision-support/references/clinical_decision_algorithms.md +604 -0
- package/bin/skills/clinical-decision-support/references/evidence_synthesis.md +840 -0
- package/bin/skills/clinical-decision-support/references/outcome_analysis.md +640 -0
- package/bin/skills/clinical-decision-support/references/patient_cohort_analysis.md +427 -0
- package/bin/skills/clinical-decision-support/references/treatment_recommendations.md +521 -0
- package/bin/skills/clinical-decision-support/scripts/biomarker_classifier.py +383 -0
- package/bin/skills/clinical-decision-support/scripts/build_decision_tree.py +417 -0
- package/bin/skills/clinical-decision-support/scripts/create_cohort_tables.py +509 -0
- package/bin/skills/clinical-decision-support/scripts/generate_survival_analysis.py +441 -0
- package/bin/skills/clinical-decision-support/scripts/validate_cds_document.py +326 -0
- package/bin/skills/clinical-reports/IMPLEMENTATION_SUMMARY.md +641 -0
- package/bin/skills/clinical-reports/README.md +236 -0
- package/bin/skills/clinical-reports/SKILL.md +1127 -0
- package/bin/skills/clinical-reports/assets/case_report_template.md +352 -0
- package/bin/skills/clinical-reports/assets/clinical_trial_csr_template.md +353 -0
- package/bin/skills/clinical-reports/assets/clinical_trial_sae_template.md +359 -0
- package/bin/skills/clinical-reports/assets/consult_note_template.md +305 -0
- package/bin/skills/clinical-reports/assets/discharge_summary_template.md +453 -0
- package/bin/skills/clinical-reports/assets/hipaa_compliance_checklist.md +395 -0
- package/bin/skills/clinical-reports/assets/history_physical_template.md +305 -0
- package/bin/skills/clinical-reports/assets/lab_report_template.md +309 -0
- package/bin/skills/clinical-reports/assets/pathology_report_template.md +249 -0
- package/bin/skills/clinical-reports/assets/quality_checklist.md +338 -0
- package/bin/skills/clinical-reports/assets/radiology_report_template.md +318 -0
- package/bin/skills/clinical-reports/assets/soap_note_template.md +253 -0
- package/bin/skills/clinical-reports/references/case_report_guidelines.md +570 -0
- package/bin/skills/clinical-reports/references/clinical_trial_reporting.md +693 -0
- package/bin/skills/clinical-reports/references/data_presentation.md +530 -0
- package/bin/skills/clinical-reports/references/diagnostic_reports_standards.md +629 -0
- package/bin/skills/clinical-reports/references/medical_terminology.md +588 -0
- package/bin/skills/clinical-reports/references/patient_documentation.md +744 -0
- package/bin/skills/clinical-reports/references/peer_review_standards.md +585 -0
- package/bin/skills/clinical-reports/references/regulatory_compliance.md +577 -0
- package/bin/skills/clinical-reports/scripts/check_deidentification.py +332 -0
- package/bin/skills/clinical-reports/scripts/compliance_checker.py +78 -0
- package/bin/skills/clinical-reports/scripts/extract_clinical_data.py +97 -0
- package/bin/skills/clinical-reports/scripts/format_adverse_events.py +97 -0
- package/bin/skills/clinical-reports/scripts/generate_report_template.py +149 -0
- package/bin/skills/clinical-reports/scripts/terminology_validator.py +126 -0
- package/bin/skills/clinical-reports/scripts/validate_case_report.py +323 -0
- package/bin/skills/clinical-reports/scripts/validate_trial_report.py +88 -0
- package/bin/skills/fireworks-ai/SKILL.md +665 -0
- package/bin/skills/generate-image/SKILL.md +178 -0
- package/bin/skills/generate-image/scripts/generate_image.py +254 -0
- package/bin/skills/groq/SKILL.md +347 -0
- package/bin/skills/hypothesis-generation/SKILL.md +293 -0
- package/bin/skills/hypothesis-generation/assets/FORMATTING_GUIDE.md +672 -0
- package/bin/skills/hypothesis-generation/assets/hypothesis_generation.sty +307 -0
- package/bin/skills/hypothesis-generation/assets/hypothesis_report_template.tex +572 -0
- package/bin/skills/hypothesis-generation/references/experimental_design_patterns.md +329 -0
- package/bin/skills/hypothesis-generation/references/hypothesis_quality_criteria.md +198 -0
- package/bin/skills/hypothesis-generation/references/literature_search_strategies.md +622 -0
- package/bin/skills/latex-posters/README.md +417 -0
- package/bin/skills/latex-posters/SKILL.md +1602 -0
- package/bin/skills/latex-posters/assets/baposter_template.tex +257 -0
- package/bin/skills/latex-posters/assets/beamerposter_template.tex +244 -0
- package/bin/skills/latex-posters/assets/poster_quality_checklist.md +358 -0
- package/bin/skills/latex-posters/assets/tikzposter_template.tex +251 -0
- package/bin/skills/latex-posters/references/latex_poster_packages.md +745 -0
- package/bin/skills/latex-posters/references/poster_content_guide.md +748 -0
- package/bin/skills/latex-posters/references/poster_design_principles.md +806 -0
- package/bin/skills/latex-posters/references/poster_layout_design.md +900 -0
- package/bin/skills/latex-posters/scripts/review_poster.sh +214 -0
- package/bin/skills/literature-review/SKILL.md +641 -0
- package/bin/skills/literature-review/assets/review_template.md +412 -0
- package/bin/skills/literature-review/references/citation_styles.md +166 -0
- package/bin/skills/literature-review/references/database_strategies.md +455 -0
- package/bin/skills/literature-review/scripts/generate_pdf.py +184 -0
- package/bin/skills/literature-review/scripts/search_databases.py +310 -0
- package/bin/skills/literature-review/scripts/verify_citations.py +218 -0
- package/bin/skills/market-research-reports/SKILL.md +904 -0
- package/bin/skills/market-research-reports/assets/FORMATTING_GUIDE.md +428 -0
- package/bin/skills/market-research-reports/assets/market_report_template.tex +1380 -0
- package/bin/skills/market-research-reports/assets/market_research.sty +564 -0
- package/bin/skills/market-research-reports/references/data_analysis_patterns.md +548 -0
- package/bin/skills/market-research-reports/references/report_structure_guide.md +999 -0
- package/bin/skills/market-research-reports/references/visual_generation_guide.md +1077 -0
- package/bin/skills/market-research-reports/scripts/generate_market_visuals.py +472 -0
- package/bin/skills/markitdown/INSTALLATION_GUIDE.md +318 -0
- package/bin/skills/markitdown/LICENSE.txt +22 -0
- package/bin/skills/markitdown/OPENROUTER_INTEGRATION.md +359 -0
- package/bin/skills/markitdown/QUICK_REFERENCE.md +309 -0
- package/bin/skills/markitdown/README.md +184 -0
- package/bin/skills/markitdown/SKILL.md +486 -0
- package/bin/skills/markitdown/SKILL_SUMMARY.md +307 -0
- package/bin/skills/markitdown/assets/example_usage.md +463 -0
- package/bin/skills/markitdown/references/api_reference.md +399 -0
- package/bin/skills/markitdown/references/file_formats.md +542 -0
- package/bin/skills/markitdown/scripts/batch_convert.py +195 -0
- package/bin/skills/markitdown/scripts/convert_literature.py +262 -0
- package/bin/skills/markitdown/scripts/convert_with_ai.py +224 -0
- package/bin/skills/ml-paper-writing/SKILL.md +937 -0
- package/bin/skills/ml-paper-writing/references/checklists.md +361 -0
- package/bin/skills/ml-paper-writing/references/citation-workflow.md +562 -0
- package/bin/skills/ml-paper-writing/references/reviewer-guidelines.md +367 -0
- package/bin/skills/ml-paper-writing/references/sources.md +159 -0
- package/bin/skills/ml-paper-writing/references/writing-guide.md +476 -0
- package/bin/skills/ml-paper-writing/templates/README.md +251 -0
- package/bin/skills/ml-paper-writing/templates/aaai2026/README.md +534 -0
- package/bin/skills/ml-paper-writing/templates/aaai2026/aaai2026-unified-supp.tex +144 -0
- package/bin/skills/ml-paper-writing/templates/aaai2026/aaai2026-unified-template.tex +952 -0
- package/bin/skills/ml-paper-writing/templates/aaai2026/aaai2026.bib +111 -0
- package/bin/skills/ml-paper-writing/templates/aaai2026/aaai2026.bst +1493 -0
- package/bin/skills/ml-paper-writing/templates/aaai2026/aaai2026.sty +315 -0
- package/bin/skills/ml-paper-writing/templates/acl/README.md +50 -0
- package/bin/skills/ml-paper-writing/templates/acl/acl.sty +312 -0
- package/bin/skills/ml-paper-writing/templates/acl/acl_latex.tex +377 -0
- package/bin/skills/ml-paper-writing/templates/acl/acl_lualatex.tex +101 -0
- package/bin/skills/ml-paper-writing/templates/acl/acl_natbib.bst +1940 -0
- package/bin/skills/ml-paper-writing/templates/acl/anthology.bib.txt +26 -0
- package/bin/skills/ml-paper-writing/templates/acl/custom.bib +70 -0
- package/bin/skills/ml-paper-writing/templates/acl/formatting.md +326 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/README.md +3 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/colm2025_conference.bib +11 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/colm2025_conference.bst +1440 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/colm2025_conference.pdf +0 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/colm2025_conference.sty +218 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/colm2025_conference.tex +305 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/fancyhdr.sty +485 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/math_commands.tex +508 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/natbib.sty +1246 -0
- package/bin/skills/ml-paper-writing/templates/iclr2026/fancyhdr.sty +485 -0
- package/bin/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.bib +24 -0
- package/bin/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.bst +1440 -0
- package/bin/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.pdf +0 -0
- package/bin/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.sty +246 -0
- package/bin/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.tex +414 -0
- package/bin/skills/ml-paper-writing/templates/iclr2026/math_commands.tex +508 -0
- package/bin/skills/ml-paper-writing/templates/iclr2026/natbib.sty +1246 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/algorithm.sty +79 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/algorithmic.sty +201 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/example_paper.bib +75 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/example_paper.pdf +0 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/example_paper.tex +662 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/fancyhdr.sty +864 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/icml2026.bst +1443 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/icml2026.sty +767 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/icml_numpapers.pdf +0 -0
- package/bin/skills/ml-paper-writing/templates/neurips2025/Makefile +36 -0
- package/bin/skills/ml-paper-writing/templates/neurips2025/extra_pkgs.tex +53 -0
- package/bin/skills/ml-paper-writing/templates/neurips2025/main.tex +38 -0
- package/bin/skills/ml-paper-writing/templates/neurips2025/neurips.sty +382 -0
- package/bin/skills/paper-2-web/SKILL.md +491 -0
- package/bin/skills/paper-2-web/references/installation.md +141 -0
- package/bin/skills/paper-2-web/references/paper2poster.md +346 -0
- package/bin/skills/paper-2-web/references/paper2video.md +305 -0
- package/bin/skills/paper-2-web/references/paper2web.md +187 -0
- package/bin/skills/paper-2-web/references/usage_examples.md +436 -0
- package/bin/skills/peer-review/SKILL.md +702 -0
- package/bin/skills/peer-review/references/calibration_guidelines.md +196 -0
- package/bin/skills/peer-review/references/common_issues.md +552 -0
- package/bin/skills/peer-review/references/paper_mechanics.md +269 -0
- package/bin/skills/peer-review/references/reporting_standards.md +290 -0
- package/bin/skills/peer-review/references/scoring_rubric.md +239 -0
- package/bin/skills/pptx-posters/SKILL.md +410 -0
- package/bin/skills/pptx-posters/assets/poster_html_template.html +257 -0
- package/bin/skills/pptx-posters/assets/poster_quality_checklist.md +358 -0
- package/bin/skills/pptx-posters/references/poster_content_guide.md +748 -0
- package/bin/skills/pptx-posters/references/poster_design_principles.md +806 -0
- package/bin/skills/pptx-posters/references/poster_layout_design.md +900 -0
- package/bin/skills/research-grants/README.md +285 -0
- package/bin/skills/research-grants/SKILL.md +938 -0
- package/bin/skills/research-grants/assets/budget_justification_template.md +453 -0
- package/bin/skills/research-grants/assets/nih_specific_aims_template.md +166 -0
- package/bin/skills/research-grants/assets/nsf_project_summary_template.md +92 -0
- package/bin/skills/research-grants/references/broader_impacts.md +392 -0
- package/bin/skills/research-grants/references/darpa_guidelines.md +636 -0
- package/bin/skills/research-grants/references/doe_guidelines.md +586 -0
- package/bin/skills/research-grants/references/nih_guidelines.md +851 -0
- package/bin/skills/research-grants/references/nsf_guidelines.md +570 -0
- package/bin/skills/research-grants/references/specific_aims_guide.md +458 -0
- package/bin/skills/research-lookup/README.md +156 -0
- package/bin/skills/research-lookup/SKILL.md +606 -0
- package/bin/skills/research-lookup/examples.py +174 -0
- package/bin/skills/research-lookup/lookup.py +187 -0
- package/bin/skills/research-lookup/research_lookup.py +483 -0
- package/bin/skills/research-lookup/scripts/research_lookup.py +483 -0
- package/bin/skills/scholar-evaluation/SKILL.md +289 -0
- package/bin/skills/scholar-evaluation/references/evaluation_framework.md +663 -0
- package/bin/skills/scholar-evaluation/scripts/calculate_scores.py +366 -0
- package/bin/skills/scientific-critical-thinking/SKILL.md +566 -0
- package/bin/skills/scientific-critical-thinking/references/common_biases.md +364 -0
- package/bin/skills/scientific-critical-thinking/references/evidence_hierarchy.md +484 -0
- package/bin/skills/scientific-critical-thinking/references/experimental_design.md +496 -0
- package/bin/skills/scientific-critical-thinking/references/logical_fallacies.md +478 -0
- package/bin/skills/scientific-critical-thinking/references/scientific_method.md +169 -0
- package/bin/skills/scientific-critical-thinking/references/statistical_pitfalls.md +506 -0
- package/bin/skills/scientific-schematics/QUICK_REFERENCE.md +207 -0
- package/bin/skills/scientific-schematics/README.md +327 -0
- package/bin/skills/scientific-schematics/SKILL.md +615 -0
- package/bin/skills/scientific-schematics/example_usage.sh +89 -0
- package/bin/skills/scientific-schematics/references/best_practices.md +559 -0
- package/bin/skills/scientific-schematics/scripts/generate_schematic.py +135 -0
- package/bin/skills/scientific-schematics/scripts/generate_schematic_ai.py +807 -0
- package/bin/skills/scientific-schematics/test_ai_generation.py +243 -0
- package/bin/skills/scientific-slides/SKILL.md +942 -0
- package/bin/skills/scientific-slides/assets/timing_guidelines.md +597 -0
- package/bin/skills/scientific-slides/references/data_visualization_slides.md +708 -0
- package/bin/skills/scientific-slides/references/presentation_structure.md +642 -0
- package/bin/skills/scientific-slides/references/slide_design_principles.md +849 -0
- package/bin/skills/scientific-slides/references/talk_types_guide.md +687 -0
- package/bin/skills/scientific-slides/references/visual_review_workflow.md +775 -0
- package/bin/skills/scientific-slides/scripts/generate_slide_image.py +143 -0
- package/bin/skills/scientific-slides/scripts/generate_slide_image_ai.py +748 -0
- package/bin/skills/scientific-slides/scripts/pdf_to_images.py +201 -0
- package/bin/skills/scientific-slides/scripts/slides_to_pdf.py +220 -0
- package/bin/skills/scientific-slides/scripts/validate_presentation.py +367 -0
- package/bin/skills/scientific-writing/SKILL.md +714 -0
- package/bin/skills/scientific-writing/assets/REPORT_FORMATTING_GUIDE.md +574 -0
- package/bin/skills/scientific-writing/assets/scientific_report.sty +606 -0
- package/bin/skills/scientific-writing/assets/scientific_report_template.tex +449 -0
- package/bin/skills/scientific-writing/references/citation_styles.md +720 -0
- package/bin/skills/scientific-writing/references/figures_tables.md +806 -0
- package/bin/skills/scientific-writing/references/imrad_structure.md +686 -0
- package/bin/skills/scientific-writing/references/professional_report_formatting.md +664 -0
- package/bin/skills/scientific-writing/references/reporting_guidelines.md +748 -0
- package/bin/skills/scientific-writing/references/writing_principles.md +824 -0
- package/bin/skills/tinker/SKILL.md +2 -3
- package/bin/skills/together-ai/SKILL.md +722 -0
- package/bin/skills/treatment-plans/README.md +488 -0
- package/bin/skills/treatment-plans/SKILL.md +1579 -0
- package/bin/skills/treatment-plans/assets/STYLING_QUICK_REFERENCE.md +185 -0
- package/bin/skills/treatment-plans/assets/chronic_disease_management_plan.tex +665 -0
- package/bin/skills/treatment-plans/assets/general_medical_treatment_plan.tex +547 -0
- package/bin/skills/treatment-plans/assets/medical_treatment_plan.sty +222 -0
- package/bin/skills/treatment-plans/assets/mental_health_treatment_plan.tex +774 -0
- package/bin/skills/treatment-plans/assets/one_page_treatment_plan.tex +193 -0
- package/bin/skills/treatment-plans/assets/pain_management_plan.tex +799 -0
- package/bin/skills/treatment-plans/assets/perioperative_care_plan.tex +753 -0
- package/bin/skills/treatment-plans/assets/quality_checklist.md +471 -0
- package/bin/skills/treatment-plans/assets/rehabilitation_treatment_plan.tex +756 -0
- package/bin/skills/treatment-plans/references/goal_setting_frameworks.md +411 -0
- package/bin/skills/treatment-plans/references/intervention_guidelines.md +507 -0
- package/bin/skills/treatment-plans/references/regulatory_compliance.md +476 -0
- package/bin/skills/treatment-plans/references/specialty_specific_guidelines.md +655 -0
- package/bin/skills/treatment-plans/references/treatment_plan_standards.md +485 -0
- package/bin/skills/treatment-plans/scripts/check_completeness.py +322 -0
- package/bin/skills/treatment-plans/scripts/generate_template.py +233 -0
- package/bin/skills/treatment-plans/scripts/timeline_generator.py +385 -0
- package/bin/skills/treatment-plans/scripts/validate_treatment_plan.py +369 -0
- package/bin/skills/unsloth/SKILL.md +565 -47
- package/bin/skills/unsloth/docs/advanced-rl.md +222 -0
- package/bin/skills/unsloth/docs/chat-templates.md +141 -0
- package/bin/skills/unsloth/docs/datasets.md +489 -0
- package/bin/skills/unsloth/docs/docker-extended.md +99 -0
- package/bin/skills/unsloth/docs/dynamic-ggufs-2.0.md +116 -0
- package/bin/skills/unsloth/docs/dynamic-ggufs-aider.md +118 -0
- package/bin/skills/unsloth/docs/faq.md +91 -0
- package/bin/skills/unsloth/docs/fp16-vs-bf16.md +61 -0
- package/bin/skills/unsloth/docs/fp8-rl.md +224 -0
- package/bin/skills/unsloth/docs/glm-4.7-flash.md +997 -0
- package/bin/skills/unsloth/docs/inference-deployment-overview.md +17 -0
- package/bin/skills/unsloth/docs/inference.md +27 -0
- package/bin/skills/unsloth/docs/installation-docker.md +155 -0
- package/bin/skills/unsloth/docs/installation-pip.md +148 -0
- package/bin/skills/unsloth/docs/kernels-packing.md +190 -0
- package/bin/skills/unsloth/docs/kimi-k2.5.md +634 -0
- package/bin/skills/unsloth/docs/lm-studio.md +235 -0
- package/bin/skills/unsloth/docs/lora-hot-swapping.md +75 -0
- package/bin/skills/unsloth/docs/lora-hyperparameters.md +363 -0
- package/bin/skills/unsloth/docs/memory-efficient-rl.md +267 -0
- package/bin/skills/unsloth/docs/model-selection.md +70 -0
- package/bin/skills/unsloth/docs/models.md +532 -0
- package/bin/skills/unsloth/docs/multi-gpu-ddp.md +90 -0
- package/bin/skills/unsloth/docs/notebooks.md +223 -0
- package/bin/skills/unsloth/docs/overview.md +110 -0
- package/bin/skills/unsloth/docs/qwen3-coder-next-extended.md +900 -0
- package/bin/skills/unsloth/docs/qwen3-coder-next.md +900 -0
- package/bin/skills/unsloth/docs/requirements.md +45 -0
- package/bin/skills/unsloth/docs/reward-hacking.md +25 -0
- package/bin/skills/unsloth/docs/saving-to-gguf.md +138 -0
- package/bin/skills/unsloth/docs/saving-to-ollama.md +46 -0
- package/bin/skills/unsloth/docs/sglang-guide.md +278 -0
- package/bin/skills/unsloth/docs/speculative-decoding.md +70 -0
- package/bin/skills/unsloth/docs/tool-calling.md +334 -0
- package/bin/skills/unsloth/docs/troubleshooting-faq.md +204 -0
- package/bin/skills/unsloth/docs/troubleshooting-inference.md +26 -0
- package/bin/skills/unsloth/docs/tts-fine-tuning.md +149 -0
- package/bin/skills/unsloth/docs/tutorial-grpo.md +273 -0
- package/bin/skills/unsloth/docs/tutorial-llama3-ollama.md +356 -0
- package/bin/skills/unsloth/docs/vision-fine-tuning.md +135 -0
- package/bin/skills/unsloth/docs/vision-rl.md +170 -0
- package/bin/skills/unsloth/docs/vllm-engine-arguments.md +43 -0
- package/bin/skills/unsloth/docs/vllm-guide.md +98 -0
- package/bin/skills/venue-templates/SKILL.md +686 -0
- package/bin/skills/venue-templates/assets/examples/cell_summary_example.md +247 -0
- package/bin/skills/venue-templates/assets/examples/medical_structured_abstract.md +313 -0
- package/bin/skills/venue-templates/assets/examples/nature_abstract_examples.md +213 -0
- package/bin/skills/venue-templates/assets/examples/neurips_introduction_example.md +245 -0
- package/bin/skills/venue-templates/assets/grants/nih_specific_aims.tex +235 -0
- package/bin/skills/venue-templates/assets/grants/nsf_proposal_template.tex +375 -0
- package/bin/skills/venue-templates/assets/journals/nature_article.tex +171 -0
- package/bin/skills/venue-templates/assets/journals/neurips_article.tex +283 -0
- package/bin/skills/venue-templates/assets/journals/plos_one.tex +317 -0
- package/bin/skills/venue-templates/assets/posters/beamerposter_academic.tex +311 -0
- package/bin/skills/venue-templates/references/cell_press_style.md +483 -0
- package/bin/skills/venue-templates/references/conferences_formatting.md +564 -0
- package/bin/skills/venue-templates/references/cs_conference_style.md +463 -0
- package/bin/skills/venue-templates/references/grants_requirements.md +787 -0
- package/bin/skills/venue-templates/references/journals_formatting.md +486 -0
- package/bin/skills/venue-templates/references/medical_journal_styles.md +535 -0
- package/bin/skills/venue-templates/references/ml_conference_style.md +556 -0
- package/bin/skills/venue-templates/references/nature_science_style.md +405 -0
- package/bin/skills/venue-templates/references/posters_guidelines.md +628 -0
- package/bin/skills/venue-templates/references/reviewer_expectations.md +417 -0
- package/bin/skills/venue-templates/references/venue_writing_styles.md +321 -0
- package/bin/skills/venue-templates/scripts/customize_template.py +195 -0
- package/bin/skills/venue-templates/scripts/query_template.py +266 -0
- package/bin/skills/venue-templates/scripts/validate_format.py +250 -0
- package/bin/synsc +0 -0
- package/package.json +1 -1
- package/bin/skills/unsloth/references/index.md +0 -7
- package/bin/skills/unsloth/references/llms-full.md +0 -16799
- package/bin/skills/unsloth/references/llms-txt.md +0 -12044
- package/bin/skills/unsloth/references/llms.md +0 -82
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Convert scientific literature PDFs to Markdown for analysis and review.
|
|
4
|
+
|
|
5
|
+
This script is specifically designed for converting academic papers,
|
|
6
|
+
organizing them, and preparing them for literature review workflows.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import argparse
|
|
10
|
+
import json
|
|
11
|
+
import re
|
|
12
|
+
import sys
|
|
13
|
+
from datetime import datetime
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
from typing import Dict, List
|
|
16
|
+
|
|
17
|
+
from markitdown import MarkItDown
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def extract_metadata_from_filename(filename: str) -> Dict[str, str]:
|
|
21
|
+
"""
|
|
22
|
+
Try to extract metadata from filename.
|
|
23
|
+
Supports patterns like: Author_Year_Title.pdf
|
|
24
|
+
"""
|
|
25
|
+
metadata = {}
|
|
26
|
+
|
|
27
|
+
# Remove extension
|
|
28
|
+
name = Path(filename).stem
|
|
29
|
+
|
|
30
|
+
# Try to extract year
|
|
31
|
+
year_match = re.search(r'\b(19|20)\d{2}\b', name)
|
|
32
|
+
if year_match:
|
|
33
|
+
metadata['year'] = year_match.group()
|
|
34
|
+
|
|
35
|
+
# Split by underscores or dashes
|
|
36
|
+
parts = re.split(r'[_\-]', name)
|
|
37
|
+
if len(parts) >= 2:
|
|
38
|
+
metadata['author'] = parts[0].replace('_', ' ')
|
|
39
|
+
metadata['title'] = ' '.join(parts[1:]).replace('_', ' ')
|
|
40
|
+
else:
|
|
41
|
+
metadata['title'] = name.replace('_', ' ')
|
|
42
|
+
|
|
43
|
+
return metadata
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def convert_paper(
|
|
47
|
+
md: MarkItDown, input_file: Path, output_dir: Path, organize_by_year: bool = False
|
|
48
|
+
) -> tuple[bool, Dict]:
|
|
49
|
+
"""
|
|
50
|
+
Convert a single paper to Markdown with metadata extraction.
|
|
51
|
+
|
|
52
|
+
Args:
|
|
53
|
+
md: MarkItDown instance
|
|
54
|
+
input_file: Path to PDF file
|
|
55
|
+
output_dir: Output directory
|
|
56
|
+
organize_by_year: Organize into year subdirectories
|
|
57
|
+
|
|
58
|
+
Returns:
|
|
59
|
+
Tuple of (success, metadata_dict)
|
|
60
|
+
"""
|
|
61
|
+
try:
|
|
62
|
+
print(f"Converting: {input_file.name}")
|
|
63
|
+
|
|
64
|
+
# Convert to Markdown
|
|
65
|
+
result = md.convert(str(input_file))
|
|
66
|
+
|
|
67
|
+
# Extract metadata from filename
|
|
68
|
+
metadata = extract_metadata_from_filename(input_file.name)
|
|
69
|
+
metadata['source_file'] = input_file.name
|
|
70
|
+
metadata['converted_date'] = datetime.now().isoformat()
|
|
71
|
+
|
|
72
|
+
# Try to extract title from content if not in filename
|
|
73
|
+
if 'title' not in metadata and result.title:
|
|
74
|
+
metadata['title'] = result.title
|
|
75
|
+
|
|
76
|
+
# Create output path
|
|
77
|
+
if organize_by_year and 'year' in metadata:
|
|
78
|
+
output_subdir = output_dir / metadata['year']
|
|
79
|
+
output_subdir.mkdir(parents=True, exist_ok=True)
|
|
80
|
+
else:
|
|
81
|
+
output_subdir = output_dir
|
|
82
|
+
output_subdir.mkdir(parents=True, exist_ok=True)
|
|
83
|
+
|
|
84
|
+
output_file = output_subdir / f"{input_file.stem}.md"
|
|
85
|
+
|
|
86
|
+
# Create formatted Markdown with front matter
|
|
87
|
+
content = "---\n"
|
|
88
|
+
content += f"title: \"{metadata.get('title', input_file.stem)}\"\n"
|
|
89
|
+
if 'author' in metadata:
|
|
90
|
+
content += f"author: \"{metadata['author']}\"\n"
|
|
91
|
+
if 'year' in metadata:
|
|
92
|
+
content += f"year: {metadata['year']}\n"
|
|
93
|
+
content += f"source: \"{metadata['source_file']}\"\n"
|
|
94
|
+
content += f"converted: \"{metadata['converted_date']}\"\n"
|
|
95
|
+
content += "---\n\n"
|
|
96
|
+
|
|
97
|
+
# Add title
|
|
98
|
+
content += f"# {metadata.get('title', input_file.stem)}\n\n"
|
|
99
|
+
|
|
100
|
+
# Add metadata section
|
|
101
|
+
content += "## Document Information\n\n"
|
|
102
|
+
if 'author' in metadata:
|
|
103
|
+
content += f"**Author**: {metadata['author']}\n"
|
|
104
|
+
if 'year' in metadata:
|
|
105
|
+
content += f"**Year**: {metadata['year']}\n"
|
|
106
|
+
content += f"**Source File**: {metadata['source_file']}\n"
|
|
107
|
+
content += f"**Converted**: {metadata['converted_date']}\n\n"
|
|
108
|
+
content += "---\n\n"
|
|
109
|
+
|
|
110
|
+
# Add content
|
|
111
|
+
content += result.text_content
|
|
112
|
+
|
|
113
|
+
# Write to file
|
|
114
|
+
output_file.write_text(content, encoding='utf-8')
|
|
115
|
+
|
|
116
|
+
print(f"✓ Saved to: {output_file}")
|
|
117
|
+
|
|
118
|
+
return True, metadata
|
|
119
|
+
|
|
120
|
+
except Exception as e:
|
|
121
|
+
print(f"✗ Error converting {input_file.name}: {str(e)}")
|
|
122
|
+
return False, {'source_file': input_file.name, 'error': str(e)}
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def create_index(papers: List[Dict], output_dir: Path):
|
|
126
|
+
"""Create an index/catalog of all converted papers."""
|
|
127
|
+
|
|
128
|
+
# Sort by year (if available) and title
|
|
129
|
+
papers_sorted = sorted(papers, key=lambda x: (x.get('year', '9999'), x.get('title', '')))
|
|
130
|
+
|
|
131
|
+
# Create Markdown index
|
|
132
|
+
index_content = "# Literature Review Index\n\n"
|
|
133
|
+
index_content += f"**Generated**: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n"
|
|
134
|
+
index_content += f"**Total Papers**: {len(papers)}\n\n"
|
|
135
|
+
index_content += "---\n\n"
|
|
136
|
+
|
|
137
|
+
# Group by year
|
|
138
|
+
by_year = {}
|
|
139
|
+
for paper in papers_sorted:
|
|
140
|
+
year = paper.get('year', 'Unknown')
|
|
141
|
+
if year not in by_year:
|
|
142
|
+
by_year[year] = []
|
|
143
|
+
by_year[year].append(paper)
|
|
144
|
+
|
|
145
|
+
# Write by year
|
|
146
|
+
for year in sorted(by_year.keys()):
|
|
147
|
+
index_content += f"## {year}\n\n"
|
|
148
|
+
for paper in by_year[year]:
|
|
149
|
+
title = paper.get('title', paper.get('source_file', 'Unknown'))
|
|
150
|
+
author = paper.get('author', 'Unknown Author')
|
|
151
|
+
source = paper.get('source_file', '')
|
|
152
|
+
|
|
153
|
+
# Create link to markdown file
|
|
154
|
+
md_file = Path(source).stem + ".md"
|
|
155
|
+
if 'year' in paper and paper['year'] != 'Unknown':
|
|
156
|
+
md_file = f"{paper['year']}/{md_file}"
|
|
157
|
+
|
|
158
|
+
index_content += f"- **{title}**\n"
|
|
159
|
+
index_content += f" - Author: {author}\n"
|
|
160
|
+
index_content += f" - Source: {source}\n"
|
|
161
|
+
index_content += f" - [Read Markdown]({md_file})\n\n"
|
|
162
|
+
|
|
163
|
+
# Write index
|
|
164
|
+
index_file = output_dir / "INDEX.md"
|
|
165
|
+
index_file.write_text(index_content, encoding='utf-8')
|
|
166
|
+
print(f"\n✓ Created index: {index_file}")
|
|
167
|
+
|
|
168
|
+
# Also create JSON catalog
|
|
169
|
+
catalog_file = output_dir / "catalog.json"
|
|
170
|
+
with open(catalog_file, 'w', encoding='utf-8') as f:
|
|
171
|
+
json.dump(papers_sorted, f, indent=2, ensure_ascii=False)
|
|
172
|
+
print(f"✓ Created catalog: {catalog_file}")
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def main():
|
|
176
|
+
parser = argparse.ArgumentParser(
|
|
177
|
+
description="Convert scientific literature PDFs to Markdown",
|
|
178
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
179
|
+
epilog="""
|
|
180
|
+
Examples:
|
|
181
|
+
# Convert all PDFs in a directory
|
|
182
|
+
python convert_literature.py papers/ output/
|
|
183
|
+
|
|
184
|
+
# Organize by year
|
|
185
|
+
python convert_literature.py papers/ output/ --organize-by-year
|
|
186
|
+
|
|
187
|
+
# Create index of all papers
|
|
188
|
+
python convert_literature.py papers/ output/ --create-index
|
|
189
|
+
|
|
190
|
+
Filename Conventions:
|
|
191
|
+
For best results, name your PDFs using this pattern:
|
|
192
|
+
Author_Year_Title.pdf
|
|
193
|
+
|
|
194
|
+
Examples:
|
|
195
|
+
Smith_2023_Machine_Learning_Applications.pdf
|
|
196
|
+
Jones_2022_Climate_Change_Analysis.pdf
|
|
197
|
+
""",
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
parser.add_argument('input_dir', type=Path, help='Directory with PDF files')
|
|
201
|
+
parser.add_argument('output_dir', type=Path, help='Output directory for Markdown files')
|
|
202
|
+
parser.add_argument(
|
|
203
|
+
'--organize-by-year', '-y', action='store_true', help='Organize output into year subdirectories'
|
|
204
|
+
)
|
|
205
|
+
parser.add_argument('--create-index', '-i', action='store_true', help='Create an index/catalog of all papers')
|
|
206
|
+
parser.add_argument('--recursive', '-r', action='store_true', help='Search subdirectories recursively')
|
|
207
|
+
|
|
208
|
+
args = parser.parse_args()
|
|
209
|
+
|
|
210
|
+
# Validate input
|
|
211
|
+
if not args.input_dir.exists():
|
|
212
|
+
print(f"Error: Input directory '{args.input_dir}' does not exist")
|
|
213
|
+
sys.exit(1)
|
|
214
|
+
|
|
215
|
+
if not args.input_dir.is_dir():
|
|
216
|
+
print(f"Error: '{args.input_dir}' is not a directory")
|
|
217
|
+
sys.exit(1)
|
|
218
|
+
|
|
219
|
+
# Find PDF files
|
|
220
|
+
if args.recursive:
|
|
221
|
+
pdf_files = list(args.input_dir.rglob("*.pdf"))
|
|
222
|
+
else:
|
|
223
|
+
pdf_files = list(args.input_dir.glob("*.pdf"))
|
|
224
|
+
|
|
225
|
+
if not pdf_files:
|
|
226
|
+
print("No PDF files found")
|
|
227
|
+
sys.exit(1)
|
|
228
|
+
|
|
229
|
+
print(f"Found {len(pdf_files)} PDF file(s)")
|
|
230
|
+
|
|
231
|
+
# Create MarkItDown instance
|
|
232
|
+
md = MarkItDown()
|
|
233
|
+
|
|
234
|
+
# Convert all papers
|
|
235
|
+
results = []
|
|
236
|
+
success_count = 0
|
|
237
|
+
|
|
238
|
+
for pdf_file in pdf_files:
|
|
239
|
+
success, metadata = convert_paper(md, pdf_file, args.output_dir, args.organize_by_year)
|
|
240
|
+
|
|
241
|
+
if success:
|
|
242
|
+
success_count += 1
|
|
243
|
+
results.append(metadata)
|
|
244
|
+
|
|
245
|
+
# Create index if requested
|
|
246
|
+
if args.create_index and results:
|
|
247
|
+
create_index(results, args.output_dir)
|
|
248
|
+
|
|
249
|
+
# Print summary
|
|
250
|
+
print("\n" + "=" * 50)
|
|
251
|
+
print("CONVERSION SUMMARY")
|
|
252
|
+
print("=" * 50)
|
|
253
|
+
print(f"Total papers: {len(pdf_files)}")
|
|
254
|
+
print(f"Successful: {success_count}")
|
|
255
|
+
print(f"Failed: {len(pdf_files) - success_count}")
|
|
256
|
+
print(f"Success rate: {success_count / len(pdf_files) * 100:.1f}%")
|
|
257
|
+
|
|
258
|
+
sys.exit(0 if success_count == len(pdf_files) else 1)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
if __name__ == '__main__':
|
|
262
|
+
main()
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Convert documents to Markdown with AI-enhanced image descriptions.
|
|
4
|
+
|
|
5
|
+
This script demonstrates how to use MarkItDown with OpenRouter to generate
|
|
6
|
+
detailed descriptions of images in documents (PowerPoint, PDFs with images, etc.)
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import argparse
|
|
10
|
+
import os
|
|
11
|
+
import sys
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
|
|
14
|
+
from markitdown import MarkItDown
|
|
15
|
+
from openai import OpenAI
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# Predefined prompts for different use cases
|
|
19
|
+
PROMPTS = {
|
|
20
|
+
'scientific': """
|
|
21
|
+
Analyze this scientific image or diagram. Provide:
|
|
22
|
+
1. Type of visualization (graph, chart, microscopy, diagram, etc.)
|
|
23
|
+
2. Key data points, trends, or patterns
|
|
24
|
+
3. Axes labels, legends, and scales
|
|
25
|
+
4. Notable features or findings
|
|
26
|
+
5. Scientific context and significance
|
|
27
|
+
Be precise, technical, and detailed.
|
|
28
|
+
""".strip(),
|
|
29
|
+
'presentation': """
|
|
30
|
+
Describe this presentation slide image. Include:
|
|
31
|
+
1. Main visual elements and their arrangement
|
|
32
|
+
2. Key points or messages conveyed
|
|
33
|
+
3. Data or information presented
|
|
34
|
+
4. Visual hierarchy and emphasis
|
|
35
|
+
Keep the description clear and informative.
|
|
36
|
+
""".strip(),
|
|
37
|
+
'general': """
|
|
38
|
+
Describe this image in detail. Include:
|
|
39
|
+
1. Main subjects and objects
|
|
40
|
+
2. Visual composition and layout
|
|
41
|
+
3. Text content (if any)
|
|
42
|
+
4. Notable details
|
|
43
|
+
5. Overall context and purpose
|
|
44
|
+
Be comprehensive and accurate.
|
|
45
|
+
""".strip(),
|
|
46
|
+
'data_viz': """
|
|
47
|
+
Analyze this data visualization. Provide:
|
|
48
|
+
1. Type of chart/graph (bar, line, scatter, pie, etc.)
|
|
49
|
+
2. Variables and axes
|
|
50
|
+
3. Data ranges and scales
|
|
51
|
+
4. Key patterns, trends, or outliers
|
|
52
|
+
5. Statistical insights
|
|
53
|
+
Focus on quantitative accuracy.
|
|
54
|
+
""".strip(),
|
|
55
|
+
'medical': """
|
|
56
|
+
Describe this medical image. Include:
|
|
57
|
+
1. Type of medical imaging (X-ray, MRI, CT, microscopy, etc.)
|
|
58
|
+
2. Anatomical structures visible
|
|
59
|
+
3. Notable findings or abnormalities
|
|
60
|
+
4. Image quality and contrast
|
|
61
|
+
5. Clinical relevance
|
|
62
|
+
Be professional and precise.
|
|
63
|
+
""".strip(),
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def convert_with_ai(
|
|
68
|
+
input_file: Path,
|
|
69
|
+
output_file: Path,
|
|
70
|
+
api_key: str,
|
|
71
|
+
model: str = "anthropic/claude-sonnet-4.5",
|
|
72
|
+
prompt_type: str = "general",
|
|
73
|
+
custom_prompt: str = None,
|
|
74
|
+
) -> bool:
|
|
75
|
+
"""
|
|
76
|
+
Convert a file to Markdown with AI image descriptions.
|
|
77
|
+
|
|
78
|
+
Args:
|
|
79
|
+
input_file: Path to input file
|
|
80
|
+
output_file: Path to output Markdown file
|
|
81
|
+
api_key: OpenRouter API key
|
|
82
|
+
model: Model name (default: anthropic/claude-sonnet-4.5)
|
|
83
|
+
prompt_type: Type of prompt to use
|
|
84
|
+
custom_prompt: Custom prompt (overrides prompt_type)
|
|
85
|
+
|
|
86
|
+
Returns:
|
|
87
|
+
True if successful, False otherwise
|
|
88
|
+
"""
|
|
89
|
+
try:
|
|
90
|
+
# Initialize OpenRouter client (OpenAI-compatible)
|
|
91
|
+
client = OpenAI(api_key=api_key, base_url="https://openrouter.ai/api/v1")
|
|
92
|
+
|
|
93
|
+
# Select prompt
|
|
94
|
+
if custom_prompt:
|
|
95
|
+
prompt = custom_prompt
|
|
96
|
+
else:
|
|
97
|
+
prompt = PROMPTS.get(prompt_type, PROMPTS['general'])
|
|
98
|
+
|
|
99
|
+
print(f"Using model: {model}")
|
|
100
|
+
print(f"Prompt type: {prompt_type if not custom_prompt else 'custom'}")
|
|
101
|
+
print(f"Converting: {input_file}")
|
|
102
|
+
|
|
103
|
+
# Create MarkItDown with AI support
|
|
104
|
+
md = MarkItDown(llm_client=client, llm_model=model, llm_prompt=prompt)
|
|
105
|
+
|
|
106
|
+
# Convert file
|
|
107
|
+
result = md.convert(str(input_file))
|
|
108
|
+
|
|
109
|
+
# Create output with metadata
|
|
110
|
+
content = f"# {result.title or input_file.stem}\n\n"
|
|
111
|
+
content += f"**Source**: {input_file.name}\n"
|
|
112
|
+
content += f"**Format**: {input_file.suffix}\n"
|
|
113
|
+
content += f"**AI Model**: {model}\n"
|
|
114
|
+
content += f"**Prompt Type**: {prompt_type if not custom_prompt else 'custom'}\n\n"
|
|
115
|
+
content += "---\n\n"
|
|
116
|
+
content += result.text_content
|
|
117
|
+
|
|
118
|
+
# Write output
|
|
119
|
+
output_file.parent.mkdir(parents=True, exist_ok=True)
|
|
120
|
+
output_file.write_text(content, encoding='utf-8')
|
|
121
|
+
|
|
122
|
+
print(f"✓ Successfully converted to: {output_file}")
|
|
123
|
+
return True
|
|
124
|
+
|
|
125
|
+
except Exception as e:
|
|
126
|
+
print(f"✗ Error: {str(e)}", file=sys.stderr)
|
|
127
|
+
return False
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def main():
|
|
131
|
+
parser = argparse.ArgumentParser(
|
|
132
|
+
description="Convert documents to Markdown with AI-enhanced image descriptions",
|
|
133
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
134
|
+
epilog="""
|
|
135
|
+
Available prompt types:
|
|
136
|
+
scientific - For scientific diagrams, graphs, and charts
|
|
137
|
+
presentation - For presentation slides
|
|
138
|
+
general - General-purpose image description
|
|
139
|
+
data_viz - For data visualizations and charts
|
|
140
|
+
medical - For medical imaging
|
|
141
|
+
|
|
142
|
+
Examples:
|
|
143
|
+
# Convert a scientific paper
|
|
144
|
+
python convert_with_ai.py paper.pdf output.md --prompt-type scientific
|
|
145
|
+
|
|
146
|
+
# Convert a presentation with custom model
|
|
147
|
+
python convert_with_ai.py slides.pptx slides.md --model anthropic/claude-sonnet-4.5 --prompt-type presentation
|
|
148
|
+
|
|
149
|
+
# Use custom prompt with advanced vision model
|
|
150
|
+
python convert_with_ai.py diagram.png diagram.md --model anthropic/claude-sonnet-4.5 --custom-prompt "Describe this technical diagram"
|
|
151
|
+
|
|
152
|
+
# Set API key via environment variable
|
|
153
|
+
export OPENROUTER_API_KEY="sk-or-v1-..."
|
|
154
|
+
python convert_with_ai.py image.jpg image.md
|
|
155
|
+
|
|
156
|
+
Environment Variables:
|
|
157
|
+
OPENROUTER_API_KEY OpenRouter API key (required if not passed via --api-key)
|
|
158
|
+
|
|
159
|
+
Popular Models (use with --model):
|
|
160
|
+
anthropic/claude-sonnet-4.5 - Recommended for scientific vision
|
|
161
|
+
anthropic/claude-opus-4.5 - Advanced vision model
|
|
162
|
+
openai/gpt-4o - GPT-4 Omni (vision support)
|
|
163
|
+
openai/gpt-4-vision - GPT-4 Vision
|
|
164
|
+
google/gemini-pro-vision - Gemini Pro Vision
|
|
165
|
+
""",
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
parser.add_argument('input', type=Path, help='Input file')
|
|
169
|
+
parser.add_argument('output', type=Path, help='Output Markdown file')
|
|
170
|
+
parser.add_argument('--api-key', '-k', help='OpenRouter API key (or set OPENROUTER_API_KEY env var)')
|
|
171
|
+
parser.add_argument(
|
|
172
|
+
'--model',
|
|
173
|
+
'-m',
|
|
174
|
+
default='anthropic/claude-sonnet-4.5',
|
|
175
|
+
help='Model to use via OpenRouter (default: anthropic/claude-sonnet-4.5)',
|
|
176
|
+
)
|
|
177
|
+
parser.add_argument(
|
|
178
|
+
'--prompt-type',
|
|
179
|
+
'-t',
|
|
180
|
+
choices=list(PROMPTS.keys()),
|
|
181
|
+
default='general',
|
|
182
|
+
help='Type of prompt to use (default: general)',
|
|
183
|
+
)
|
|
184
|
+
parser.add_argument('--custom-prompt', '-p', help='Custom prompt (overrides --prompt-type)')
|
|
185
|
+
parser.add_argument('--list-prompts', '-l', action='store_true', help='List available prompt types and exit')
|
|
186
|
+
|
|
187
|
+
args = parser.parse_args()
|
|
188
|
+
|
|
189
|
+
# List prompts and exit
|
|
190
|
+
if args.list_prompts:
|
|
191
|
+
print("Available prompt types:\n")
|
|
192
|
+
for name, prompt in PROMPTS.items():
|
|
193
|
+
print(f"[{name}]")
|
|
194
|
+
print(prompt)
|
|
195
|
+
print("\n" + "=" * 60 + "\n")
|
|
196
|
+
sys.exit(0)
|
|
197
|
+
|
|
198
|
+
# Get API key
|
|
199
|
+
api_key = args.api_key or os.environ.get('OPENROUTER_API_KEY')
|
|
200
|
+
if not api_key:
|
|
201
|
+
print("Error: OpenRouter API key required. Set OPENROUTER_API_KEY environment variable or use --api-key")
|
|
202
|
+
print("Get your API key at: https://openrouter.ai/keys")
|
|
203
|
+
sys.exit(1)
|
|
204
|
+
|
|
205
|
+
# Validate input file
|
|
206
|
+
if not args.input.exists():
|
|
207
|
+
print(f"Error: Input file '{args.input}' does not exist")
|
|
208
|
+
sys.exit(1)
|
|
209
|
+
|
|
210
|
+
# Convert file
|
|
211
|
+
success = convert_with_ai(
|
|
212
|
+
input_file=args.input,
|
|
213
|
+
output_file=args.output,
|
|
214
|
+
api_key=api_key,
|
|
215
|
+
model=args.model,
|
|
216
|
+
prompt_type=args.prompt_type,
|
|
217
|
+
custom_prompt=args.custom_prompt,
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
sys.exit(0 if success else 1)
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
if __name__ == '__main__':
|
|
224
|
+
main()
|