Skip to content

Commit

Permalink
feat: decrypt tex files before editing them
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjayankur31 committed Apr 28, 2022
1 parent e7e8f9f commit 4b765fa
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions calliope.sh
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,12 @@ create_anthology ()
edit_latest ()
{
latest_diary_entry=$(ls $diary_dir/$year/$year*tex | tail -1)
$MY_EDITOR "$latest_diary_entry"
pushd $diary_dir/$year/
latest_diary_entry=$(ls $year*tex* | tail -1)
decrypt "$latest_diary_entry"
outputfile="$(basename $latest_diary_entry .gpg)"
$MY_EDITOR "$outputfile"
popd
}
edit_specific ()
Expand All @@ -376,7 +380,10 @@ edit_specific ()
echo "$diary_dir/$year/ does not exist. Exiting."
exit -1
fi
$MY_EDITOR "$diary_dir/$year/$entry_to_edit.tex"
pushd "$diary_dir/$year/"
decrypt "$entry_to_edit.tex.gpg"
$MY_EDITOR "$entry_to_edit.tex"
popd
}
view_specific ()
Expand Down

0 comments on commit 4b765fa

Please sign in to comment.