2028 Commits

Author SHA1 Message Date
Max
d4eb9f85d0 Remove new line character from result of password command
For example, using `pass caldav` as `PasswordCommand` returns the
password for the account including a newline character at the end
because the whole output is captured. This fix removes the new line
character at the end of the line while keeping other whitespace
character should the password contain any at the end.

Signed-off-by: Max <max@mxzero.net>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-11-06 15:42:59 -05:00
Benedikt Wildenhain
535088c809 Fix segmentation fault when exporting ical file
If a note file gets accidently deleted this leads to ical_export_note
trying to execute fclose(NULL) which leads to a segmentation fault on
current Debian GNU/Linux using libc6 (according to fclose's manpage, the
behaviour is undefined in this case).

The fix tests whether fopen returned a non-NULL-pointer before trying to
close it.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-11-05 14:14:51 -05:00
Lukas Fleischer
95bb55f68b README.md: add packaging status
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-06-03 13:31:59 -04:00
Lukas Fleischer
cf6306cf91 Release 4.8.1
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-05-22 14:19:49 -04:00
Lukas Fleischer
c886398bee Update Transifex config and catalog
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-05-22 14:19:49 -04:00
Lukas Fleischer
b0d94d4e84 Update apt index in GitHub workflow
Run `apt-get update` for Ubuntu to fix errors seen because of an
out-of-date index:

    E: Failed to fetch [...]  404  Not Found [IP: 40.119.46.219 80]
    E: Failed to fetch [...]  404  Not Found [IP: 40.119.46.219 80]
    E: Failed to fetch [...]  404  Not Found [IP: 40.119.46.219 80]

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-04-15 13:28:34 -04:00
Lukas Fleischer
b8b7a3a734 Fix characters in weekly view
Fixes GitHub issue #441.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-04-15 09:47:30 -04:00
Lukas Fleischer
ea9a98ca5d Upgrade configure.ac
Update outdated configure.ac by running autoupdate, followed by some
minor manual changes.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-04-14 23:02:25 -04:00
Lukas Fleischer
1c5eb9f962 Skip AsciiDoc checks if --disable-docs is used
Fixes GitHub issue #451.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-04-14 22:53:52 -04:00
Lukas Fleischer
213e5f86a5 Update copyright ranges for 2023
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-04-11 17:04:24 -04:00
Lukas Fleischer
98ff4dbacb Fix Mac OS GitHub workflow
Prior to this change, CI was failing with the following error:

    ==> Installing asciidoc dependency: python@3.11
    ==> Pouring python@3.11--3.11.3.monterey.bottle.tar.gz
    Error: The `brew link` step did not complete successfully
    The formula built, but is not symlinked into /usr/local
    Could not symlink bin/2to3
    Target /usr/local/bin/2to3
    already exists. You may want to remove it:
      rm '/usr/local/bin/2to3'

    To force the link and overwrite all conflicting files:
      brew link --overwrite python@3.11

    To list all files that would be deleted:
      brew link --overwrite --dry-run python@3.11

Explicitly link with overwrite.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-04-11 15:55:39 -04:00
Marian Buschsieweke
5394e981d9 Fix segfault when importing iCal files
Previously, events / appointments without a description resulted in
a segfault. This provides a trivial fix by adding an `<emtpy>` as
description in this case.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-04-11 15:25:27 -04:00
Ryan Lue
e772c4b6d5 calcurse-caldav: Support PasswordCommand option
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>
2023-04-11 15:22:03 -04:00
Nicholas Johnson
4cd300f2c4 Check that note files open before reading them
This fixes the scenario where a note file referenced by a todo, event,
or appointment is modified from outside the program in such a way that
it cannot be opened by the program, resulting in a segmentation fault.

The least surprising way to proceed is to ignore the note.

Signed-off-by: Nicholas Johnson <nick@nicksphere.ch>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-01-31 19:27:57 -05:00
Lukas Fleischer
ac5113640d Fix handling of recurrent open-ended appointments at 00:00
Prior to this commit, a recurrent appointment ending at 00:00 on a given
day was not considered to span the day. This is the correct behavior for
all cases, except appointments without end time (both starting and
ending at midnight on a given day). Handle this edge case explicitly.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-01-01 11:47:49 -05:00
Lukas Fleischer
ce6f8bf85b Extend default description to all item types
Show default description "(empty description)" for all types of items
(appointments, events, recurring appointments/events, TODOs).

