Skip to main content

pylendar

A Python port of the classic BSD calendar(1) reminder tool. You keep a plain-text file of dates, and pylendar tells you which ones are coming up.

$ pylendar -w -W30
Sun Jun 21*	Summer solstice ☀️
Wed Jul  1	Canada Day 🍁
Sat Jul  4	US Independence Day 🦅
Tue Jul 14	World Emoji Day 🙌

Why it exists

The BSD calendar program has been around since Version 7 AT&T UNIX, and the idea behind it is wonderfully simple: a text file where every line is a date and a description, and the program prints whatever falls in the next few days. No database, no sync service, no account to sign up for. Just a file you can grep, diff, and keep in version control alongside everything else.

That simplicity is why it's still worth using. The catch is that the BSD variants have drifted apart over the decades. FreeBSD, macOS, OpenBSD, NetBSD, and Debian each grew their own set of date formats and flags, and none of them are easy to get running on many modern Linux systems.

pylendar brings the idea back as a single, lightweight Python program that:

  • reads them all. It understands the date formats from every major BSD variant, so existing calendar files just work.
  • adds a few niceties. ISO 8601 dates (2026-02-17), automatic age calculation (Pat turns [1990] becomes Pat turns 36), and weekday-relative dates like Sun<Dec 25 (the last Sunday before Christmas).
  • gets the astronomy right. Moon phases, equinoxes, and solstices are pinned down precisely with the astronomy-engine library. Easter and the Chinese New Year land on the right day every year, too.
  • speaks Unicode. Full UTF-8 and emoji support ⭐, so your calendar files read the same everywhere.
  • runs anywhere Python does, and installs in a single command.

pylendar intentionally omits the superuser email mode. On BSD, calendar -a processes every user's calendar file and mails each person their results. pylendar only ever runs as you, on your own files, and never sends mail.

Installing

The fastest way to try it, without installing anything permanently, is with uv:

$ uvx pylendar

To keep it around as a tool on your PATH:

$ uv tool install pylendar

Or add it to a project:

$ uv add pylendar

Because it carries PEP 723 inline metadata, the single pylendar.py source file also runs as a stand-alone script with no installation at all: uv run --script path/to/pylendar.py. It also installs the traditional way with pip install pylendar.

Getting started

Create a starter calendar file with a few commented examples to copy from:

$ pylendar --init
pylendar: starter calendar written to ~/.calendar/calendar

Each line is a date, a single tab, and a description:

Jan 1	New Year's Day
Jul 4	US Independence Day [1776]
2028-07-14	Start of the LA Olympics
* 15	Mid-month reminder
May/MonSecond	2nd Monday in May
Easter	Easter Sunday
DecSolstice	Winter solstice

Add your own dates, then run it:

$ pylendar

By default pylendar shows today's events, plus the next three days when you run it on a Friday. A few options worth knowing:

  • -A 30 looks 30 days ahead
  • -w prints the weekday name in front of each event
  • -t 2026-12-20 pretends it's a different day

Run pylendar --help for the full list, or man pylendar for the complete date-format reference.

Documentation

The manpage is the authoritative reference for every supported date format, command-line option, file-search path, and BSD compatibility note.

See also

License

BSD 3-Clause. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylendar-0.9.0.tar.gz (101.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pylendar-0.9.0-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file pylendar-0.9.0.tar.gz.

File metadata

  • Download URL: pylendar-0.9.0.tar.gz
  • Upload date:
  • Size: 101.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pylendar-0.9.0.tar.gz
Algorithm Hash digest
SHA256 64ecbb547c1d3bf04540aed51a47fd820951052fbf8fb10c73ded2d8e993cfd8
MD5 d365e9c1f828c0721f48291fa50ffcb5
BLAKE2b-256 b44499f1647364791730df337ff16c4094f740cdd558bd0b8a4449a8160e4150

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylendar-0.9.0.tar.gz:

Publisher: python-publish.yml on harkabeeparolus/pylendar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylendar-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: pylendar-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pylendar-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b88af7e386f1c1f1335f6b385e247542912d4585ef68b46b373dd36cfcb1d1bd
MD5 e7b02d28686eceac7c5d19ea1d4a9246
BLAKE2b-256 b788b2f5a70aa7f9cfece76141e06f936e88913694b7cb3f5991c91a57e4f264

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylendar-0.9.0-py3-none-any.whl:

Publisher: python-publish.yml on harkabeeparolus/pylendar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page