⚠️ Privacy Warning - 隐私警告
IMPORTANT - READ BEFORE INSTALLING:
This skill uploads your files to Mistral's cloud servers for OCR processing.
Do NOT use with sensitive or confidential documents unless:
- - You trust Mistral's data handling policies
- You have reviewed Mistral's privacy policy
- You accept that file contents will be transmitted and processed remotely
For sensitive documents, use offline/local OCR tools instead.
Mistral OCR Skill
A powerful OCR tool that converts PDF files and images into Markdown, JSON, or HTML formats using Mistral's state-of-the-art OCR API.
Installation
CODEBLOCK0
🔑 API Key Setup (Required)
Get your API key:
👉 https://console.mistral.ai/home
Set the environment variable:
CODEBLOCK1
CLI Usage
CODEBLOCK2
Arguments
| Flag | Description |
|---|
| INLINECODE0 | Input file path (required) |
| INLINECODE1 |
Output format: markdown/json/html (default: markdown) |
|
-o, --output | Output directory |
Data Privacy
What happens to your files:
- 1. Files are uploaded to Mistral's OCR API
- Files are processed on Mistral servers
- Processing results are returned to you
- Files are not stored on Mistral servers (per Mistral policy)
For more details, see: https://mistral.ai/privacy-policy
License
MIT
⚠️ Privacy Warning - 隐私警告
重要提示 - 安装前请阅读:
此技能会将您的文件上传至Mistral的云服务器进行OCR处理。
请勿用于敏感或机密文档,除非:
- - 您信任Mistral的数据处理政策
- 您已阅读Mistral的隐私政策
- 您接受文件内容将被远程传输和处理
对于敏感文档,请改用离线/本地OCR工具。
Mistral OCR 技能
一款强大的OCR工具,利用Mistral最先进的OCR API,将PDF文件和图像转换为Markdown、JSON或HTML格式。
安装
bash
克隆或下载此仓库
git clone https://github.com/YZDame/Mistral-OCR-SKILL.git
cd Mistral-OCR-SKILL
安装依赖
pip install -r requirements.txt
🔑 API密钥设置(必需)
获取您的API密钥:
👉 https://console.mistral.ai/home
设置环境变量:
bash
export MISTRALAPIKEY=yourapikey
CLI使用
bash
cd scripts
将PDF转换为Markdown
python3 mistral_ocr.py -i input.pdf
将PDF转换为JSON
python3 mistral_ocr.py -i input.pdf -f json
指定输出目录
python3 mistral
ocr.py -i input.pdf -o ~/myocr_results
参数
| 标志 | 描述 |
|---|
| -i, --input | 输入文件路径(必需) |
| -f, --format |
输出格式:markdown/json/html(默认:markdown) |
| -o, --output | 输出目录 |
数据隐私
您的文件将经历以下过程:
- 1. 文件被上传至Mistral的OCR API
- 文件在Mistral服务器上处理
- 处理结果返回给您
- 文件不会存储在Mistral服务器上(根据Mistral政策)
更多详情,请参阅: https://mistral.ai/privacy-policy
许可证
MIT