summaryrefslogtreecommitdiffstats
path: root/contrib
Commit message (Collapse)AuthorAgeFilesLines
* calcurse-caldav: Ensure config and data dirs existNitroretro2020-05-011-13/+21
| | | | | | Fixes #283. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Make check_dir create directoriesNitroretro2020-05-011-3/+5
| | | | | | | | This patch makes check_dir(dir) create directories if they don't exist, and it will fail if the path at dir is not a directory. It acts in a similar fashion to io_check_dir from io.c. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* caldav: Fix XDG_CONFIG_HOME not defaulting to ~/.configNitroretro2020-02-041-1/+1
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Use $XDG_{CONFIG,DATA}_HOME in hooksNitroretro2019-12-233-19/+51
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-vdirsyncer: use $XDG_DATA_HOMENitroretro2019-12-231-1/+1
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: use $XDG_{CONFIG,DATA}_HOMENitroretro2019-12-231-5/+15
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Change documentation to reflect the new file structureNitroretro2019-12-236-17/+35
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Document configuration for YahooLukas Fleischer2019-11-091-3/+26
| | | | | Suggested-by: Tony Barganski <tonybarganski@outlook.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: handle objects with status code 404Si Yong Kim2019-11-031-0/+10
| | | | | | | | | Display a warning if any of the events reported by the server cannot be found instead of bailing out. Addresses GitHub issue #137 and #245. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Document the HTTPS option in the sample configuration filek0ral2019-09-061-0/+4
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Add Troubleshooting section to calcurse-caldav README.mdRandy Ramos2019-06-121-0/+10
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: replace readfp() by read_file()Lukas Fleischer2019-05-261-1/+1
| | | | | | Addresses GitHub issue #209. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: update OAuth2 documentation for extracting auth codeRandy Ramos2019-05-261-4/+4
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Add support for vdir synchronizationvxid2019-03-144-0/+328
| | | | | | | | | | | Add a script to synchronize calcurse with a VDIR collection. Add a wrapper script around vdirsyncer to automatically synchronize calcurse data to a vdirsyncer collection. Add script documentation and Makefile. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: add custom data directory supportvxid2019-03-121-11/+21
| | | | | | | Added the --datadir flag to calcurse-caldav which enables to specify a custom calcurse data directory similarly to the -D flag in calcurse. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: fix -x argumentLukas Fleischer2019-02-101-1/+1
| | | | | | | | The optional argument to -x must be given as "-xical" (without a space). Partly addresses GitHub issue #177. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: drop misplaced filter argumentLukas Fleischer2019-02-021-1/+0
| | | | | | | | | | | We cannot use the filter options when importing events. This was noticed because the new calcurse argument parser catches invalid input flag combinations and bails out. Partly addresses GitHub issue #177. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: fix authentication in debug modeBram2018-12-051-1/+1
| | | | | | | Objects are reference in python, ".pop" was modifying the original dictionary and thus breaking authentication by removing auth headers. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* contrib/caldav/Makefile.am: add config.sampleLukas Fleischer2018-10-211-1/+2
| | | | | | Fixes GitHub issue #144. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: fix auth method checkLukas Fleischer2018-09-271-5/+3
| | | | | | | | | Fixes a regression introduced in 6a6c711 (calcurse-caldav: fix basic authentication, 2018-07-20). Addresses GitHub issue #149. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: print executed commands in debug modeLukas Fleischer2018-08-251-5/+36
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: print HTTP status codes in debug modeLukas Fleischer2018-08-211-0/+1
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: fix basic authenticationDino Macri2018-07-221-0/+5
| | | | | | | Read whether basic authentication is used and add the credentials to httplib2 when making a request. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: add HTTP supportDino Macri2018-07-221-6/+18
| | | | | | | | | | | Introduce support for HTTP connections. Use "HTTPS" in the config file to enable/disable (default is enabled). The option modifies the prefix of the host name to "http://" when disabled, rather than always using "https://" with no option to change. httplib2 automatically handles URLs beginning with either http or https. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: remove authorization data from logsLukas Fleischer2018-05-231-1/+7
| | | | | | | | The Authorization header contains the Base64-encoded user name and password. Remove this information from debug logs, unless the user explicitly requests to keep them by using the --debug-raw flag. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Avoid corrupting the sync DBLukas Fleischer2017-11-231-2/+9
| | | | | | | | | When importing an iCal event via calcurse fails (i.e. does not return a single object hash), do not write anything to the synchronization database instead of blindly appending the entry, thereby potentially corrupting the database. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* contrib/caldav/README.md: Fix localhost URIRaf Czlonka2017-11-111-1/+1
| | | | | Signed-off-by: Raf Czlonka <rczlonka@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Document external password optionRandy Ramos2017-11-101-0/+8
| | | | | | | Add information about the CALCURSE_CALDAV_PASSWORD environment variable. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Read password from env variableRandy Ramos2017-11-101-3/+4
| | | | | | | | Add the option to read the basic authentication password from the CALCURSE_CALDAV_PASSWORD environment variable. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Revert "calcurse-caldav: Add --password command line argument"Lukas Fleischer2017-11-081-5/+3
| | | | | | | | | | This reverts commit efd76a0d995292e48f5466fccada4901618f7d97. Passing passwords as command line arguments is not a good idea, since they may appear in process listings which are potentially visible to other users logged into the system. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Add SyncFilter config optionSatvik Sharma2017-11-053-12/+53
| | | | | | | | The SyncFilter option filters the types of items synced from/to a CalDAV server by making use of the --filter-type command line argument. Signed-off-by: Satvik Sharma <satvik.sharma2@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Use /usr/bin/env in the shebangStefan Hagen2017-11-051-1/+1
| | | | | | | | | | | | It is best practice to use `/usr/bin/env python3` instead of a hard coded path. This will search for "python3" in the PATH environment variable. Most Linux distributions install python to "/usr/bin". Most BSDs to "/usr/local/bin". Signed-off-by: Stefan Hagen <github@textmail.me> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Add --password command line argumentRandy Ramos2017-10-191-3/+5
| | | | | | | | The "--password" argument overrides the corresponding option in the config file. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Add calcurse-dateutilLukas Fleischer2017-09-081-0/+77
| | | | | | | | | | | | | | | | | Add a script to iterate over a certain date range, performing operations on each of the dates and printing the result. An additional string can be appended to each of the printed lines. The script can be used to create "extended recurrent events". For example ./calcurse-dateutil.py --date 2017-01-01 --range 365 --unique \ --append ' [1] Test event' bom next-weekday 3 skip-days 14 can be used to print an event for each third Thursday of each month in 2017. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Update calcurse-caldav documentation for OAuth2Randy Ramos2017-09-081-0/+90
| | | | | | | | Append instructions and information on synchronization with OAuth2-based services, specifically Google Calendar. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Rename README to README.mdRandy Ramos2017-09-081-2/+2
| | | | | | | | | This ensures that the Markdown syntax is properly displayed by Github and other Markdown readers. Also added quotes to a couple of paths and a flag. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Add OAuth2 support for calcurse-caldavRandy Ramos2017-09-082-0/+124
| | | | | | | | | OAuth2 authentication is completely optional. It is controlled by the AuthMethod option in the config file. Other required options were appended to config.sample. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Refactor calcurse-caldav to use httplib2Randy Ramos2017-09-082-29/+17
| | | | | | | | | | This will allow much more flexibility and less code duplication when adding OAuth2 support. OAuth2 support will require this library as it is a dependency of oauth2client. The documentation was updated to reflect the new dependency. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Change remote_wipe to delete objects individuallyRandy Ramos2017-09-081-1/+3
| | | | | | | | | Certain CalDAV servers prohibit a single DELETE request to be sent to the calendar collection root. Instead items need to be deleted one by one. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* URL encode href before saving to sync.dbRandy Ramos2017-09-081-1/+2
| | | | | | | | | | When pushing objects, the unencoded uri path would be saved into the sync.db. The unencoded path and the encoded path from the server would be seen as two different objects, causing both to be resynced unnecessarily. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Specify depth in the initial requestLukas Fleischer2017-08-281-1/+3
| | | | | | | | | | For the initial calendar-query request, set the Depth header to 1. This is required because according to RFC 4791, the depth value defaults to 0 if no header is specified. Fixes GitHub issue #38. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Use right diffs when synchronizingLukas Fleischer2016-12-151-8/+8
| | | | | | | | | | | Some parameters where swapped accidentally when reworking the diff computation in c8d3d87 (calcurse-caldav: Compute diffs before synchronizing, 2016-12-13) such that the synchronization functions were working with incorrect diffs since that commit. Exchange the parameters again to fix this. Reported-by: Guillaume Laurès <guillaume@lauresfamily.fr> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Fix scrambled commentLukas Fleischer2016-12-131-2/+2
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Compute diffs before synchronizingLukas Fleischer2016-12-131-31/+29
| | | | | | | | Instead of computing the objects to push/pull on-demand, use a snapshot of the synchronization database taken before the synchronization process starts. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Fix appointment importsLukas Fleischer2016-12-081-0/+1
| | | | | | | | When importing an appointment from the server, make sure we store a hash of the item in the sync DB, and not the serialized item itself. Reported-by: Guillaume Laurès <guillaume@lauresfamily.fr> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Add debug output for sync DB operationsLukas Fleischer2016-12-081-5/+17
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Avoid empty multigetLukas Fleischer2016-12-081-0/+3
| | | | | | | When there are no new objects to pull from the server, skip the import routine instead of sending a query that requests zero items. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Split object addition and removalLukas Fleischer2016-12-081-18/+34
| | | | | | | | | | | | | | Instead of performing two synchronization steps (push/pull), split the synchronization protocol into four steps: 1. Retrieve new objects from the server. 2. Delete local objects that no longer exist on the server. 3. Push new objects to the server. 4. Delete remote objects that no longer exist locally. Each of the steps is performed by a separate function. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: Encode the request body in UTF-8Lukas Fleischer2016-06-181-0/+3
| | | | | | | | | When a string is passed to HTTPConnection.request(), it is automatically ISO 8859-1 encoded. Therefore, since we already specify UTF-8 as character set in the headers, we need to UTF-8 encode the request body manually. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Document the hooks featureLukas Fleischer2016-04-011-1/+16
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>