mirror of
https://gitlab.com/Titan-C/org-cv.git
synced 2024-11-14 10:38:29 +00:00
update genfiles
This commit is contained in:
parent
e3146f494c
commit
bab87823e2
1 changed files with 17 additions and 19 deletions
36
genfiles.el
36
genfiles.el
|
@ -1,36 +1,34 @@
|
|||
;; remember the current directory, find-file changes it
|
||||
(defvar cwd default-directory)
|
||||
(defvar workdir "/tmp/org-cv-exports/")
|
||||
(find-file "/tmp/install-org.el")
|
||||
(eval-buffer)
|
||||
(defvar cv-cwd default-directory
|
||||
"remember the current directory, find-file changes it")
|
||||
(defvar cv-workdir "/tmp/org-cv-exports/")
|
||||
|
||||
(add-to-list 'load-path cwd)
|
||||
(with-current-buffer (find-file-noselect "/tmp/install-org.el")
|
||||
(emacs-lisp-byte-compile-and-load))
|
||||
|
||||
(add-to-list 'load-path cv-cwd)
|
||||
|
||||
(require 'ox-moderncv)
|
||||
|
||||
(require 'ox-altacv)
|
||||
|
||||
(require 'ox-awesomecv)
|
||||
|
||||
(let ((readme (concat cwd "readme.org")))
|
||||
(find-file readme)
|
||||
(make-directory workdir t)
|
||||
(cd workdir)
|
||||
(org-babel-tangle))
|
||||
(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)))
|
||||
|
||||
(copy-file (concat cwd "doc/smile.png") workdir t)
|
||||
(copy-directory "/root/texmf/tex/latex/Awesome-CV-master/fonts" workdir)
|
||||
(copy-file (concat cv-cwd "doc/smile.png") cv-workdir t)
|
||||
|
||||
(defun export-latex (backend file)
|
||||
(let ((workfile (concat workdir file))
|
||||
(outfile (concat workdir file ".tex")))
|
||||
(let ((workfile (concat cv-workdir file))
|
||||
(outfile (concat cv-workdir file ".tex")))
|
||||
(message (format "%s exists: %s" workfile (file-exists-p workfile)))
|
||||
(find-file workfile)
|
||||
(org-mode)
|
||||
(org-export-to-file backend outfile)
|
||||
(shell-command (format "lualatex %s" outfile) "*Messages*" "*Messages*")
|
||||
(copy-file (concat file ".pdf") (concat cwd "/doc/static/" (concat file ".pdf")) t)
|
||||
))
|
||||
(copy-file (concat file ".pdf") (concat cv-cwd "/doc/static/" (concat file ".pdf")) t)))
|
||||
|
||||
(make-directory (concat cwd "/doc/static/") t)
|
||||
(export-latex 'altacv "altacv.org")
|
||||
|
|
Loading…
Reference in a new issue