descriptionmy resume
ownerjr0@riseup.net
last changeThu, 26 Dec 2019 18:18:56 +0000 (26 13:18 -0500)
content tags
add:
readme.org
# -*- org-src-preserve-indentation: t -*-
#+TITLE: James' Résumé publishing tool
#+AUTHOR: James Richardson

* My Résumé
:PROPERTIES:
:ID:       9eef74e1-83b4-4621-a121-426b817276b6
:END:
This my resume in [[http://orgmode.org/][org-mode]]. Actually it is the readme about my
résumé. It started out as my résumé and readme, but I moved the résumé [[file:resume.org][here]]

** Why? (or should this be why not?)
:PROPERTIES:
:ID:       e1518b97-f95d-452d-9e8c-3756f80562ff
:END:
This is my attempt to be really geeky and have an +markdown+ org-mode
resume. I was using [[http://daringfireball.net/projects/markdown/][markdown]] with [[http://johnmacfarlane.net/pandoc/][pandoc]], which worked nicely for
generating markdown -> LaTeX -> pdf. I seem to be moving everything
else[fn:1] to org-mode, though the resume would be a good fit.

org-mode gives me this:
1. ability to publish to html, pdf, odf, and a plethora of other
   formats.
2. hook into my agenda 
3. everything else org-mode offers.


* project publish
:PROPERTIES:
:ID:       8b527b65-7462-4328-b97b-537811cfdab1
:END:
Define the project here, such that this file can be loaded into
=emacs= and cause the website to be updated automatically. This means,
also, that the project shouldn't be defined in my normal =emacs=,
otherwise they probably won't stay in sync. 

#+begin_listing
#+name: setup
#+begin_src emacs-lisp :tangle yes :noweb yes
(require 'ox-html)
(setq this-directory (file-name-directory (or load-file-name buffer-file-name)))
;;(setq pub-directory "/ssh:resume.jamestechnotes.com:/home/public/")
(setq pub-directory "~/public_html/resume.jamestechnotes.com")
(setq org-publish-timestamp-directory (concat (or (when (boundp 'temporary-file-directory) temporary-file-directory)
						  "/tmp/")
					      ".org-timestamps/"))
(setq org-html-htmlize-output-type 'css)

(unless (boundp 'org-publish-project-alist)
  (setq org-publish-project-alist nil))

(add-to-list
 'org-publish-project-alist
 `("resume-content"
   :base-directory ,this-directory
   :base-extension "org"
   :publishing-directory ,(expand-file-name pub-directory)
   :publishing-function (org-html-publish-to-html org-latex-publish-to-pdf)
   :recursvie t
   :headline-levels 6
   :auto-preamble nil
   :auto-sitemap nil
   :makeindex nil
   :html-head-include-default-style nil
   :html-head-include-scripts nil
   :html-head-extra "<link rel=\"stylesheet\" title=\"Default\" href=\"/css/stylesheet.css\" type=\"text/css\" />
  <script src=\"/js/org.js\"></script>
  <link rel=author href=\"https://plus.google.com/u/0/100087072360376597478?rel=author\" />"
   :completion-function (jr-resume-content-rename-resume-to-index)
   ))

(add-to-list
 'org-publish-project-alist
 '("resume" :components ("resume-content")))

(defun jr-resume-content-rename-resume-to-index ()
  "Rename resume.html to index.html after publish."
  (let* ((pub-dir (file-name-as-directory (plist-get project-plist :publishing-directory))))
    (princ (file-name-as-directory (plist-get project-plist :publishing-directory)))
    (princ project-plist)
    (princ "james")
    (let ((default-directory pub-dir))
      (rename-file (expand-file-name "resume.html" pub-dir) (expand-file-name "index.html") t))))
#+end_src
#+end_listing
* Tools
:PROPERTIES:
:ID:       5b53908a-bc3c-4637-9676-bade5966668f
:END:
I would like to make this thing as stand alone as possible, but the
proper incantation escapes me. I have a script in =$HOME/bin= that
will take care of the bootstrap, which consists of the following:
+ if =$TMP/resume= doesn't exist, execute =cd $TMP;git checkout git://git.jamestechnotes.com/james/wiki/resume.git=
+ if =$TMP/resume= exists, execute =cd $TMP/resume;git pull=
+ execute =emacs --batch --no-initfile --eval "(require 'org)" --eval '(org-babel-tangle-file "readme.org" nil "makefile")'=
I should then have a =Makefile= that will publish the site.

#+begin_listing
#+name: makefile
#+begin_src makefile -i  :tangle Makefile :padline no :comments yes
EMACS=emacs

BATCH=$(EMACS) --batch --no-init-file --directory ~/src/org-mode/lisp \
            --eval '(setq safe-local-variable-values (quote ((org-confirm-babel-evaluate) (org-src-preserve-indentation .t))))' \
            --eval "(require 'org)" \
	    --eval "(setq org-confirm-babel-evaluate nil)" \
            --eval "(org-babel-do-load-languages 'org-babel-load-languages \
                     '((emacs-lisp . t) \
                      (sh . t) \
                      (makefile . t)))" \
            --eval '(org-babel-load-file "readme.org")'

FILES = resume.org

all: Makefile resume

resume: $(FILES)
	$(BATCH) --visit "$<" --eval '(org-publish "resume")'
	$(BATCH) --visit "$<" --eval "(princ 'this-directory)"

Makefile: readme.org
	$(BATCH) --visit "$<" --funcall org-babel-tangle
#+end_src
#+end_listing

* Footnotes
:PROPERTIES:
:ID:       42743822-6c5a-4037-9d66-493c63160279
:END:

[fn:1] [[http://jamestechnotes.com][HomePage]], todo/planning, even emacs initialization.
shortlog
2019-12-26 James RichardsonUpdates location to resumesmaster
2017-02-10 James Richardsonupdates
2016-11-15 James Richardson add sitemap
2016-11-15 James Richardsonupdates
2016-11-15 James Richardsonupdates
2016-11-15 James Richardsonimport experience
2016-11-15 IkiWikicreating index page css
2016-11-15 IkiWikicreating index page js
2016-11-15 James Richardsontest
2016-11-13 James RichardsonMerge branch 'master' into develop
2016-11-13 James Richardsonupdates
2016-11-13 James Richardsonupdates
2016-11-13 James Richardsonupdate
2016-11-13 James Richardsonupdates
2016-11-13 James Richardsonno comments on this site
2016-11-13 James Richardsonadding meta file
...
heads
4 years ago master