The python code of Lifeware
This project uses uv for Python package management and just as a command runner. These tools provide a streamlined development experience:
- uv: A fast, reliable Python package installer and resolver
- just: A handy way to save and run project-specific commands (similar to Make, but simpler)
Run just --list to see all available commands.
Install the required system dependencies:
macOS:
brew install ffmpegUbuntu/Debian:
sudo apt-get install ffmpegWindows: Download from ffmpeg.org or use:
choco install ffmpegIf the packaged executable fails with an error such as Error loading Python DLL, install the Microsoft Visual C++ Redistributable (2015-2022):
winget install Microsoft.VCRedist.2015+.x64Run the setup command to configure the project:
just setupThis will install Python, create a virtual environment, and sync all dependencies.
The project provides the following Click commands:
Converts AWS Textract JSON output to Markdown format.
Usage:
python -m lwPython.main textract-to-md --from <input.json> --to <output.md>Options:
-f, --from <path>: Input JSON file from AWS Textract (required)-t, --to <path>: Output Markdown file path (required)
Converts a PDF to Markdown using Docling.
Usage:
python -m lwPython.main docling-pdf-to-md --from <input.pdf> --to <output.md>Options:
-f, --from <path>: Input PDF file (required)-t, --to <path>: Output Markdown file path (required)
Converts a PDF or DOCX file to Markdown using MarkItDown.
Usage:
python -m lwPython.main markitdown-file-to-md --from <input.pdf|input.docx> --to <output.md>Options:
-f, --from <path>: Input PDF or DOCX file (required)-t, --to <path>: Output Markdown file path (required)