AutoYADM commit: 2025-04-23 01:30:05
This commit is contained in:
parent
78a71ecbb7
commit
7c1f0cfa88
1 changed files with 18 additions and 15 deletions
|
@ -45,36 +45,38 @@ function jrnl --description 'Lightweight journaling tool'
|
|||
switch $response
|
||||
case y Y
|
||||
begin
|
||||
echo "# $(date +'%A, %b %d, %Y')"\n
|
||||
echo '# %{date}'\n
|
||||
echo '<!-- Use the %{date} placeholder for the date. -->'
|
||||
echo '<!-- Comments will be ignored. -->'
|
||||
|
||||
echo "## Gratitude"\n
|
||||
# echo "## Gratitude"\n
|
||||
|
||||
echo "I'm grateful for ..."\n
|
||||
# echo "I'm grateful for ..."\n
|
||||
|
||||
echo "## + Wins"\n
|
||||
# echo "## + Wins"\n
|
||||
|
||||
echo "- small_victories"\n
|
||||
# echo "- small_victories"\n
|
||||
|
||||
echo "## - Challenges"\n
|
||||
# echo "## - Challenges"\n
|
||||
|
||||
echo "- hard_things"\n
|
||||
# echo "- hard_things"\n
|
||||
|
||||
echo "## Reflection"\n
|
||||
# echo "## Reflection"\n
|
||||
|
||||
echo "_One sentence to reflect on today:_"\n
|
||||
# echo "_One sentence to reflect on today:_"\n
|
||||
|
||||
echo "- reflection"\n
|
||||
# echo "- reflection"\n
|
||||
|
||||
echo "## Learned"\n
|
||||
# echo "## Learned"\n
|
||||
|
||||
echo "- fact_insight_or_skill"\n
|
||||
# echo "- fact_insight_or_skill"\n
|
||||
|
||||
echo "## Tomorrow"\n
|
||||
# echo "## Tomorrow"\n
|
||||
|
||||
echo "- prep"\n
|
||||
# echo "- prep"\n
|
||||
end >$template
|
||||
eval $EDITOR $template
|
||||
set -f new_template
|
||||
break
|
||||
case n N
|
||||
break
|
||||
end
|
||||
|
@ -87,6 +89,7 @@ function jrnl --description 'Lightweight journaling tool'
|
|||
set entry "$jdir/$today.md"
|
||||
# check if journal entry exists
|
||||
if not test -f $entry
|
||||
set contents (string join \n "# $today" "$(tail -n +2 $template)" | string collect -N)
|
||||
cat $template >$entry
|
||||
set -l prompt "Created $entry, open in $EDITOR? (y/n)"
|
||||
while read --nchars 1 -l response --prompt-str="$prompt" or return 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue