123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #!/bin/sh
- YEAR=`date +"%Y"`
- # Create the journal file
- if [ ! -e "${HOME}/org/journal/${YEAR}.org.gpg" ] ; then
- touch "${HOME}/org/journal/${YEAR}.org"
- cat <<EOF > "${HOME}/org/journal/${YEAR}.org"
- # -*- epa-file-encrypt-to: ("266596F4") -*-
- #+Title: Journal ${YEAR}
- #+AUTHOR: Sam Flint
- #+EMAIL: swflint@flintfam.org
- #+DATE: \today
- #+INFOJS_OPT: view:info toc:nil path:http://flintfam.org/org-info.js
- #+OPTIONS: toc:nil H:5 ':t *:t d:nil stat:nil todo:nil
- #+LATEX_CLASS_OPTIONS: [10pt,twocolumn]
- #+LATEX_HEADER: \usepackage[landscape,margin=0.125 in]{geometry}
- #+LATEX_HEADER: \pagestyle{empty}
- EOF
- gpg -e -r 266596F4 "${HOME}/org/journal/${YEAR}.org"
- rm "${HOME}/org/journal/${YEAR}.org"
- fi
- echo "${HOME}/org/journal/${YEAR}.org.gpg"
- if [ ! -e "${HOME}/org/notes/${YEAR}.org" ] ; then
- touch "${HOME}/org/notes/${YEAR}.org"
- cat <<EOF > "${HOME}/org/notes/${YEAR}.org"
- #+Title: Notes from ${YEAR}
- #+AUTHOR: Sam Flint
- #+EMAIL: swflint@flintfam.org
- #+DATE: \today
- #+INFOJS_OPT: view:info toc:nil path:http://flintfam.org/org-info.js
- #+OPTIONS: toc:nil H:5 ':t *:t d:nil stat:nil todo:nil
- #+LATEX_CLASS_OPTIONS: [10pt,twocolumn]
- #+LATEX_HEADER: \usepackage[landscape,margin=0.125 in]{geometry}
- #+LATEX_HEADER: \pagestyle{empty}
- EOF
- fi
- echo "${HOME}/org/notes/${YEAR}.org"
- cd "${HOME}/org/" || exit 1
- git add "journal/${YEAR}.org.gpg" && git commit -m "Added the journal file for ${YEAR}"
- git add "notes/${YEAR}.org" && git commit -m "Added the notes file for ${YEAR}"
|