PhotoCalendar
A Python utility to create custom weekly/monthly/... photo calendars.
For example:
Table of Contents
Overview
The program creates the calendar in HTML format.
Note: you can then print it to PDF using browser or, e.g., weasyptint utility.
User may provide (see examples below):
- name of weekdays and months and their abbreviations
- images (for each week, for title page, for backgrounds)
- name-days
- public holidays
- religious holidays
- notes (friends' birthdays, anniversaries, ...)
- template how the final calendar looks like
- title, first week day, ...
HTML templates
The produced HTML structure and CSS styling is defined by template - a python module defining toHTMLString(calendar) function and CSSString string variable.
As an example and inspiration, a few predefined templates are provided.
See examples, documentation or source code for more information how to create a custom template.
Compatibility
The package works with both Python 2 and 3 (tested on Ubuntu 16.04 LTS and Python 2.7.12 and Python 3.5.2).
Examples
Usage
Python:
from photocalendar import PhotoCalendar
calendar = PhotoCalendar( # not all arguments are mandatory
outputBase = "/some/output/base",
year = 2019,
firstWeekDay = "Tu", # Tuesday as the first week day? Well, why not...
imagesDirectory = "/some/directory/with/images/for/each/week",
imageDescriptionsFile = "/some/file/with/image/descriptions/for/each/week",
backgroundImagesDirectory = "/some/directory/with/backround/images/for/each/week",
title = "Some calendar title",
titlePageImage = "/some/image/for/title/page",
titlePageBackground = "/some/background/image/for/titlepage",
lastPageBackground = "/some/background/image/for/last/page",
nameDaysFile = "/some/file/with/name-days",
religiousHolidaysFile = "/some/file/with/religious/holidays",
publicHolidaysFile = "/some/file/with/public/holidays",
notesFile = "/some/file/with/notes/like/birthdays/etc",
weekDayNamesFile = "/some/file/with/custom/weekday/names",
abbrWeekDayNamesFile = "/some/file/with/custom/abbreviated/weekday/names",
monthNamesFile = "/some/file/with/custom/month/names",
abbrMonthNamesFile = "/some/file/with/custom/abbreviated/month/names",
template = "delphinus",
)
calendar.toHTML()
Shell:
# not all arguments are mandatory
photocalendar \
--output-base /some/output/base \
--year 2019 \
--first-week-day Tu \
--images-directory /some/directory/with/images/for/each/week \
--image-descriptions-file /some/file/with/image/descriptions/for/each/week \
--background-images-directory /some/directory/with/backround/images/for/each/week \
--title "Some calendar title" \
--title-page-image /some/image/for/title/page \
--title-page-background /some/background/image/for/titlepage \
--last-page-background /some/background/image/for/last/page \
--name-days-file /some/file/with/name-days \
--religious-holidays-file /some/file/with/religious/holidays \
--public-holidays-file /some/file/with/public/holidays \
--notes-file /some/file/with/notes/like/birthdays/etc \
--week-day-names-file /some/file/with/custom/week/day/names \
--abbr-week-day-names-file /some/file/with/custom/abbreviated/week/day/names \
--month-names-file /some/file/with/custom/month/names \
--abbr-month-names-file /some/file/with/custom/abbreviated/month/names \
--template delphinus
Template examples
Note: the photos and backgrounds are only illustrative. They are provided by the user in the real use case.
The title page and one inside page is shown.
In the illustrations, picture of Golden Gate Bridge and picture of Matterhorn are used.
Template delphinus:
Weekly A5 landscape calendar
Template columba:
Monthly A4 portrait calendar
Template lupus:
Two-weeks calendar
Installation
-
Using
setup.pyfile:python setup.py install [options], e.g.python setup.py --user -
Using
make(callssetup.pyinternally):make install [options], e.g.make install USER=TRUE PYTHON=python3 -
Using
pip[sudo] pip install [options] photo-calendar, e.g.pip install --user photo-calendar
What is here
| file/directory | description |
|---|---|
| bin | directory containing executable python script |
| doc | source files for HTML documentation |
| examples | directory with examples |
| images | images for github page (e.g., templates illustrations) |
| locale | files for localization (public holidays, name days, etc.) |
| Makefile | makefile for the project (with targets help, install, doc, test, clean, dist) |
| photocalendar | actual python package |
| setup.py | python setup file for installation |
| tests | python unit tests |
Contribution
Pull Requests
Are welcome. Especially:
- locales (name-days, public holidays)
- templates
But, please, discuss the intention beforehand with the author.
Bug reporting
In case of any question or problem, please leave an issue at the githup page of the project.
Contributors
License
This project is licensed under the LGPL License - see the license file for details.
Acknowledgements
- to Petr Hlaváček for the inital idea and LaTeX implementation and providing his source code
- to dominate python package for HTML creation inspiration
Metadata
Release files for photo-calendar 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| photo-calendar-0.1.1.tar.gz | 18.3 kB | Without provenance | Details for photo-calendar-0.1.1.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| photo_calendar-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for photo_calendar-0.1.1-py3-none-any.whl |
| photo_calendar-0.1.1-py2-none-any.whl | Python 2 | none | any | Details for photo_calendar-0.1.1-py2-none-any.whl |
Total release size: 74.4 kB
Release files / photo-calendar-0.1.1.tar.gz
| Download URL | photo-calendar-0.1.1.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed713c939f9ae8c6b6a3f0c934cefc7ba767dc8089a60c02fe6d2b71c68659d0
|
|
BLAKE2b-256 checksum How to use checksums |
106e3f1c903d4d937adb7fea055db25d85ff9949869371f578e95ab52216f5fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
|
Release files / photo_calendar-0.1.1-py3-none-any.whl
| Download URL | photo_calendar-0.1.1-py3-none-any.whl |
|---|---|
| Size | 28.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f16d7dd5440cbf94d33f95578c360958d1647b709c66984f1f1dc0015d7e9b3c
|
|
BLAKE2b-256 checksum How to use checksums |
ce1f5c1a6c8672159cf3eb39a46719f7ddda29a594d7582eff478a5389f7557c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
|
Release files / photo_calendar-0.1.1-py2-none-any.whl
| Download URL | photo_calendar-0.1.1-py2-none-any.whl |
|---|---|
| Size | 28.1 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
ff427226adf532fe8c9d86a823a740211f410a002a5a284d34518bf1bce297e6
|
|
BLAKE2b-256 checksum How to use checksums |
5b517f060ea4af4433a3d89f17ff01dd36a39b7b65a9157c932e93ede7eb8f15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
|
Security for photo-calendar 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.