Follow-up to 7b350ac (Add text for displaying empty event description,
2022-06-21).

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-12-25 16:36:27 -05:00
Jonathan van der Steege
7b350ac58f Add text for displaying empty event description
Signed-off-by: Jonathan van der Steege <jonathan@jonakeys.nl>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-12-25 15:13:52 -05:00
Lukas Fleischer
77ffe5d627 Release 4.8.0
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-04-16 18:31:14 -04:00
Lukas Fleischer
9fdf42c15f Update message catalog
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-04-16 18:31:14 -04:00
Lukas Fleischer
0ccd68bec6 calcurse-caldav: fix InsecureSSL
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>
2022-04-16 17:49:19 -04:00
Morgan Seltzer
a6f6620ea9 Cleaned up British English localization
Before colour was spelled inconsistently in various places, now it is
only spelled colour. Removed ~1000 lines of comments that were commented
out msgids that have not been used in many years. Also changed scattered
fuzzy translations (which default to using the english string) to
officially just use the english string.

Signed-off-by: Morgan Seltzer <MorganSeltzer000@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-04-15 14:06:01 -04:00
Morgan Seltzer
a1d2faab26 Layout change recognizes changed appointment space
Before a layout change did not update the maximum number of appointments
visible, until the config menu was exited. Now the maximum number of
appointments are visible immediately after the layout screen is exited.

Addresses GitHub issue #381

Signed-off-by: Morgan Seltzer <MorganSeltzer000@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-04-03 12:24:55 -04:00
Lars Henriksen
ec38714bbc Allow newlines in SUMMARY by replacing them with blanks
Addresses Github issue #414 (Android calendar allows them).

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-03-19 20:21:09 -04:00
Lukas Fleischer
01ad848628 Update copyright ranges for 2022
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-03-11 11:33:19 -05:00
Lukas Fleischer
a03a4710cc Fix compiler warning in SHA1 implementation
Update the signature of sha1_final() to fix the following warning:

    sha1.c:208:43: warning: argument 2 of type ‘uint8_t[20]’ {aka
    ‘unsigned char[20]’} with mismatched bound [-Warray-parameter=]

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-03-11 11:29:51 -05:00
Lukas Fleischer
20b23cc32e Fix SHA1 calculation on big-endian systems
Add the AC_C_BIGENDIAN macro to determine endianness and set
WORDS_BIGENDIAN accordingly.

Fixes GitHub issue #397.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-03-11 11:23:47 -05:00
Marco Sirabella
bea7349211 Use AX_WITH_CURSES for curses library discovery
Properly discovers libtinfow for customized systems (e.g., Gentoo) while
offloading search handling to autoconf builtins.

Additionally adds autoconf-archive as a buildtime dependency.

Fixes #250.

Signed-off-by: Marco Sirabella <marco@sirabella.org>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-11-07 11:36:59 -05:00
Daniel J. Perry
154339b5f1 Add autopoint as a dependency in README
Signed-off-by: Daniel J. Perry <dperry45@gatech.edu>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-10-16 11:54:45 -04:00
Joseph Turner
459a018e90 Fix typo in caldav post-sync hook git commit message
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-10-16 11:54:45 -04:00
Marco Sirabella
1351f8f0fe Use ./configure passed --docdir for doc install dir
If any --docdir is passed, the app can't find the builtin documentation

Just inherit docdir from configure now, which defaults to the same thing
but if overridden will act proper now.

Related: https://bugs.gentoo.org/813438

Signed-off-by: Marco Sirabella <marco@sirabella.org>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-10-16 11:19:13 -04:00
nobody
2b766040a9 Make Home/End keys work as expected in text input mode
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-08-07 13:52:53 -04:00
Morgan Seltzer
ee8ebebf92 First day of week can now be any day
Previously only Sunday and Monday were allowed as the first day of the
week, and this was internally treated as a binary variable.

This patch allows for users to change the first day of the week to any
day.

Addresses GitHub feature request #321.

Signed-off-by: Morgan Seltzer <MorganSeltzer000@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-08-07 13:42:28 -04:00
Morgan Seltzer
e3fc73e0c7 Backend changes for first day of week
Previously only Sunday and Monday were allowed for the first day of the
week, and was internally treated as a binary variable.

This patch changes the backend so all days are accepted, a future patch
will allow users to actually select other days.

Addresses GitHub feature request #321.

Signed-off-by: Morgan Seltzer <MorganSeltzer000@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-08-07 13:42:10 -04:00
Morgan Seltzer
61ed5f835c Fixed sidebar config sometime not increasing width
The sidebar has a numerical mimumum width that is statically defined,
and users may set the width of the sidebar in config by incrementing the
percentage of the screen between this minimum and a maximum value of
50%. However, internally the mimimum percentage could be set as low as
zero, and while that did not decrease the sidebar size below the
numerical minimum width, did mean that between 0 and the mimimum width
increasing the percentage had no visual effect to indicate change. Now
the mimimum percent is not decremented below the mimimum width.

