Skip to content

peetzweg/papr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

papr - Generate Calendar Stationeries

Command line tool to generate a empty calendar templates to print.

ScreenShot

Info

Papr currently only produces a PDF output. When you are printing the PDF file make sure you have to automated positioning or resizing features of your printer enabled!

Quick start

After installing via Homebrew:

papr -y 2023 -m 2 -f='Avenir Next' -p A3 oneyear

Or using uv (from the project directory):

uv run papr -y 2023 -m 2 -f='Avenir Next' -p A3 oneyear

Development mode (uv only)

For development, watch for file changes and automatically regenerate the PDF (like npm run dev):

# First, sync with dev dependencies (like npm install)
uv sync

# Then run in watch mode
uv run python -m papr.dev -y 2023 -m 2 -f='Avenir Next' -p A3 oneyear

The dev mode will:

  • Run the command once immediately
  • Watch for changes in the papr source files
  • Automatically rerun when you save changes
  • Clear the console between runs for clean output

Press Ctrl+C to stop watching.

Note: This feature is only available when developing with uv and won't be included in Homebrew installations.

usage: papr.py [-h] [-o OUT] [-A] [-a] [-b BRAND] [-c] [-f FONT [FONT ...]]
                   [-l LOCALE] [-m MONTH] [-y YEAR]
                   [-p {A5,A4,A3,A2,A1,A0,USLetter}] [--margin MARGIN] [-v] [-d]
                   LAYOUT

    Create a Calendar

    positional arguments:
      LAYOUT                choose calendar layout: ('classic', 'column',
                            'oneyear')

    optional arguments:
      -h, --help            show this help message and exit
      -o OUT, --out OUT     specify output file
      -A, --abbreviate_all  use abbreviations for weekdays and months
      -a, --abbreviate      use abbreviations for weekdays
      -b BRAND, --brand BRAND
                            assign a brand string
      -c, --color           color date numbers
      -f FONT [FONT ...], --fonts FONT [FONT ...]
                            choose which font to use
      -l LOCALE, --locale LOCALE
                            choose locale to use (default en_US.UTF8, check
                            'locale -a' for available locales)
      -m MONTH, --month MONTH
                            specify the starting month as a number (1-12), default
                            is the current month (3).
      -y YEAR, --year YEAR  specify the year the calendar should start, default is
                            the current year (2016).
      -p {A5,A4,A3,A2,A1,A0,USLetter}, --paper {A5,A4,A3,A2,A1,A0,USLetter}
                            choose which paper dimensions should be used ('A5',
                            'A4', 'A3', 'A2', 'A1', 'A0', 'USLetter') default is
                            A4
      --margin MARGIN       specify the margin of the calendar in millimeters.
                            Used to adapt to your printer, default ist 5mm
      -v, --verbose         print status messages to stdout
      -d, --debug           print status and debug messages to stdout

Installation

Homebrew (Recommended)

The easiest way to install papr on macOS:

brew tap peetzweg/tap
brew install papr

That's it! The papr command is now available globally.

Note: First installation takes 3-5 minutes as it compiles dependencies.

Using uv

uv is a fast Python package manager for development.

  1. Install system dependencies using homebrew:
brew install pygobject3
  1. Install uv if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Clone the repository:
git clone https://github.com/peetzweg/papr.git
cd papr
  1. Install the project with uv:
uv sync
  1. Run papr using uv:
uv run papr -y 2023 -m 2 -f='Avenir Next' -p A3 oneyear

Manual Installation

  1. Install git and python3 run this in your terminal:
xcode-select --install
  1. Install pygobject3 for python3 using homebrew
brew install pygobject3
  1. Clone repository using git
git clone https://github.com/peetzweg/papr.git
cd papr
  1. Run using Python module syntax:
python3 -m papr.papr -y 2023 -m 2 -f='Avenir Next' -p A3 oneyear

See Quick Start Section for more CLI examples.

Layouts

oneyear

ScreenShot

About

Command line tool to generate a PDF Calendars

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages