calcurse
calcurse copied to clipboard
Calcurse and vdir subdirectories?
Feedback was explicitly requested for calcurse-vdir, so here is mine. I try to move my daily organizing to the terminal and after playing with it a little (locally), I must say that I like calcurse. Syncing data is an issue that I have not been able to really solve so far, though.
I have a caldav server (radicale) running and try to sync with it. First I tried to use calcurse-caldav and was able to push local events to the server. However I have been unable to receive any no matter what I tried. I checked on the server and the events were created successfully but simply would never be retrieved (no errors but always 0 imports). After reading on the net that many people had problems with this scripts and no solution was to be found I gave up on it and took a look at calcurse-vdir instead.
Now I have vdirsyncer is installed and configured and it seems to work. My problem is that "calcurse-vdir export" dumps all the events as $hash.ics files directly into the export directory whereas the structure I find with vdirsyncer involves subdirectories (i.e. $hash.ics/$hash.ics). Just for testing I taught calcurse-vdir to use the same structure if "-s" or "--subdirs" arguments are given. While this seems to solve the problem with the different structure on my end I really wonder if there's something weird going on with my setup. Vdirsyncer documentation mentions the subdirectories, so I assume they are not the result of misconfiguration on my machine. But then how do people use calcurse-vdir? I'm completely new to the technical side of caldav syncing. Is there anything obvious that I'm missing?
I can share the changes I made if anybody is interested in supporting subdirectories (it's "works for my" quality, though - I don't have any Python skills worth mentioning).
I just wanted to add a data point regarding syncing with Radicale: I wasn't able to get any calendar events using calcurse-caldav
(Edit: As it turns out, I needed to use the correct value for Path
in the config).
The command I ran:
calcurse-caldav --init=keep-remote --debug -v
Output:
Loading configuration from /home/mb/.config/calcurse/caldav/config...
Running command: ['calcurse', '--version']
Connecting to cal.mb.sb...
Removing all local calcurse objects...
Running command: ['calcurse', '-F', '--filter-hash=XXX']
> REPORT https://cal.mb.sb//
> Headers: {'Content-Type': 'application/xml; charset=utf-8', 'Depth': '1'}
> <?xml version="1.0" encoding="utf-8" ?><C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"><D:prop><D:getetag
/></D:prop><C:filter><C:comp-filter name="VCALENDAR" /></C:filter></C:calendar-query>
< Status: 207 (Multi-Status)
< Headers: {'server': 'nginx/1.20.1', 'date': 'Thu, 11 Nov 2021 1
1:58:54 GMT', 'content-type': 'text/xml; charset=utf-8', 'content-length': '67', 'connection': 'keep-alive', 'status': '207', '-content-encoding': 'gzi
p'}
< <?xml version='1.0' encoding='utf-8'?>
< <multistatus xmlns="DAV:" />
Running command: ['calcurse', '-G', '--filter-type', 'cal,todo', '--format-apt=%(hash)\\n', '--format-recur-apt=%(hash)\\n', '--format-event=%(hash)\\n
', '--format-recur-event=%(hash)\\n', '--format-todo=%(hash)\\n']
Saving synchronization database to /home/mb/.local/share/calcurse/caldav/sync.db...
0 items imported, 0 items removed locally.
0 items exported, 0 items removed from the server.
Contents of ~/.config/calcurse/caldav/config
:
[General]
Hostname = cal.mb.sb
# Edit: This should have been "Path = /me/calendarName/"
Path = /
SyncFilter = cal,todo
Verbose = Yes
DryRun = No
[Auth]
Username = secretUser
Password = secretPass
I used khal and vdirsyncer before and was able to import the calendar data downloaded with vdirsyncer into calcurse with calcurse-vdir import ~/.local/share/calendars/personal/
.
After adding an appointment using calcurse, I ran calcurse-vdir export ~/.local/share/calendars/personal/
, and let vdirsyncer upload the calendar data to server. I then noticed that on another client (the LineageOS stock calendar app on a Galaxy J5) that all appointments expect the one I created with calcurse were duplicated: They occurred twice in the calendar.
Calcurse's version is 4.7.1, I'm on Arch Linux 5.14.15.