From 1d0d9da57c893d38893f35804f3a0b9ee3b25f0c Mon Sep 17 00:00:00 2001 From: zlei9 Date: Sun, 29 Mar 2026 14:22:03 +0800 Subject: [PATCH] Initial commit with translated description --- SKILL.md | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ _meta.json | 6 +++++ 2 files changed, 73 insertions(+) create mode 100644 SKILL.md create mode 100644 _meta.json diff --git a/SKILL.md b/SKILL.md new file mode 100644 index 0000000..016b95c --- /dev/null +++ b/SKILL.md @@ -0,0 +1,67 @@ +--- +name: markdown-converter +description: "使用markitdown将文档和文件转换为Markdown。" +--- + +# Markdown Converter + +Convert files to Markdown using `uvx markitdown` — no installation required. + +## Basic Usage + +```bash +# Convert to stdout +uvx markitdown input.pdf + +# Save to file +uvx markitdown input.pdf -o output.md +uvx markitdown input.docx > output.md + +# From stdin +cat input.pdf | uvx markitdown +``` + +## Supported Formats + +- **Documents**: PDF, Word (.docx), PowerPoint (.pptx), Excel (.xlsx, .xls) +- **Web/Data**: HTML, CSV, JSON, XML +- **Media**: Images (EXIF + OCR), Audio (EXIF + transcription) +- **Other**: ZIP (iterates contents), YouTube URLs, EPub + +## Options + +```bash +-o OUTPUT # Output file +-x EXTENSION # Hint file extension (for stdin) +-m MIME_TYPE # Hint MIME type +-c CHARSET # Hint charset (e.g., UTF-8) +-d # Use Azure Document Intelligence +-e ENDPOINT # Document Intelligence endpoint +--use-plugins # Enable 3rd-party plugins +--list-plugins # Show installed plugins +``` + +## Examples + +```bash +# Convert Word document +uvx markitdown report.docx -o report.md + +# Convert Excel spreadsheet +uvx markitdown data.xlsx > data.md + +# Convert PowerPoint presentation +uvx markitdown slides.pptx -o slides.md + +# Convert with file type hint (for stdin) +cat document | uvx markitdown -x .pdf > output.md + +# Use Azure Document Intelligence for better PDF extraction +uvx markitdown scan.pdf -d -e "https://your-resource.cognitiveservices.azure.com/" +``` + +## Notes + +- Output preserves document structure: headings, tables, lists, links +- First run caches dependencies; subsequent runs are faster +- For complex PDFs with poor extraction, use `-d` with Azure Document Intelligence diff --git a/_meta.json b/_meta.json new file mode 100644 index 0000000..c570589 --- /dev/null +++ b/_meta.json @@ -0,0 +1,6 @@ +{ + "ownerId": "kn70pywhg0fyz996kpa8xj89s57yhv26", + "slug": "markdown-converter", + "version": "1.0.0", + "publishedAt": 1767651965151 +} \ No newline at end of file