
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
github.com/setkyar/llm-tools/mistral-ocr
A command-line tool for processing documents with Mistral AI's OCR capabilities.
git clone https://github.com/setkyar/llm-tools
cd llm-tools/mistral-ocr
go build -o mistral-ocr
You can provide your Mistral API key in two ways:
export MISTRAL_API_KEY=your-api-key
mistral-ocr --api-key=your-api-key [command]
Process a document file or URL:
# Process a local PDF file
mistral-ocr process path/to/document.pdf
# Process a document from a URL
mistral-ocr process https://example.com/document.pdf
# Process an image from a URL
mistral-ocr process https://example.com/image.jpg
# Save output to a file
mistral-ocr process path/to/document.pdf --output-file results.json
# Include base64 encoded images in the output
mistral-ocr process path/to/document.pdf --include-images
Convert previously processed OCR JSON results to Markdown:
# Convert OCR JSON to Markdown
mistral-ocr convert results.json
# Specify output directory
mistral-ocr convert results.json --output-dir output_folder
# Create a single markdown file instead of one per page
mistral-ocr convert results.json --single-file
# Specify output filename for single file mode
mistral-ocr convert results.json --output-file document.md
# Include images in markdown (if available in JSON)
mistral-ocr convert results.json --images
Process a document and convert to Markdown in a single command:
# Process document and generate markdown files
mistral-ocr markdown path/to/document.pdf
# Generate a single markdown file instead of separate files per page
mistral-ocr markdown path/to/document.pdf --single-file
# Specify output directory for markdown files
mistral-ocr markdown https://example.com/document.pdf --output-dir docs
# Specify a specific output file path (implies single file)
mistral-ocr markdown path/to/document.pdf --output-file docs/result.md
# Save intermediate JSON and generate markdown files
mistral-ocr markdown path/to/document.pdf --json-file results.json --output-dir docs
This command combines the process
and convert
steps, creating markdown files directly from the document.
mistral-ocr version
mistral-ocr process ~/Documents/sample.pdf --output-file results.json
mistral-ocr process https://arxiv.org/pdf/2201.04234 > output.json
# Create separate files (one per page)
mistral-ocr convert output.json --output-dir markdown_docs
# Create a single file with all pages
mistral-ocr convert output.json --single-file --output-dir markdown_docs
# Create a single file with a specific filename
mistral-ocr convert output.json --output-file docs/paper.md
# Generate separate files (one per page)
mistral-ocr markdown ~/Documents/research-paper.pdf --output-dir research_docs
# Generate a single markdown file
mistral-ocr markdown ~/Documents/research-paper.pdf --single-file --output-dir research_docs
# Generate a single markdown file with specific filename
mistral-ocr markdown ~/Documents/research-paper.pdf --output-file research_docs/paper.md
MIT
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.