Skip to main content

pylendar

PyPI Tests

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-1.0.0.tar.gz (104.8 kB view details)

Uploaded Source

Built Distribution

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

pylendar-1.0.0-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pylendar-1.0.0.tar.gz
Algorithm Hash digest
SHA256 407aef512ea614094bbe59b24a5b7abab1f53af3a4196bab8fde4c2808da1efd
MD5 d3568a92cad949b27aef9257a06afce8
BLAKE2b-256 4b9161231a6ce7cc7920c4a69c54c6dc79a3ce32ce0e9036d2e651759d459b49

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylendar-1.0.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-1.0.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for pylendar-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e281dc67384c8c7aa6613ca8766bb1a75ace71a2d8e9811b60861a7016926dc
MD5 2b7e058f38ae820ce83ef8afb71b7812
BLAKE2b-256 4202b28d493b46eabf9f530ffde6c4b6b7b5ef977168b55a72b1e7fac0459637

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylendar-1.0.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