diff options
author | Matthew Lemon <chaffinach+git@protonmail.ch> | 2022-01-14 11:11:18 +0000 |
---|---|---|
committer | Matthew Lemon <chaffinach+git@protonmail.ch> | 2022-01-14 11:11:18 +0000 |
commit | 53d7717f9a9fd45706ffcb4892b9edd46f05afe4 (patch) | |
tree | 55bef6948542ce98953f4bdcf9c5cf02da3463d1 /_tj | |
parent | 715ee043aff6a0d1367ac3dac0fd7daa35976248 (diff) |
now includes tasklog in the template
Diffstat (limited to '')
-rwxr-xr-x | _tj | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -6,19 +6,22 @@ TODAY_JOURNAL=~/Notes/journal/$(date +\%Y-\%m-\%d).md # Test whether it already exisits or not if [[ -a $TODAY_JOURNAL ]] then - while read line + while read -r line do JLINE="- $(date +'%H:%M'): $line" - echo $JLINE >> "$TODAY_JOURNAL" + echo "$JLINE" >> "$TODAY_JOURNAL" done < "${1:-/dev/stdin}" else - touch $TODAY_JOURNAL + touch "$TODAY_JOURNAL" header_date="$(date +'%A %d %b %Y')" - echo -e "# $header_date\n" >> $TODAY_JOURNAL - while read line + { echo -e "# $header_date\n" + echo -e "## Tasklog\n" + echo -e "## Journal\n" + } >> "$TODAY_JOURNAL" + while read -r line do JLINE="- $(date +'%H:%M'): $line" - echo $JLINE >> "$TODAY_JOURNAL" + echo "$JLINE" >> "$TODAY_JOURNAL" done < "${1:-/dev/stdin}" fi |