Signed-off-by: Morgan Seltzer <MorganSeltzer000@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-08-07 13:37:29 -04:00
Dhruva Sambrani
31b3a5390b Fix hook docs
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-08-07 13:35:31 -04:00
mercurialmoon
a49adf2db7 Allow configuration of appointment time format
Added the option to configure the format in which appointment time is
displayed. The setting is called "format.appointmenttime" under the
general settings menu. Setting defaults to previous behavior, which was
"%H:%M".

Signed-off-by: mercurialmoon <mercurialmoon@protonmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-11 19:52:02 -04:00
Aurora
9b148900b8 Add generic-prev-view key binding
This can be used to cycle backwards through windows (similarly to
generic-change-view).

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-11 19:48:17 -04:00
Lars Henriksen
338c640a19 Allow undefined actions in keys configuration file
In the keys file there are three possibilities for each action:

1. One or several keys are assigned to it
2. It is marked as UNDEFINED (new)
3. It is missing from the file

On load of the keys file, calcurse respectively

1. Assigns the key(s)
2. Assigns "UNDEFINED" (new)
3. Assigns a default key if possible

If default keys were assigned, the user is informed of the number of
actions affected, and the keys file is updated.

After load each action must either have keys assigned or be undefined.
If not, calcurse exits with a failure. If there are syntax/semantic
errors in the file, calcurse rejects the file and exits.

When an interactive user leaves the keys configuration menu, a warning
is issued if any action is UNDEFINED. The keys file is always updated.

Addresses GitHub issue #298.

Additionally: Description of concepts and data structures used for
keyboard keys and virtual keys (actions) as well as name changes and
comments to improve readability.

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-11 19:46:11 -04:00
Lukas Fleischer
6e6663c5dd Release 4.7.1
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-10 16:50:32 -04:00
Lukas Fleischer
3d0cc429d9 po/: translation updates from Transifex
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-10 09:14:10 -04:00
Max Deineko
cb6b3340f8 calcurse-caldav: always request href from server
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>
2021-04-04 18:35:03 -04:00
Lukas Fleischer
5398f3a24e Call setsid() for hook/notification commands
We do not want hook or notification commands to interact with the
terminal in any way. Create a new session for them.

Addresses GitHub issue #326.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-04 12:15:31 -04:00
Lukas Fleischer
193ad3415a Redirect standard descriptors for hook/notify commands
Disconnect stdin, stdout and stderr when running an external hook or
notification command. The previous solution of appending "<&- >&- 2>&-"
to the shell command line does not work if the command includes pipes.

Use shell_exec() in notify_launch_cmd() instead of a custom (and
incomplete) reimplementation of that command.

Partially addresses GitHub issue #326.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-04 12:15:31 -04:00
Lukas Fleischer
5710a8bd7f Add parameter to redirect stderr to shell_exec()
Add a function parameter to allows redirecting stderr in addition to
stdin and stdout. The parameter will be used with a follow-up change.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-04 12:15:26 -04:00
Lukas Fleischer
f41955e491 calcurse-caldav: document Hostname and Path better
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>
2021-04-03 18:12:31 -04:00
Lukas Fleischer
be5cf3578d README.md: add build badges
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-03 18:12:31 -04:00
Lukas Fleischer
81c26f8fd5 Add GitHub Actions workflow lint_python
Run codespell, flake8, and isort for each change to one of the scripts
in contrib/.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-03 18:12:31 -04:00
Lukas Fleischer
3e8bba2fd1 Replace Travis CI with GitHub Actions configuration
Replace the Travis CI configuration with an equivalent GitHub Actions
workflow.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-03 18:12:31 -04:00
Lukas Fleischer
b36e603997 Do not use readlink(1) in tests
Avoid using readlink(1) which is not POSIX-compatible; moreover,
`readlink -f` is not available on Mac OS by default.

Instead, always convert $CALCURSE to an absolute path (that may or may
not be canonical, i.e., be a symlink or contain ../ as component) in
test-init.sh by prepending the current working directory if the original
path is relative. While not fully equivalent to `readlink -f`, this
should be good enough for use in our tests.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-03 17:55:46 -04:00
Lukas Fleischer
f1e84bd18b Fix flake8 and isort warnings
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2021-04-03 17:55:46 -04:00