This workspace contains a batch converter that reads files from ./data/ and writes Markdown files to ./output/.
The converter preserves subdirectories, so data/กฎหมายดิจิทัล/files becomes output/กฎหมายดิจิทัล/files.
- pptx
- docx
- xlsx
- xls
Use Python 3.12 or later (other versions may work fine)
Install the Python dependencies:
pip install -r requirements.txtCreate a .env file in the project root based on .env.example and add your Typhoon API key (for PDF file conversion).
Put the files you want to convert inside ./data/, then run:
python typhoon_ocr.pyIf a mirrored output path already exists, the script uses numbered suffixes starting from _1, _2, and so on.
The generated Markdown files will appear in ./output/ as filename.md