@lxgicstudios/docvert
v1.0.1
Published
Convert documents between formats. PDF to Markdown, DOCX to HTML, TXT extraction. Zero-config CLI tool.
Maintainers
Readme
docvert
Convert documents between formats. PDF, DOCX, HTML, Markdown, TXT. Zero-config CLI tool.
Installation
npm install -g @lxgicstudios/docvertOr use directly with npx:
npx @lxgicstudios/docvert document.docxUsage
# Basic conversion (auto-detects output format)
docvert document.docx # → document.md
# Specify output format
docvert report.pdf -t html # → report.html
docvert page.html -t md # → page.md
# Custom output path
docvert input.docx -o output.md
# Batch conversion
docvert *.docx -t mdSupported Formats
| Input | Output | |-------|--------| | .docx | .md, .html, .txt | | .pdf | .md, .html, .txt | | .html | .md, .txt | | .md | .html, .txt | | .txt | .md, .html |
Options
| Option | Description |
|--------|-------------|
| -o, --output <file> | Output file path |
| -t, --to <format> | Target format: md, html, txt |
| -v, --verbose | Show detailed output |
| -h, --help | Show help |
Programmatic Usage
const { convert } = require('@lxgicstudios/docvert');
// Convert DOCX to Markdown
const markdown = await convert('document.docx', 'md');
// Convert PDF to HTML
const html = await convert('report.pdf', 'html');Examples
Convert a Word document to Markdown
docvert meeting-notes.docx
# Output: meeting-notes.mdConvert PDF report to HTML
docvert quarterly-report.pdf -t html -o report.htmlBatch convert all DOCX files in a folder
docvert docs/*.docx -t mdWhy docvert?
- Zero config - Works out of the box
- Fast - Lazy-loads dependencies
- Clean output - Produces readable, well-formatted documents
- Batch processing - Convert multiple files at once
Built by LXGIC Studios
