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.1.tar.gz (104.5 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.1-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pylendar-0.9.1.tar.gz
  • Upload date:
  • Size: 104.5 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.1.tar.gz
Algorithm Hash digest
SHA256 cafbee6e4b112289f8e3157a345c074aab56db20d3c87a4606c5eef8be0f618d
MD5 f5f0abaee2942844cc016978e3d7c343
BLAKE2b-256 abf84869f84f15c54d85b3a5d24616eb98ee568d537f23a12866192f60caa141

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pylendar-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 28.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98b0729dc835149bfa802520537951ffbba439cae2f299472996bc73d59571ff
MD5 2cef054c7e3f962879398f1515127314
BLAKE2b-256 a9272625136bdd6a922e94e269aa274a12a538d3995b30153fd11075eb5a0359

See more details on using hashes here.

Provenance

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