🛠️ kdm is a developer toolset for PDF and image utilities, including converting PDFs to images and merging images into a PDF. This README is focused on contributors and development setup.
- Python 3.8 or higher
- Poppler (for
pdf2image) - Git
-
Ensure Python is installed (Python 3.8+ required).
You can install it using your OS's package manager (e.g. Homebrew or apt), or from https://www.python.org
-
Install Poppler:
brew install poppler # macOS sudo apt install poppler-utils # Linux
-
Clone the repository:
git clone https://github.com/kudadonbe/tools.git cd tools -
Install dependencies in editable mode:
pip install --user -e ".[dev]" -
Add project path to Python if needed (fixes
ModuleNotFoundError):export PYTHONPATH="$PYTHONPATH:$(pwd)"
-
(Optional) Add the above to
.zshrcor.bashrc:export PYTHONPATH="$PYTHONPATH:$HOME/Documents/GitHub/tools"
-
Make sure your PATH includes user scripts (adjust Python version if needed):
export PATH="$PATH:$HOME/Library/Python/3.x/bin"
-
Test the CLI:
kdm --help
-
Install Python from python.org
- ✅ Ensure "Add Python to PATH" is selected
-
Download and install Poppler:
- Poppler for Windows
- Extract and place in a permanent folder (e.g.,
C:\Tools\poppler) - Add
C:\Tools\poppler\Library\binto your systemPATH
-
Clone and install:
git clone https://github.com/kudadonbe/tools.git cd tools pip install --user -e ".[dev]"
-
(Optional but recommended): Add the scripts path to your PATH:
%USERPROFILE%\AppData\Roaming\Python\Python3xx\Scripts\This lets you run
kdmglobally in PowerShell or CMD. You can still run it locally using.\kdmeven without adding to PATH. -
Set PYTHONPATH if needed:
$env:PYTHONPATH = "$(Get-Location)"
Or add it permanently in Environment Variables → User variables:
- Name:
PYTHONPATH - Value:
Full\Path\To\tools(e.g.C:\Users\yourname\Documents\GitHub\tools)
- Name:
-
Test:
kdm --help
-
Convert PDF to images:
kdm pdf2images
-
Merge images to PDF:
kdm images2pdf
# Make changes in the tools/ directory
git add .
git commit -m "Message"
git push origin main-
ModuleNotFoundError: No module named 'tools'?export PYTHONPATH="$PYTHONPATH:$(pwd)"
-
kdm: command not found? Make sure your Python user scripts directory is in yourPATH, e.g.:%USERPROFILE%\AppData\Roaming\Python\Python3xx\Scripts\