2023-10-21 21:16:36 +00:00
|
|
|
(defvar cv-cwd default-directory
|
|
|
|
"remember the current directory, find-file changes it")
|
|
|
|
(defvar cv-workdir "/tmp/org-cv-exports/")
|
2018-04-19 01:07:52 +00:00
|
|
|
|
2023-10-21 21:16:36 +00:00
|
|
|
(with-current-buffer (find-file-noselect "/tmp/install-org.el")
|
|
|
|
(emacs-lisp-byte-compile-and-load))
|
2018-04-19 01:07:52 +00:00
|
|
|
|
2023-10-21 21:16:36 +00:00
|
|
|
(add-to-list 'load-path cv-cwd)
|
2018-04-19 01:07:52 +00:00
|
|
|
|
2023-10-21 21:16:36 +00:00
|
|
|
(require 'ox-moderncv)
|
2018-04-19 01:07:52 +00:00
|
|
|
(require 'ox-altacv)
|
2021-07-07 08:30:32 +00:00
|
|
|
(require 'ox-awesomecv)
|
|
|
|
|
2023-10-21 21:16:36 +00:00
|
|
|
(let ((readme (concat cv-cwd "readme.org")))
|
|
|
|
(make-directory cv-workdir t)
|
|
|
|
(cd cv-workdir)
|
|
|
|
(with-current-buffer
|
|
|
|
(find-file-noselect readme)
|
|
|
|
(org-babel-tangle)))
|
2018-04-19 01:07:52 +00:00
|
|
|
|
2023-10-21 21:16:36 +00:00
|
|
|
(copy-file (concat cv-cwd "doc/smile.png") cv-workdir t)
|
2018-04-19 01:07:52 +00:00
|
|
|
|
2018-05-01 16:35:48 +00:00
|
|
|
(defun export-latex (backend file)
|
2023-10-21 21:16:36 +00:00
|
|
|
(let ((workfile (concat cv-workdir file))
|
|
|
|
(outfile (concat cv-workdir file ".tex")))
|
2018-04-19 01:07:52 +00:00
|
|
|
(message (format "%s exists: %s" workfile (file-exists-p workfile)))
|
|
|
|
(find-file workfile)
|
|
|
|
(org-mode)
|
2018-05-01 16:35:48 +00:00
|
|
|
(org-export-to-file backend outfile)
|
2021-07-07 08:30:32 +00:00
|
|
|
(shell-command (format "lualatex %s" outfile) "*Messages*" "*Messages*")
|
2023-10-21 21:16:36 +00:00
|
|
|
(copy-file (concat file ".pdf") (concat cv-cwd "/doc/static/" (concat file ".pdf")) t)))
|
2018-04-19 01:07:52 +00:00
|
|
|
|
2018-05-01 21:49:31 +00:00
|
|
|
(make-directory (concat cwd "/doc/static/") t)
|
2018-05-01 16:35:48 +00:00
|
|
|
(export-latex 'altacv "altacv.org")
|
|
|
|
(export-latex 'moderncv "moderncv.org")
|
2021-07-07 08:30:32 +00:00
|
|
|
(export-latex 'awesomecv "awesomecv.org")
|
|
|
|
(export-latex 'awesomecv "awesome-letter.org")
|