Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A lightweight CLI / TUI calendar that supports CalDAV

License

NotificationsYou must be signed in to change notification settings

mrusme/caldr

Repository files navigation

caldr

caldr, the command linecalendar. It's super lightweight, yet itsupports CardDAV sync!

Build

go build.

Usage

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.

Templating

You can customize the regular output using templating. The template can eitherbe passed using the--template <file> flag or by exportingCALDR_TEMPLATEin 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.

Notifications

Check mydotfiles, especiallythis script for how to get notificationsfor events. You could either run this script on login or periodically as a cronjob.

FAQ

  • Q: Doescaldr 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 nowcaldr only supports CalDAV servers to sync with.
  • Q: Does it support HTTP Digest auth?A: Nope, only HTTP Basic auth.
  • Q: Thetext/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.

[8]ページ先頭

©2009-2025 Movatter.jp