Create a PDF contact sheet from a set of images
Project description
imagecatalog
Create a PDF contact sheet from a list of files.
Installation
Install from PyPI
pip install imagecatalog
or get latest dev version from GitHub.
pip install git+https://github.com/tdmorello/imagecatalog.git
Usage
Command line
imagecatalog -h
imagecatalog -i images/ -f '*.jpg' --title 'Image Catalog' example.pdf
File paths and metadata can also be supplied from a csv file with headers "image", "label", "note"
$ head -n5 sample.csv
image,label,note
images/image_00.jpg,Image 0,image 0 note
images/image_01.jpg,Image 1,image 1 note
images/image_02.jpg,Image 2,image 2 note
images/image_03.jpg,Image 3,image 3 note
imagecatalog --csv sample.csv --title 'Image Catalog from CSV' example_csv.pdf
Scripting
from imagecatalog import Catalog
# Catalog inherits from FPDF
# see https://github.com/PyFPDF/fpdf2 for more methods
catalog = Catalog()
# optionally add a title
catalog.set_title("Image Catalog")
# grab a set of existing images from a local directory
images = [f"images/image_{i:02}.jpg" for i in range(12)]
# optionally add labels (defaults to filenames)
labels = [f"Image {i}" for i in range(len(images))]
# optionally add notes
notes = [f"note for image {i}" for i in range(len(images))]
# generate the pdf
catalog.create(images, labels=labels, notes=notes, rows=4, cols=3)
# save
catalog.output("example.pdf")
Contributions
imagecatalog
uses poetry
for building and package management. Pull requests are welcome.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
imagecatalog-0.1.2.tar.gz
(7.6 kB
view hashes)
Built Distribution
Close
Hashes for imagecatalog-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8113c7d606154cd876ab7a56590a5314162250aeac3de2325b363603e30ae965 |
|
MD5 | 160e4eb1d702f00baf448e2dc3cb275f |
|
BLAKE2b-256 | a896f7a04f87e3cd7ec60fa18fd60cbe44f20a264533a31b28f73607bbcdfbf0 |