diary-read-all (332B)
1 #!/bin/bash 2 ENTRIES_DIR=${DIARY_DIRECTORY:-"/Users/synox/diary"} 3 GPG_CMD=${DIARY_GPG:-"gpg2"} 4 READER=${DIARY_READER:-"less"} 5 ( 6 for file in $ENTRIES_DIR/*.txt*; do 7 echo "--------------------------- $(basename "$file" .gpg) -----------------------------" 8 $GPG_CMD --decrypt --output "-" --yes --quiet "$file" 9 echo 10 done 11 ) | $READER