~sotirisp/today

today: Add TODAY_OPEN variable for decryption v2 APPLIED

Ángel Castañeda: 1
 Add TODAY_OPEN variable for decryption

 2 files changed, 6 insertions(+), 2 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sotirisp/today/patches/51713/mbox | git am -3
Learn more about email & git

[PATCH today v2] Add TODAY_OPEN variable for decryption Export this patch

---
v1 -> v2: s/TODAY_CAT/TODAY_OPEN/

 doc/today.1.scd | 6 +++++-
 today           | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/doc/today.1.scd b/doc/today.1.scd
index 0e08255..9ec53a6 100644
--- a/doc/today.1.scd
+++ b/doc/today.1.scd
@@ -61,6 +61,10 @@ appropriate environment variables.
	The suffix added after the date in journal filenames. Defaults to *.md*
	if unset.

*TODAY_OPEN*
	The command used to display each journal entry for *today* *log*. Useful
	for decrypting encrypted files. Defaults to *cat(1)* if unset.

*TODAY_CMD*
	The command used to edit a journal file. It is passed to *eval*(1). In
	addition to any environment variables, the following variables can be
@@ -94,7 +98,7 @@ patches can be submitted by email to ~sotirisp/today@lists.sr.ht.

# SEE ALSO

*eval*(1), *grep*(1), *more*(1), *vi*(1)
*cat*(1), *eval*(1), *grep*(1), *more*(1), *vi*(1)

; SPDX-FileCopyrightText: 2020-2023 Sotiris Papatheodorou
; SPDX-License-Identifier: GPL-3.0-or-later
diff --git a/today b/today
index ae4b90a..9f44318 100755
--- a/today
+++ b/today
@@ -144,7 +144,7 @@ view_files() (
	journal_files | sort $sort_args | while IFS= read -r f
	do
		printf '%s\n\n' "$(basename "$f" "$TODAY_SUFFIX")"
		cat "$f"
		${TODAY_OPEN:-cat} "$f"
		printf '\n\n\n'
	done | pager_if_terminal
)
-- 
2.45.0
Thanks! Expanded the documentation a bit and pushed.

Can you post the TODAY_CMD you're using for encrypted files please? I 
want to add a section about encrypted journal files in the manpage.

Sotiris