org-journal-file-current-year 686 B

123456789101112131415161718192021222324
  1. #!/bin/zsh -f
  2. YEAR=`date +"%Y"`
  3. if [[ ! -e ~/org/journal/${YEAR}.org.gpg ]] ; then
  4. touch ~/org/journal/${YEAR}.org
  5. cat <<EOF > ~/org/journal/${YEAR}.org
  6. # -*- epa-file-encrypt-to: ("266596F4") -*-
  7. #+Title: Journal ${YEAR}
  8. #+AUTHOR: Sam Flint
  9. #+EMAIL: swflint@flintfam.org
  10. #+DATE: \today
  11. #+INFOJS_OPT: view:info toc:nil path:http://flintfam.org/org-info.js
  12. #+OPTIONS: toc:nil H:5 ':t *:t d:nil stat:nil todo:nil
  13. #+LATEX_CLASS_OPTIONS: [10pt,twocolumn]
  14. #+LATEX_HEADER: \usepackage[landscape,margin=0.125 in]{geometry}
  15. #+LATEX_HEADER: \pagestyle{empty}
  16. EOF
  17. gpg -e -r 266596F4 ~/org/journal/${YEAR}.org
  18. rm ~/org/journal/${YEAR}.org
  19. fi
  20. echo ~/org/journal/${YEAR}.org.gpg