Skip to content

kimbredesen/KeglandLablemaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KeglandLablemaker

Python utility to generate Bishop tap-handle PDFs (t1.pdf, t2.pdf, t3.pdf, t4.pdf) by placing your image into the template Bishop-Tap-Handle-Template-Graphics.pdf.

What it does

  • Looks in the script’s folder for the template PDF and for an image named 1.png, 1.jpg, 1.jpeg, 1.gif, 1.tif, or 1.tiff (first match wins).
  • Creates four styled variants so you can pick the best fit:
    • Style 1: Fits the image centered within the yellow viewable area.
    • Style 2: Covers the yellow viewable area (crops as needed).
    • Style 3: Fits the image aligned to the bottom of the yellow viewable area.
    • Style 4: Covers the right-side red outline area with an extra 3 mm buffer (tight to that outline) while keeping the red line visible on top.
  • Saves outputs as t1.pdf, t2.pdf, t3.pdf, t4.pdf in the same folder.

Requirements

  • Python 3.9+
  • PyMuPDF, Pillow (install with pip install -r requirements.txt)

Usage

  1. Place these files together in one folder:
    • LableMaker.py
    • Bishop-Tap-Handle-Template-Graphics.pdf
    • One image named 1.png / 1.jpg / 1.jpeg / 1.gif / 1.tif / 1.tiff
  2. Install dependencies:
    pip install -r requirements.txt
    
  3. Run from the folder that holds the template and image:
    python src/LableMaker.py
    
  4. Collect the generated t1.pdf, t2.pdf, t3.pdf, t4.pdf from the same folder.

Notes

  • Run the script from the directory containing the template and 1.* image (the script uses the current working directory).
  • Existing t1-t4 PDFs are overwritten automatically; close them in any PDF viewer before rerunning if Windows locks the files.
  • If the template or image is missing, the script exits with a clear error.
  • Style 4 keeps the red outline visible on top; yellow guides may still be present beneath the image.
  • Swap out the 1.* image and rerun to regenerate all variants quickly.

License

MIT License. See LICENSE.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages