org-file-index 654 B

1234567891011121314151617181920212223
  1. #!/bin/zsh -f
  2. TODAY=`date +"<%Y-%m-%d %a %H:%M>"`
  3. rm ~/org/index.org
  4. cat <<EOF >> ~/org/index.org
  5. #+Title: Org File Index
  6. #+AUTHOR: Sam Flint
  7. #+EMAIL: swflint@flintfam.org
  8. #+DATE: ${TODAY}
  9. #+INFOJS_OPT: view:info toc:nil path:http://flintfam.org/org-info.js
  10. #+OPTIONS: toc:nil H:5 ':t *:t d:nil stat:nil todo:nil
  11. #+LATEX_CLASS_OPTIONS: [10pt,twocolumn]
  12. #+LATEX_HEADER: \usepackage[landscape,margin=0.125 in]{geometry}
  13. #+LATEX_HEADER: \pagestyle{empty}
  14. EOF
  15. for file in `find ~/org -name '*.org' -type f` ; do
  16. TITLE=`echo ${file} | sed "s/\/home\/swflint\/org\/\\(.*\\)\.org/\1/g"`
  17. echo " - [[file:${file}][${TITLE}]]" >> ~/org/index.org
  18. done