1 # -*- org-src-preserve-indentation: t -*-
2 #+TITLE: James' Résumé publishing tool
3 #+AUTHOR: James Richardson
7 :ID: 9eef74e1-83b4-4621-a121-426b817276b6
9 This my resume in [[http://orgmode.org/][org-mode]]. Actually it is the readme about my
10 résumé. It started out as my résumé and readme, but I moved the résumé [[file:resume.org][here]]
12 ** Why? (or should this be why not?)
14 :ID: e1518b97-f95d-452d-9e8c-3756f80562ff
16 This is my attempt to be really geeky and have an +markdown+ org-mode
17 resume. I was using [[http://daringfireball.net/projects/markdown/][markdown]] with [[http://johnmacfarlane.net/pandoc/][pandoc]], which worked nicely for
18 generating markdown -> LaTeX -> pdf. I seem to be moving everything
19 else[fn:1] to org-mode, though the resume would be a good fit.
21 org-mode gives me this:
22 1. ability to publish to html, pdf, odf, and a plethora of other
24 2. hook into my agenda
25 3. everything else org-mode offers.
30 :ID: 8b527b65-7462-4328-b97b-537811cfdab1
32 Define the project here, such that this file can be loaded into
33 =emacs= and cause the website to be updated automatically. This means,
34 also, that the project shouldn't be defined in my normal =emacs=,
35 otherwise they probably won't stay in sync.
39 #+begin_src emacs-lisp :tangle yes :noweb yes
41 (setq this-directory (file-name-directory (or load-file-name buffer-file-name)))
42 ;;(setq pub-directory "/ssh:resume.jamestechnotes.com:/home/public/")
43 (setq pub-directory "~/public_html/resume.jamestechnotes.com")
44 (setq org-publish-timestamp-directory (concat (or (when (boundp 'temporary-file-directory) temporary-file-directory)
47 (setq org-html-htmlize-output-type 'css)
49 (unless (boundp 'org-publish-project-alist)
50 (setq org-publish-project-alist nil))
53 'org-publish-project-alist
55 :base-directory ,this-directory
57 :publishing-directory ,(expand-file-name pub-directory)
58 :publishing-function (org-html-publish-to-html org-latex-publish-to-pdf)
64 :html-head-include-default-style nil
65 :html-head-include-scripts nil
66 :html-head-extra "<link rel=\"stylesheet\" title=\"Default\" href=\"/css/stylesheet.css\" type=\"text/css\" />
67 <script src=\"/js/org.js\"></script>
68 <link rel=author href=\"https://plus.google.com/u/0/100087072360376597478?rel=author\" />"
69 :completion-function (jr-resume-content-rename-resume-to-index)
73 'org-publish-project-alist
74 '("resume" :components ("resume-content")))
76 (defun jr-resume-content-rename-resume-to-index ()
77 "Rename resume.html to index.html after publish."
78 (let* ((pub-dir (file-name-as-directory (plist-get project-plist :publishing-directory))))
79 (princ (file-name-as-directory (plist-get project-plist :publishing-directory)))
82 (let ((default-directory pub-dir))
83 (rename-file (expand-file-name "resume.html" pub-dir) (expand-file-name "index.html") t))))
88 :ID: 5b53908a-bc3c-4637-9676-bade5966668f
90 I would like to make this thing as stand alone as possible, but the
91 proper incantation escapes me. I have a script in =$HOME/bin= that
92 will take care of the bootstrap, which consists of the following:
93 + if =$TMP/resume= doesn't exist, execute =cd $TMP;git checkout git://git.jamestechnotes.com/james/wiki/resume.git=
94 + if =$TMP/resume= exists, execute =cd $TMP/resume;git pull=
95 + execute =emacs --batch --no-initfile --eval "(require 'org)" --eval '(org-babel-tangle-file "readme.org" nil "makefile")'=
96 I should then have a =Makefile= that will publish the site.
100 #+begin_src makefile -i :tangle Makefile :padline no :comments yes
103 BATCH=$(EMACS) --batch --no-init-file --directory ~/src/org-mode/lisp \
104 --eval '(setq safe-local-variable-values (quote ((org-confirm-babel-evaluate) (org-src-preserve-indentation .t))))' \
105 --eval "(require 'org)" \
106 --eval "(setq org-confirm-babel-evaluate nil)" \
107 --eval "(org-babel-do-load-languages 'org-babel-load-languages \
111 --eval '(org-babel-load-file "readme.org")'
118 $(BATCH) --visit "$<" --eval '(org-publish "resume")'
119 $(BATCH) --visit "$<" --eval "(princ 'this-directory)"
122 $(BATCH) --visit "$<" --funcall org-babel-tangle
128 :ID: 42743822-6c5a-4037-9d66-493c63160279
131 [fn:1] [[http://jamestechnotes.com][HomePage]], todo/planning, even emacs initialization.