1
0
Fork 0
mirror of https://git.sr.ht/~psic4t/qcal synced 2025-10-21 00:33:56 +02:00
caldav cli client
Find a file
2025-10-09 14:22:50 +02:00
AGENTS.md version 2025-10-09 14:22:50 +02:00
config-sample.json quick fix 2021-12-29 12:32:26 +01:00
defines.go version 2025-10-09 14:22:50 +02:00
go.mod Replace third party import iso8601duration with own implementation 2025-10-09 10:01:02 +02:00
go.sum Replace third party import iso8601duration with own implementation 2025-10-09 10:01:02 +02:00
helpers.go New option -tl to show only links to Microsoft Teams meetings from description 2025-10-09 14:00:43 +02:00
LICENSE add license 2021-12-22 18:41:02 +01:00
main.go New option -tl to show only links to Microsoft Teams meetings from description 2025-10-09 14:00:43 +02:00
Makefile better code 2022-02-04 11:01:31 +01:00
parse.go Improve UNTIL handling 2025-10-09 13:21:14 +02:00
README.md new option -past <days>, to show old appointments 2025-10-09 11:24:35 +02:00
TODO Improve duration support 2025-10-09 10:52:37 +02:00

qcal

qcal is a CLI calendar application for CalDAV servers written in Go. In contrast to other tools it does not cache anything. It can fetch multiple servers / calendars in parallel which makes it quite fast.

Its main purpose is displaying calendar data. Nevertheless it supports basic creation and editing of entries.

Features

  • Condensed quick overview of appointments
  • Parallel fetching of multiple calendars
  • Viewing of iCal subscriptions
  • Easy to use filters
  • Create, modify and delete appointments
  • Import ICS files
  • Display ICS files
  • Easy setup

Installation / Configuration

  • Have Go installed
  • make && sudo make install (for MacOS: make darwin)
  • copy config-sample.json to ~/.config/qcal/config.json and modify accordingly

Arch AUR package

  • Here: AUR
  • Copy config-sample.json from /usr/share/doc/qcal/ to ~/.config/qcal/config.json and modify accordingly

Configuration

  • For additional calendars just add a comma and new calendar credentials in curly brackets.
  • Omit Username and Password if you add a readonly iCal source

Usage

Common options:

qcal -h

Displaying appointments

This simply displays all appointments for the next x days (configured in config.json):

qcal

This shows all appointments for today:

qcal -t

This only shows appointments from calendar 0 for the next seven days:

qcal -c 0 -7

This shows all appointments from 01.10.2021, 00:00h to 31.10.2021, 23:59:59 (Note: This is in UTC!):

qcal -s 20211001T000000 -e 20211031T235959

This shows only past appointments for the last 30 days:

qcal -past 30

This displays all avaliable calendars with their numbers and colors:

qcal -l

Add new appointment

Even though the abillity to create new appointments is limited, it is easy to create simple appointment types.

This creates an appointment on 01.12.2021 from 15:00h to 17:00h with the summary of "Tea Time":

qcal -n "20211201 1500 1700 Tea Time"

This creates a whole day appointment with a yearly recurrence in your second calendar (first is 0):

qcal -c 1 -n "20211114 Anne's Birthday" -r y

This creates a multiple day appointment:

qcal -n "20210801 20210810 Holiday in Thailand"

Edit an appointment

This shows the next 7 days of appointments from calendar 3 with filenames ("foobarxyz.ics"):

qcal -c 2 -7 -f 

This edits the selected iCAL object in your $EDITOR (i.e. vim). When you save-quit the modified object is automatically uploaded:

qcal -c 2 -edit foobarxyz.ics

Integrations

neomutt / other cli mail tools

You can view received appointments in neomutt with qcal! Put this in your mailcap (usually in .config/neomutt):

text/calendar; qcal -p; copiousoutput

If you also want to be able to import received appointments directly from neomutt, put the following two lines in mailcap:

text/calendar; qcal -c 0 -u %s && notify-send "Appointment created";
text/calendar; qcal -p; copiousoutput

The first line is only executed if you press Return. The second line just displays the appointment as above.

Crontab (or Statusline script, Systemd timer, etc.)

You can get reminders of your appointments 15 mins in advance with this one liner:

[[ $(qcal -cron 15 2>/dev/null) ]] && notify-send "Next Appointment:" "\n $(qcal -cron 15)" || true

External password command

Instead of putting your password in the config file you can specify an external command to resolve your password. Put a line like this in your calendar config and leave the "Password" field empty:

"PasswordCmd":"rbw get email-provider"

About

Questions? Ideas? File bugs and TODOs through the issue tracker or send an email to ~psic4t/qcal@todo.sr.ht