|2023-02-16||format: use char() instead of tag() for parse_offset||Sören Tempel|
|2023-02-16||lib: Make parser for weekday offset more strict||Sören Tempel|
|2023-02-16||Add fast path for semi-weekly reminders||Sören Tempel|
|2023-02-15||format: Require an explicit +/- sign for moving events||Sören Tempel|
|2023-02-15||main: Fix entry iteration||Sören Tempel|
Clone the repository to access all 82 commits.
This is an implementation of the
calendar(1) program as available on many BSD variants.
This is mostly intended as a toy project for experimenting a bit with Rust.
The implementation is primarily inspired by the OpenBSD
calendar(1) implementation and implements most of its feature.
However, the input format is not intended to be fully compatible with OpenBSD.
- Saner and more strict input format compared to the BSD version
- Re-usable parser for the input format is provided as a Rust library
- Allows building additional tools on top
- For example, exporters for other formats
- Lots of great non-features:
- No locale support
- No support for Julian or Cyrillic calendars
- No built-in support for national holidays
This software can be installed using the following commands:
$ cargo install --path .
This will drop the
ncalendar binary into
Make sure that directory is in your
ncalendar(1) program reads calendar entries from the file
~/.ncalendar/calendar by default.
The input format for this file is “documented” through parser combinators in
When invoked, all calendar entries which match a certain time span are written to standard output.
By default, entries for the current and the next day are printed.
The time span can be configured, via the
-A (forward) and
-t (set different current date) command-line options an.
$ ncalendar -B 3 -A 11 -t 20122022
Will print all calendars in the inclusive range between the 17th December of 2022 and the 31th December. The program is best invoked from a daily user-level cronjob.
Unit tests can be executed using the following command:
$ cargo test
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.