aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
Commit message (Collapse)AuthorAgeFilesLines
* calcurse-caldav: Support PasswordCommand optionRyan Lue2023-04-113-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a new `Auth/PasswordCommand` option to support security best practices re: handling secrets in CLI program configuration. Prior to this commit, the two available options for specifying a password were: 1. via the `Auth/Password` config parameter, or 2. via a `$CALCURSE_CALDAV_PASSWORD` environment variable. The former is unsafe for obvious reasons; the latter is unsafe because as long as the script is running, its environment can be accessed via $ cat /proc/<pid>/environ and is thus visible to anyone with access to the system. This commit preserves preexisting behavior (for backward compatibility) but removes all mention of option 2 from the README. Since the README example for option 2 used a password command anyway, there is little reason to continue its use, and this commit recommends it be deprecated. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: fix InsecureSSLLukas Fleischer2022-04-161-3/+1
| | | | | | | | | | | | Pass disable_ssl_certificate_validation as keyword argument to httplib2.Http(). Fixes a regression introduced in 1e1d615 (Refactor calcurse-caldav to use httplib2, 2017-09-06). Fixes GitHub issue #420. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Fix typo in caldav post-sync hook git commit messageJoseph Turner2021-10-161-1/+1
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: always request href from serverMax Deineko2021-04-041-10/+12
| | | | | | | | | | | | | | | Apparently, while some CalDAV servers return href values as is in their response, some might return them URL-quoted (which, if I am not mistaken, was the reason for e943b06). Assuming either behaviour when pushing local objects will lead to discrepancy with events dictionary retrieved from the server and thus bugs, hence we always want to use whatever form of href the server returns. Addresses GitHub issues #337 and #356. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: document Hostname and Path betterLukas Fleischer2021-04-031-2/+4
| | | | | | | | | Add some clarification on the expected format for the Hostname and Path options in the sample configuration file. Addresses GitHub issues #95, #138, and #354. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Fix flake8 and isort warningsLukas Fleischer2021-04-032-6/+12
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: improve config file error handlingLukas Fleischer2021-04-031-91/+100
| | | | | | | | | | | | | | The previous implementation allowed sections and keys other than those used by the script which led to a variety of bug reports due to typos in the configuration. Disallow entries other than those explicitly used and make both section and key names case-sensitive (previously, only section names where case-sensitive). Check that Hostname and Path are set before using them. Addresses GitHub issues #327 and #350. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* calcurse-caldav: allow non-ascii characters in username and passwordHenrik Grimler2020-12-191-2/+2
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Icalendar templates for recurrence rulesLars Henriksen2020-06-136-0/+66
| | | | | | | To provide a starting point for advanced repeating items. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* 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>