- Notifications
You must be signed in to change notification settings - Fork3
A lightweight CLI / TUI calendar that supports CalDAV
License
mrusme/caldr
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
caldr
, the command linecalendar. It's super lightweight, yet itsupports CardDAV sync!
go build.
Either export all necessary variables to your ENV or set them as command lineflags:
export CARDDAV_USERNAME='...'export CARDDAV_PASSWORD='...'export CARDDAV_ENDPOINT='...'export CALDR_DB='...'
If you're usingBaïkal for example, youwould export something like this asCARDDAV_ENDPOINT
:
export CARDDAV_ENDPOINT='https://my.baik.al/dav.php/'
TheCALDR_DB
is the local events database in order to not need to contactthe CalDAV for every lookup. You might set it to something like this:
export CALDR_DB=~/.cache/caldr.db
Whencaldr
is launched for the first time, it requires the-r
flag torefresh the events and sync them locally:
caldr -r
This way you could create a cron job that refreshescaldr
in the background,e.g. every three hours:
crontab -e
0*/3***sh -c 'caldr -r'
You can also output contacts as JSON format using the-j
flag:
caldr -j
Find more flags and info withcaldr --help
.
You can customize the regular output using templating. The template can eitherbe passed using the--template <file>
flag or by exportingCALDR_TEMPLATE
in the in the environment.
The templating format is theGo standardtext/template
format.
Available property names that are available can be found by checking theCalEvent
struct instore/store.go
.
An example template can be foundhere. To make use of the template, you cancopy it to e.g.~/.config/caldr.tmpl
and haveCALDR_TEMPLATE=~/.config/caldr.tmpl
exported in your.zshrc
/.bashrc
/etc.
Check mydotfiles, especiallythis script for how to get notificationsfor events. You could either run this script on login or periodically as a cronjob.
- Q: Does
caldr
write/modify any contact information?A: Nope, so far it's read-only and does not support updating iCals, hence itwon't mess with your data. - Q: Can I use it with my local calendar?A: Nope, as of right now
caldr
only supports CalDAV servers to sync with. - Q: Does it support HTTP Digest auth?A: Nope, only HTTP Basic auth.
- Q: The
text/template
stuff doesn't work for me, can I makecaldr
outputcontact data differently?A: Yes, you can use the-j
flag and have it output pure JSON, which you canthen process using e.g.jq
.
About
A lightweight CLI / TUI calendar that supports CalDAV