1 unstable release
Uses new Rust 2024
new 0.1.0 | Mar 26, 2025 |
---|
#662 in Command line utilities
14KB
171 lines
cal temps: sí que en cal!
caltemps
is a Command Line Interface (CLI) tool that is able to process
calendars saved in the
vdir storage format.
You can get your calendar in the vdir format with, e.g. vdirsyncer.
You can then query for the time spent on things in a given date range.
This is heavily inspired by Tracklr.
It only requires that you are somewhat consistent about naming your events on the calendar, using this set of rules on your summaries:
@Group1
: helps tag an event as belonging to "Group1"#Tag1 #Tag2
: helps identify a set of subdivisions
After some years using Tracklr and many local patches, I decided to either fork or rewrite the tool, you can read the full rationale here.
Usage
> ct --help
A tool to query and report on your iCalendar data from vDirs.
Usage: ct [OPTIONS]
Options:
-c, --config <CONFIG> [env: CALTEMPS_CONFIG=] [default: ${XDG_CONFIG_HOME:-~/.config}/caltemps/config.toml]
-f, --filter <FILTER> [env: CALTEMPS_FILTER=]
-d, --date-range <DATE_RANGE> [env: CALTEMPS_DATE_RANGE=]
-h, --help Print help
-V, --version Print version
Configuration
If not specified on the command line with the --config
flag, ct
will read
the configuration from ${XDG_CONFIG_HOME:-~/.config}/caltemps/config.toml
.
# Possible contents of ~/.config/caltemps/config.toml
vdir_path="/home/user/.calendars/nextcloud/personal"
default_filter="@work"
default_date_range="2025-03-01T00:00:00+01:00"
If the configuration cannot be read,
vdir_path
defaults to./calendars
.ct
will fail ifvdir_path
does not exist.
Dependencies
~6–13MB
~162K SLoC