Selaa lähdekoodia

Added the org file indexer

Samuel W. Flint 8 vuotta sitten
vanhempi
commit
204b0e1653
1 muutettua tiedostoa jossa 23 lisäystä ja 0 poistoa
  1. 23 0
      org-file-index

+ 23 - 0
org-file-index

@@ -0,0 +1,23 @@
+#!/bin/zsh -f
+
+TODAY=`date +"<%Y-%m-%d %a %H:%M>"`
+
+rm ~/org/index.org
+
+cat <<EOF >> ~/org/index.org
+#+Title: Org File Index
+#+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
+
+for file in `find ~/org -name '*.org' -type f` ; do
+    TITLE=`echo ${file} | sed "s/\/home\/swflint\/org\/\\(.*\\)\.org/\1/g"`
+    echo " - [[file:${file}][${TITLE}]]" >> ~/org/index.org
+done