From e2610a21040e4e0e9a8cecf9e62fe90d9885e786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Wed, 18 Apr 2018 19:22:01 +0200 Subject: [PATCH 01/32] start tutorial --- readme.org | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/readme.org b/readme.org index 380bee2..e03cd5c 100644 --- a/readme.org +++ b/readme.org @@ -10,11 +10,47 @@ # This is for syntax highlight #+LaTeX_HEADER: \usepackage{minted} #+LaTeX_HEADER: \usemintedstyle{friendly} -#+LaTeX_HEADER: \newminted{common-lisp}{fontsize=\footnotesize} -This project aims on generating from an orgmode file with reasonably ordered -items of live to export to a latex file which compiles into a reasonably -nice CV. +This project aims to generate from an org-mode file with reasonably ordered +items a latex file which compiles into a reasonably nice CV. In the same +spirit the org-mode file must export to markdown so that it can be uses for +web based CV. +* Installation + +* Basic Org file +#+BEGIN_SRC text :tangle basic_cv.org +,#+TITLE: My dream job +,#+AUTHOR: John Doe + +,#+ADDRESS: My Awesome crib +,#+ADDRESS: Fantastic city -- Planet Earth +,#+MOBILE: (+9) 87654321 +,#+HOMEPAGE: example.com +,#+GITHUB: Titan-C +,#+GITLAB: Titan-C +,#+PHOTO: smile.jpg +,* Employement +,** One job +:PROPERTIES: +:CV_ENV: cventry +:FROM: <2014-09-01> +:TO: <2017-12-07> +:LOCATION: a city, a country +:EMPLOYER: The employer +:END: +I write about awesome stuff I do. +,* Other stuff I do +- I work a lot +- I sleep a lot +- I eat a lot +,* Languages +I like languages: strict and human +#+END_SRC + +* Latex Exporter +** Using modern-cv +I first started using latex modern-cv styles as the target for my CV. +** Using alta-cv * Update readme ** TODO examples [0/2] From b9e720a0be6b230671d0ce750941eaa5c3690af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Wed, 18 Apr 2018 23:02:48 +0200 Subject: [PATCH 02/32] document installation of moderncv and altacv --- readme.org | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 80 insertions(+), 2 deletions(-) diff --git a/readme.org b/readme.org index e03cd5c..4af7050 100644 --- a/readme.org +++ b/readme.org @@ -16,8 +16,24 @@ items a latex file which compiles into a reasonably nice CV. In the same spirit the org-mode file must export to markdown so that it can be uses for web based CV. * Installation +This project is not on MELPA so you have to do a manual installation. First +clone this git repository. +#+BEGIN_SRC bash +git clone https://gitlab.com/Titan-C/org-cv.git +#+END_SRC + +There are various modules to perform the export. As of now =ox-moderncv=, +=ox-altacv=, =ox-hugocv=. Choose any or all that you prefer for install. I +use =use-package= to manage my installed packages like this. + +#+BEGIN_SRC emacs-lisp +(use-package ox-moderncv + :load-path "~/dev/org-cv/" + :init (require 'ox-moderncv)) +#+END_SRC * Basic Org file +The basic structure of an org file containing your CV is shown next. #+BEGIN_SRC text :tangle basic_cv.org ,#+TITLE: My dream job ,#+AUTHOR: John Doe @@ -29,6 +45,7 @@ web based CV. ,#+GITHUB: Titan-C ,#+GITLAB: Titan-C ,#+PHOTO: smile.jpg + ,* Employement ,** One job :PROPERTIES: @@ -49,9 +66,70 @@ I like languages: strict and human * Latex Exporter ** Using modern-cv -I first started using latex modern-cv styles as the target for my CV. -** Using alta-cv +[[https://www.ctan.org/tex-archive/macros/latex/contrib/moderncv][moderncv]] is a standard \(\LaTeX\) package that you can find in many of your +latex distributions. For I maintain for personal purposes a fork of it to +better work with my use case at https://github.com/Titan-C/moderncv.git +Feel free to use any or even your personal fork for your desired use case. +To configure the export for moderncv you need the addition options in your +org file. +#+BEGIN_SRC org +# CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking' +,#+CVSTYLE: banking +# CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black' +,#+CVCOLOR: green +#+END_SRC + +When exporting you can call the following function to get the latex file. +#+BEGIN_SRC emacs-lisp :exports none +(org-export-to-file 'moderncv "moderncv.tex") +#+END_SRC + +or you can have a hook to do the export when you save a file. +#+BEGIN_SRC org +# Local Variables: +# eval: (add-hook 'after-save-hook #'org-hugo-export-wim-to-md-after-save :append :local) +# End: +#+END_SRC +** Using alta-cv +[[https://github.com/liantze/AltaCV][AltaCV]] is another project to generate a CV, you will need to install it +yourself. I maintain a fork too at https://github.com/Titan-C/AltaCV.git +because I need extra features and I encourage to use this for on the +sections branch. + +The style of this CV is more involved and you need some configuration in +your org file to get it to work. First define the margins, the large margin +to the right is to allow for a second column. +#+BEGIN_SRC text +#+LATEX_HEADER: \geometry{left=1cm,right=9cm,marginparwidth=6.8cm,marginparsep=1.2cm,top=1.25cm,bottom=1.25cm} +#+END_SRC +Content on the right column has the same structure of a org file, but you +need to enclose it in the =\marginpar{}= command as shown next. +#+BEGIN_SRC text +#+latex: \marginpar{ + +* Main Interests +- Free/Libre and Open Source Software (FLOSS) +- Free food +- Free beer + +* Programming Languages +- Python +- C/C++ +- EmacsLisp +- Bash +- JavaScript +- PHP + +* Languages + +- *English* Fluent +- *German* Fluent +- *Spanish* Native +- *French* Intermediate + +#+latex: } +#+END_SRC * Update readme ** TODO examples [0/2] *** TODO pictures From 3a11122b4d8887218633a77ca4c9cf85b50b8d91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Wed, 18 Apr 2018 23:07:19 +0200 Subject: [PATCH 03/32] styling blocks --- readme.org | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/readme.org b/readme.org index 4af7050..f838d99 100644 --- a/readme.org +++ b/readme.org @@ -34,7 +34,7 @@ use =use-package= to manage my installed packages like this. * Basic Org file The basic structure of an org file containing your CV is shown next. -#+BEGIN_SRC text :tangle basic_cv.org +#+BEGIN_SRC org :tangle basic_cv.org ,#+TITLE: My dream job ,#+AUTHOR: John Doe @@ -56,6 +56,7 @@ The basic structure of an org file containing your CV is shown next. :EMPLOYER: The employer :END: I write about awesome stuff I do. + ,* Other stuff I do - I work a lot - I sleep a lot @@ -81,7 +82,7 @@ org file. #+END_SRC When exporting you can call the following function to get the latex file. -#+BEGIN_SRC emacs-lisp :exports none +#+BEGIN_SRC emacs-lisp (org-export-to-file 'moderncv "moderncv.tex") #+END_SRC @@ -100,20 +101,21 @@ sections branch. The style of this CV is more involved and you need some configuration in your org file to get it to work. First define the margins, the large margin to the right is to allow for a second column. -#+BEGIN_SRC text -#+LATEX_HEADER: \geometry{left=1cm,right=9cm,marginparwidth=6.8cm,marginparsep=1.2cm,top=1.25cm,bottom=1.25cm} +#+BEGIN_SRC org +,#+LATEX_HEADER: \geometry{left=1cm,right=9cm,marginparwidth=6.8cm,marginparsep=1.2cm,top=1.25cm,bottom=1.25cm} #+END_SRC Content on the right column has the same structure of a org file, but you need to enclose it in the =\marginpar{}= command as shown next. -#+BEGIN_SRC text -#+latex: \marginpar{ -* Main Interests +#+BEGIN_SRC org +,#+latex: \marginpar{ + +,* Main Interests - Free/Libre and Open Source Software (FLOSS) - Free food - Free beer -* Programming Languages +,* Programming Languages - Python - C/C++ - EmacsLisp @@ -121,15 +123,16 @@ need to enclose it in the =\marginpar{}= command as shown next. - JavaScript - PHP -* Languages +,* Languages - *English* Fluent - *German* Fluent - *Spanish* Native - *French* Intermediate -#+latex: } +,#+latex: } #+END_SRC + * Update readme ** TODO examples [0/2] *** TODO pictures From 4177c668592325d8ef249e7fb34b82a5ff7accec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Wed, 18 Apr 2018 23:24:09 +0200 Subject: [PATCH 04/32] describe options --- readme.org | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/readme.org b/readme.org index f838d99..13a7293 100644 --- a/readme.org +++ b/readme.org @@ -34,6 +34,22 @@ use =use-package= to manage my installed packages like this. * Basic Org file The basic structure of an org file containing your CV is shown next. +** Personal contact information +=TITLE= and =AUTHOR= are standard org options. But on =TITLE= you put your +foreseen job. + +| Field | Description | +|----------+----------------------------------------------------| +| TITLE | Desired job | +| AUTHOR | Who you are? | +| ADDRESS | Mailing address, this can span over multiple lines | +| HOMEPAGE | URL of your website | +| MOBILE | Mobile phone | +| GITHUB | GitHub user | +| GITLAB | GitLab user | +| LINKEDIN | Linkedin username | +| PHOTO | path to photo file | + #+BEGIN_SRC org :tangle basic_cv.org ,#+TITLE: My dream job ,#+AUTHOR: John Doe @@ -44,8 +60,16 @@ The basic structure of an org file containing your CV is shown next. ,#+HOMEPAGE: example.com ,#+GITHUB: Titan-C ,#+GITLAB: Titan-C +,#+LINKEDIN: oscar-najera ,#+PHOTO: smile.jpg +#+END_SRC +You can use org-modes hierarchical structure to describe your CV. To make a +specific subtree an item describing an experience point (Job you have, +degree you pursued, etc.) you use the org properties drawer and with the +=:CV_ENV: cventry= property. You should also include the =FROM= and =TO= +properties defining the span of the event, as =LOCATION= and =EMPLOYER=. +#+BEGIN_SRC org :tangle workcontent.org ,* Employement ,** One job :PROPERTIES: @@ -55,16 +79,14 @@ The basic structure of an org file containing your CV is shown next. :LOCATION: a city, a country :EMPLOYER: The employer :END: + I write about awesome stuff I do. ,* Other stuff I do - I work a lot - I sleep a lot - I eat a lot -,* Languages -I like languages: strict and human #+END_SRC - * Latex Exporter ** Using modern-cv [[https://www.ctan.org/tex-archive/macros/latex/contrib/moderncv][moderncv]] is a standard \(\LaTeX\) package that you can find in many of your From f60778e5d7f5a47cd6a43f796a37125a8efaca71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Wed, 18 Apr 2018 23:35:46 +0200 Subject: [PATCH 05/32] construct the exports --- readme.org | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/readme.org b/readme.org index 13a7293..ff404b4 100644 --- a/readme.org +++ b/readme.org @@ -80,6 +80,16 @@ properties defining the span of the event, as =LOCATION= and =EMPLOYER=. :EMPLOYER: The employer :END: +I write about awesome stuff I do. +,** Other job +:PROPERTIES: +:CV_ENV: cventry +:FROM: <2013-09-01> +:TO: <2014-08-07> +:LOCATION: my city, your country +:EMPLOYER: The other employer +:END: + I write about awesome stuff I do. ,* Other stuff I do @@ -96,13 +106,19 @@ Feel free to use any or even your personal fork for your desired use case. To configure the export for moderncv you need the addition options in your org file. -#+BEGIN_SRC org +#+BEGIN_SRC org :tangle moderncv.org # CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking' ,#+CVSTYLE: banking # CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black' ,#+CVCOLOR: green #+END_SRC +# Next block is to generate exports +#+BEGIN_SRC org :exports none :tangle moderncv.org +#+include: basic_cv.org +#+include: sideactivities.org +#+include: workcontent.org +#+END_SRC When exporting you can call the following function to get the latex file. #+BEGIN_SRC emacs-lisp (org-export-to-file 'moderncv "moderncv.tex") @@ -123,15 +139,19 @@ sections branch. The style of this CV is more involved and you need some configuration in your org file to get it to work. First define the margins, the large margin to the right is to allow for a second column. -#+BEGIN_SRC org +#+BEGIN_SRC org :tangle altacv.org ,#+LATEX_HEADER: \geometry{left=1cm,right=9cm,marginparwidth=6.8cm,marginparsep=1.2cm,top=1.25cm,bottom=1.25cm} #+END_SRC +# Next block is to generate exports +#+BEGIN_SRC org :exports none :tangle altacv.org +#+include: basic_cv.org +#+END_SRC Content on the right column has the same structure of a org file, but you need to enclose it in the =\marginpar{}= command as shown next. - -#+BEGIN_SRC org +#+BEGIN_SRC org :tangle altacv.org ,#+latex: \marginpar{ - +#+END_SRC +#+BEGIN_SRC org :tangle sideactivities.org ,* Main Interests - Free/Libre and Open Source Software (FLOSS) - Free food @@ -151,9 +171,18 @@ need to enclose it in the =\marginpar{}= command as shown next. - *German* Fluent - *Spanish* Native - *French* Intermediate - +#+END_SRC +# Next block is to generate exports +#+BEGIN_SRC org :exports none :tangle altacv.org +#+include: sideactivities.org +#+END_SRC +#+BEGIN_SRC org :tangle altacv.org ,#+latex: } #+END_SRC +# Next block is to generate exports +#+BEGIN_SRC org :exports none :tangle altacv.org +#+include: workcontent.org +#+END_SRC * Update readme ** TODO examples [0/2] From 71c33fc77d8d03bdbe18d18735c4c684b5d882dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Thu, 19 Apr 2018 00:44:54 +0200 Subject: [PATCH 06/32] start with landing page and documentation --- .gitlab-ci.yml | 15 ++++++ .gitmodules | 3 ++ doc/config.toml | 23 ++++++++++ doc/content/img/intro-bg.svg | 65 ++++++++++++++++++++++++++ doc/content/post/basic_config.md | 75 ++++++++++++++++++++++++++++++ doc/content/post/installation.md | 23 ++++++++++ doc/content/post/latex_export.md | 78 ++++++++++++++++++++++++++++++++ doc/themes/project-landing-page | 1 + readme.org | 60 ++++++++++++------------ 9 files changed, 314 insertions(+), 29 deletions(-) create mode 100644 .gitlab-ci.yml create mode 100644 .gitmodules create mode 100644 doc/config.toml create mode 100644 doc/content/img/intro-bg.svg create mode 100644 doc/content/post/basic_config.md create mode 100644 doc/content/post/installation.md create mode 100644 doc/content/post/latex_export.md create mode 160000 doc/themes/project-landing-page diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..4ce3e65 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,15 @@ +image: najeraoscar/latex-emacs-min + +test: + script: + - apt-get update + - wget https://github.com/gohugoio/hugo/releases/download/v0.39/hugo_0.39_Linux-64bit.deb + - dpkg -i hugo*.deb + - hugo version + - cd doc; hugo + except: + - master + + artifacts: + paths: + - doc/public diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..60df6fe --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "doc/themes/project-landing-page"] + path = doc/themes/project-landing-page + url = https://github.com/nsomar/github-project-landing-page.git diff --git a/doc/config.toml b/doc/config.toml new file mode 100644 index 0000000..747b5f0 --- /dev/null +++ b/doc/config.toml @@ -0,0 +1,23 @@ +baseURL = "http://example.org/" +languageCode = "en-us" +title = "Org CV backend export" +theme = "project-landing-page" + +[params] + description = "Org-mode backend exporters for CV" + author_url = "http://blog.oscarnajera.com" + author = "Titan-C" + project_url = "https://gitlab.com/Titan-C/org-cv/" + + first_color="#f8f8f8" + first_border_color="#e7e7e7" + first_text_color="#333" + + second_color="white" + second_text_color="#333" + + header_color="#f8f8f8" + header_text_color="rgb(51, 51, 51)" + + header_link_color="#777" + header_link_hover_color="rgb(51, 51, 51)" diff --git a/doc/content/img/intro-bg.svg b/doc/content/img/intro-bg.svg new file mode 100644 index 0000000..b823836 --- /dev/null +++ b/doc/content/img/intro-bg.svg @@ -0,0 +1,65 @@ + + + + app-icon-board + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/content/post/basic_config.md b/doc/content/post/basic_config.md new file mode 100644 index 0000000..5b4d1d4 --- /dev/null +++ b/doc/content/post/basic_config.md @@ -0,0 +1,75 @@ ++++ +title = "Basic Org file" +author = ["Óscar Nájera"] +draft = false +weight = 1002 ++++ + +The basic structure of an org file containing your CV is shown next. + + +## Personal contact information {#personal-contact-information} + +`TITLE` and `AUTHOR` are standard org options. But on `TITLE` you put your +foreseen job. + +| Field | Description | +|----------|----------------------------------------------------| +| TITLE | Desired job | +| AUTHOR | Who you are? | +| ADDRESS | Mailing address, this can span over multiple lines | +| HOMEPAGE | URL of your website | +| MOBILE | Mobile phone | +| GITHUB | GitHub user | +| GITLAB | GitLab user | +| LINKEDIN | Linkedin username | +| PHOTO | path to photo file | + +```org +#+TITLE: My dream job +#+AUTHOR: John Doe + +#+ADDRESS: My Awesome crib +#+ADDRESS: Fantastic city -- Planet Earth +#+MOBILE: (+9) 87654321 +#+HOMEPAGE: example.com +#+GITHUB: Titan-C +#+GITLAB: Titan-C +#+LINKEDIN: oscar-najera +#+PHOTO: smile.jpg +``` + +You can use org-modes hierarchical structure to describe your CV. To make a +specific subtree an item describing an experience point (Job you have, +degree you pursued, etc.) you use the org properties drawer and with the +`:CV_ENV: cventry` property. You should also include the `FROM` and `TO` +properties defining the span of the event, as `LOCATION` and `EMPLOYER`. + +```org +* Employement +** One job +:PROPERTIES: +:CV_ENV: cventry +:FROM: <2014-09-01> +:TO: <2017-12-07> +:LOCATION: a city, a country +:EMPLOYER: The employer +:END: + +I write about awesome stuff I do. +** Other job +:PROPERTIES: +:CV_ENV: cventry +:FROM: <2013-09-01> +:TO: <2014-08-07> +:LOCATION: my city, your country +:EMPLOYER: The other employer +:END: + +I write about awesome stuff I do. + +* Other stuff I do +- I work a lot +- I sleep a lot +- I eat a lot +``` diff --git a/doc/content/post/installation.md b/doc/content/post/installation.md new file mode 100644 index 0000000..154ada4 --- /dev/null +++ b/doc/content/post/installation.md @@ -0,0 +1,23 @@ ++++ +title = "Installation" +author = ["Óscar Nájera"] +draft = false +weight = 1001 ++++ + +This project is not on MELPA so you have to do a manual installation. First +clone this git repository. + +```bash +git clone https://gitlab.com/Titan-C/org-cv.git +``` + +There are various modules to perform the export. As of now `ox-moderncv`, +`ox-altacv`, `ox-hugocv`. Choose any or all that you prefer for install. I +use `use-package` to manage the installation for example of `ox-moderncv`. + +```emacs-lisp +(use-package ox-moderncv + :load-path "path_to_repository/org-cv/" + :init (require 'ox-moderncv)) +``` diff --git a/doc/content/post/latex_export.md b/doc/content/post/latex_export.md new file mode 100644 index 0000000..6c6b4db --- /dev/null +++ b/doc/content/post/latex_export.md @@ -0,0 +1,78 @@ ++++ +title = "Latex Exporter" +author = ["Óscar Nájera"] +draft = false +weight = 1003 ++++ + +## Using modern-cv {#using-modern-cv} + +[moderncv](https://www.ctan.org/tex-archive/macros/latex/contrib/moderncv) is a standard \\(\LaTeX\\) package that you can find in many of your +latex distributions. For I maintain for personal purposes a fork of it to +better work with my use case at +Feel free to use any or even your personal fork for your desired use case. + +To configure the export for moderncv you need the addition options in your +org file. + +```org +# CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking' +#+CVSTYLE: banking +# CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black' +#+CVCOLOR: green +``` + +When exporting you can call the following function to get the latex file. + +```emacs-lisp +(org-export-to-file 'moderncv "moderncv.tex") +``` + + +## Using alta-cv {#using-alta-cv} + +[AltaCV](https://github.com/liantze/AltaCV) is another project to generate a CV, you will need to install it +yourself. I maintain a fork too at +because I need extra features and I encourage to use this for on the +sections branch. + +The style of this CV is more involved and you need some configuration in +your org file to get it to work. First define the margins, the large margin +to the right is to allow for a second column. + +```org +#+LATEX_HEADER: \geometry{left=1cm,right=9cm,marginparwidth=6.8cm,marginparsep=1.2cm,top=1.25cm,bottom=1.25cm} +``` + +Content on the right column has the same structure of a org file, but you +need to enclose it in the `\marginpar{}` command as shown next. + +```org +#+latex: \marginpar{ +``` + +```org +* Main Interests +- Free/Libre and Open Source Software (FLOSS) +- Free food +- Free beer + +* Programming Languages +- Python +- C/C++ +- EmacsLisp +- Bash +- JavaScript +- PHP + +* Languages + +- *English* Fluent +- *German* Fluent +- *Spanish* Native +- *French* Intermediate +``` + +```org +#+latex: } +``` diff --git a/doc/themes/project-landing-page b/doc/themes/project-landing-page new file mode 160000 index 0000000..b639b77 --- /dev/null +++ b/doc/themes/project-landing-page @@ -0,0 +1 @@ +Subproject commit b639b771b6b799629a7e7e9b4ab068bcda423d7c diff --git a/readme.org b/readme.org index ff404b4..f239b28 100644 --- a/readme.org +++ b/readme.org @@ -1,21 +1,19 @@ #+TITLE: Org exporter for curriculum vitae #+AUTHOR: Óscar Nájera #+EMAIL: hello@oscarnajera.com -#+DATE: 2018 Mar 22 -#+LATEX_HEADER: \usepackage[top=2cm,bottom=2.5cm,left=3cm,right=3cm]{geometry} -#+LATEX_HEADER: \usepackage{indentfirst} -#+LATEX_CLASS_OPTIONS: [a4paper,12pt] -#+STARTUP: hideblocks -#+OPTIONS: toc:nil num:nil -# This is for syntax highlight -#+LaTeX_HEADER: \usepackage{minted} -#+LaTeX_HEADER: \usemintedstyle{friendly} + +#+HUGO_BASE_DIR: doc +#+HUGO_SECTION: post +#+HUGO_WEIGHT: auto This project aims to generate from an org-mode file with reasonably ordered items a latex file which compiles into a reasonably nice CV. In the same spirit the org-mode file must export to markdown so that it can be uses for web based CV. * Installation + :PROPERTIES: + :EXPORT_FILE_NAME: installation + :END: This project is not on MELPA so you have to do a manual installation. First clone this git repository. #+BEGIN_SRC bash @@ -24,15 +22,18 @@ git clone https://gitlab.com/Titan-C/org-cv.git There are various modules to perform the export. As of now =ox-moderncv=, =ox-altacv=, =ox-hugocv=. Choose any or all that you prefer for install. I -use =use-package= to manage my installed packages like this. +use =use-package= to manage the installation for example of =ox-moderncv=. #+BEGIN_SRC emacs-lisp (use-package ox-moderncv - :load-path "~/dev/org-cv/" + :load-path "path_to_repository/org-cv/" :init (require 'ox-moderncv)) #+END_SRC * Basic Org file + :PROPERTIES: + :EXPORT_FILE_NAME: basic_config + :END: The basic structure of an org file containing your CV is shown next. ** Personal contact information =TITLE= and =AUTHOR= are standard org options. But on =TITLE= you put your @@ -50,7 +51,7 @@ foreseen job. | LINKEDIN | Linkedin username | | PHOTO | path to photo file | -#+BEGIN_SRC org :tangle basic_cv.org +#+BEGIN_SRC org :tangle doc/basic_cv.org ,#+TITLE: My dream job ,#+AUTHOR: John Doe @@ -69,7 +70,7 @@ specific subtree an item describing an experience point (Job you have, degree you pursued, etc.) you use the org properties drawer and with the =:CV_ENV: cventry= property. You should also include the =FROM= and =TO= properties defining the span of the event, as =LOCATION= and =EMPLOYER=. -#+BEGIN_SRC org :tangle workcontent.org +#+BEGIN_SRC org :tangle doc/workcontent.org ,* Employement ,** One job :PROPERTIES: @@ -98,6 +99,10 @@ I write about awesome stuff I do. - I eat a lot #+END_SRC * Latex Exporter + :PROPERTIES: + :EXPORT_FILE_NAME: latex_export + :END: + ** Using modern-cv [[https://www.ctan.org/tex-archive/macros/latex/contrib/moderncv][moderncv]] is a standard \(\LaTeX\) package that you can find in many of your latex distributions. For I maintain for personal purposes a fork of it to @@ -106,7 +111,7 @@ Feel free to use any or even your personal fork for your desired use case. To configure the export for moderncv you need the addition options in your org file. -#+BEGIN_SRC org :tangle moderncv.org +#+BEGIN_SRC org :tangle doc/moderncv.org # CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking' ,#+CVSTYLE: banking # CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black' @@ -114,7 +119,7 @@ org file. #+END_SRC # Next block is to generate exports -#+BEGIN_SRC org :exports none :tangle moderncv.org +#+BEGIN_SRC org :exports none :tangle doc/moderncv.org #+include: basic_cv.org #+include: sideactivities.org #+include: workcontent.org @@ -123,13 +128,6 @@ When exporting you can call the following function to get the latex file. #+BEGIN_SRC emacs-lisp (org-export-to-file 'moderncv "moderncv.tex") #+END_SRC - -or you can have a hook to do the export when you save a file. -#+BEGIN_SRC org -# Local Variables: -# eval: (add-hook 'after-save-hook #'org-hugo-export-wim-to-md-after-save :append :local) -# End: -#+END_SRC ** Using alta-cv [[https://github.com/liantze/AltaCV][AltaCV]] is another project to generate a CV, you will need to install it yourself. I maintain a fork too at https://github.com/Titan-C/AltaCV.git @@ -139,19 +137,19 @@ sections branch. The style of this CV is more involved and you need some configuration in your org file to get it to work. First define the margins, the large margin to the right is to allow for a second column. -#+BEGIN_SRC org :tangle altacv.org +#+BEGIN_SRC org :tangle doc/altacv.org ,#+LATEX_HEADER: \geometry{left=1cm,right=9cm,marginparwidth=6.8cm,marginparsep=1.2cm,top=1.25cm,bottom=1.25cm} #+END_SRC # Next block is to generate exports -#+BEGIN_SRC org :exports none :tangle altacv.org +#+BEGIN_SRC org :exports none :tangle doc/altacv.org #+include: basic_cv.org #+END_SRC Content on the right column has the same structure of a org file, but you need to enclose it in the =\marginpar{}= command as shown next. -#+BEGIN_SRC org :tangle altacv.org +#+BEGIN_SRC org :tangle doc/altacv.org ,#+latex: \marginpar{ #+END_SRC -#+BEGIN_SRC org :tangle sideactivities.org +#+BEGIN_SRC org :tangle doc/sideactivities.org ,* Main Interests - Free/Libre and Open Source Software (FLOSS) - Free food @@ -173,14 +171,14 @@ need to enclose it in the =\marginpar{}= command as shown next. - *French* Intermediate #+END_SRC # Next block is to generate exports -#+BEGIN_SRC org :exports none :tangle altacv.org +#+BEGIN_SRC org :exports none :tangle doc/altacv.org #+include: sideactivities.org #+END_SRC -#+BEGIN_SRC org :tangle altacv.org +#+BEGIN_SRC org :tangle doc/altacv.org ,#+latex: } #+END_SRC # Next block is to generate exports -#+BEGIN_SRC org :exports none :tangle altacv.org +#+BEGIN_SRC org :exports none :tangle doc/altacv.org #+include: workcontent.org #+END_SRC @@ -225,3 +223,7 @@ getting down the subtrees and getting to the latex output. This looks like a fancy way to avoid repetition. Have a look too trying to imitate that behavior for the other personal tags of social media,url,phones. * DONE Markdown exporter for integration with hugo blog +* Local Variables :ARCHIVE: +# Local Variables: +# eval: (add-hook 'after-save-hook #'org-hugo-export-wim-to-md-after-save :append :local) +# End: From 5c798b9068e7700ca89b6a5568a59f70f8d599ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Thu, 19 Apr 2018 03:07:52 +0200 Subject: [PATCH 07/32] building the cv files --- doc/content/post/basic_config.md | 2 +- doc/smile.png | Bin 0 -> 4946 bytes genfiles.el | 33 +++++++++++++++++++++++++++++++ readme.org | 24 +++++++++++----------- 4 files changed, 46 insertions(+), 13 deletions(-) create mode 100644 doc/smile.png create mode 100644 genfiles.el diff --git a/doc/content/post/basic_config.md b/doc/content/post/basic_config.md index 5b4d1d4..73e96ed 100644 --- a/doc/content/post/basic_config.md +++ b/doc/content/post/basic_config.md @@ -36,7 +36,7 @@ foreseen job. #+GITHUB: Titan-C #+GITLAB: Titan-C #+LINKEDIN: oscar-najera -#+PHOTO: smile.jpg +#+PHOTO: smile.png ``` You can use org-modes hierarchical structure to describe your CV. To make a diff --git a/doc/smile.png b/doc/smile.png new file mode 100644 index 0000000000000000000000000000000000000000..96ca071b6a3f4bd657ef279056d949a84a632981 GIT binary patch literal 4946 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 Q6aWAK07*qoM6N<$g51kn)&Kwi literal 0 HcmV?d00001 diff --git a/genfiles.el b/genfiles.el new file mode 100644 index 0000000..754df70 --- /dev/null +++ b/genfiles.el @@ -0,0 +1,33 @@ +;; 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) + +(add-to-list 'load-path cwd) + +(require 'ox-moderncv) + +(require 'ox-altacv) + +(let ((readme (concat cwd "readme.org"))) + (find-file readme) + (make-directory workdir t) + (cd workdir) + (org-babel-tangle)) + +(copy-file (concat cwd "doc/smile.png") workdir) + +(defun export-latex (file) + (let ((workfile (concat workdir file)) + (outfile (concat workdir file ".tex"))) + (message (format "%s exists: %s" workfile (file-exists-p workfile))) + (find-file workfile) + (org-mode) + (org-export-to-file 'altacv outfile) + (org-latex-compile outfile) + )) + +(export-latex "altacv.org") +(message "yo") +(copy-directory workdir cwd) diff --git a/readme.org b/readme.org index f239b28..098cf57 100644 --- a/readme.org +++ b/readme.org @@ -51,7 +51,7 @@ foreseen job. | LINKEDIN | Linkedin username | | PHOTO | path to photo file | -#+BEGIN_SRC org :tangle doc/basic_cv.org +#+BEGIN_SRC org :tangle basic_cv.org ,#+TITLE: My dream job ,#+AUTHOR: John Doe @@ -62,7 +62,7 @@ foreseen job. ,#+GITHUB: Titan-C ,#+GITLAB: Titan-C ,#+LINKEDIN: oscar-najera -,#+PHOTO: smile.jpg +,#+PHOTO: smile.png #+END_SRC You can use org-modes hierarchical structure to describe your CV. To make a @@ -70,7 +70,7 @@ specific subtree an item describing an experience point (Job you have, degree you pursued, etc.) you use the org properties drawer and with the =:CV_ENV: cventry= property. You should also include the =FROM= and =TO= properties defining the span of the event, as =LOCATION= and =EMPLOYER=. -#+BEGIN_SRC org :tangle doc/workcontent.org +#+BEGIN_SRC org :tangle workcontent.org ,* Employement ,** One job :PROPERTIES: @@ -111,7 +111,7 @@ Feel free to use any or even your personal fork for your desired use case. To configure the export for moderncv you need the addition options in your org file. -#+BEGIN_SRC org :tangle doc/moderncv.org +#+BEGIN_SRC org :tangle moderncv.org # CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking' ,#+CVSTYLE: banking # CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black' @@ -119,7 +119,7 @@ org file. #+END_SRC # Next block is to generate exports -#+BEGIN_SRC org :exports none :tangle doc/moderncv.org +#+BEGIN_SRC org :exports none :tangle moderncv.org #+include: basic_cv.org #+include: sideactivities.org #+include: workcontent.org @@ -137,19 +137,19 @@ sections branch. The style of this CV is more involved and you need some configuration in your org file to get it to work. First define the margins, the large margin to the right is to allow for a second column. -#+BEGIN_SRC org :tangle doc/altacv.org +#+BEGIN_SRC org :tangle altacv.org ,#+LATEX_HEADER: \geometry{left=1cm,right=9cm,marginparwidth=6.8cm,marginparsep=1.2cm,top=1.25cm,bottom=1.25cm} #+END_SRC # Next block is to generate exports -#+BEGIN_SRC org :exports none :tangle doc/altacv.org +#+BEGIN_SRC org :exports none :tangle altacv.org #+include: basic_cv.org #+END_SRC Content on the right column has the same structure of a org file, but you need to enclose it in the =\marginpar{}= command as shown next. -#+BEGIN_SRC org :tangle doc/altacv.org +#+BEGIN_SRC org :tangle altacv.org ,#+latex: \marginpar{ #+END_SRC -#+BEGIN_SRC org :tangle doc/sideactivities.org +#+BEGIN_SRC org :tangle sideactivities.org ,* Main Interests - Free/Libre and Open Source Software (FLOSS) - Free food @@ -171,14 +171,14 @@ need to enclose it in the =\marginpar{}= command as shown next. - *French* Intermediate #+END_SRC # Next block is to generate exports -#+BEGIN_SRC org :exports none :tangle doc/altacv.org +#+BEGIN_SRC org :exports none :tangle altacv.org #+include: sideactivities.org #+END_SRC -#+BEGIN_SRC org :tangle doc/altacv.org +#+BEGIN_SRC org :tangle altacv.org ,#+latex: } #+END_SRC # Next block is to generate exports -#+BEGIN_SRC org :exports none :tangle doc/altacv.org +#+BEGIN_SRC org :exports none :tangle altacv.org #+include: workcontent.org #+END_SRC From ec217f1f0e87957a39a3b285e4990a3bf1d4abfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Thu, 19 Apr 2018 03:15:16 +0200 Subject: [PATCH 08/32] try to debug container --- genfiles.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/genfiles.el b/genfiles.el index 754df70..1760810 100644 --- a/genfiles.el +++ b/genfiles.el @@ -25,7 +25,7 @@ (find-file workfile) (org-mode) (org-export-to-file 'altacv outfile) - (org-latex-compile outfile) + (shell-command (format "latexmk -pdf %s" outfile)) )) (export-latex "altacv.org") From 027cd076961332f921b30b910d92cb0ad35185d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Thu, 19 Apr 2018 13:19:05 +0200 Subject: [PATCH 09/32] install wget in container --- .gitlab-ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4ce3e65..0ab92ff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,10 +2,14 @@ image: najeraoscar/latex-emacs-min test: script: - - apt-get update + - apt-get update && apt install wget - wget https://github.com/gohugoio/hugo/releases/download/v0.39/hugo_0.39_Linux-64bit.deb - dpkg -i hugo*.deb - hugo version + - mkdir -p ~/tex/latex + - cd ~/tex/latex/; git clone https://github.com/Titan-C/AltaCV.git + - emacs --batch -Q --script genfiles.el + - cd org-cv-exports; latex -pdf altacv.org.tex - cd doc; hugo except: - master From 5dbb5420cecf7f858df537175f2bfb3378b809a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Thu, 19 Apr 2018 13:20:37 +0200 Subject: [PATCH 10/32] also install git --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0ab92ff..4738e5b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ image: najeraoscar/latex-emacs-min test: script: - - apt-get update && apt install wget + - apt-get update && apt install wget git - wget https://github.com/gohugoio/hugo/releases/download/v0.39/hugo_0.39_Linux-64bit.deb - dpkg -i hugo*.deb - hugo version From 7b0c4ca1aad7f5b319684b3252dd0a0a4ecbfdef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Thu, 19 Apr 2018 13:22:47 +0200 Subject: [PATCH 11/32] install all --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4738e5b..fa55fbb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ image: najeraoscar/latex-emacs-min test: script: - - apt-get update && apt install wget git + - apt-get update && apt install -y wget git - wget https://github.com/gohugoio/hugo/releases/download/v0.39/hugo_0.39_Linux-64bit.deb - dpkg -i hugo*.deb - hugo version From 7e4af5d18e522f20895bdaf26d9970f0ffdc527e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Wed, 25 Apr 2018 13:45:33 +0200 Subject: [PATCH 12/32] Don't export address field if empty --- ox-altacv.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ox-altacv.el b/ox-altacv.el index ce242f6..7ce90e2 100644 --- a/ox-altacv.el +++ b/ox-altacv.el @@ -139,7 +139,8 @@ holding export options." "\\personalinfo{\n" ;; address (let ((address (org-export-data (plist-get info :address) info))) - (when address (format "\\mailaddress{%s}\n" (mapconcat (lambda (line) (format "%s" line)) + (when (org-string-nw-p address) (format "\\mailaddress{%s}\n" + (mapconcat (lambda (line) (format "%s" line)) (split-string address "\n") " -- ")))) ;; email (let ((email (and (plist-get info :with-email) From 7272aab35467f334735ec8899a33a38e226b9426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Wed, 25 Apr 2018 13:49:13 +0200 Subject: [PATCH 13/32] more specific install --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fa55fbb..931ff0b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,8 @@ test: - dpkg -i hugo*.deb - hugo version - mkdir -p ~/tex/latex - - cd ~/tex/latex/; git clone https://github.com/Titan-C/AltaCV.git + - git clone https://github.com/Titan-C/AltaCV.git /usr/share/texmf/tex/latex/AltaCV + - emacs --batch --load /tmp/install-org.el - emacs --batch -Q --script genfiles.el - cd org-cv-exports; latex -pdf altacv.org.tex - cd doc; hugo From 0be84d0f7ed30788b1d3ebe6ca695204c096dc5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Wed, 25 Apr 2018 14:46:55 +0200 Subject: [PATCH 14/32] configure logo --- doc/config.toml | 1 + doc/themes/project-landing-page | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/config.toml b/doc/config.toml index 747b5f0..1e7eb2b 100644 --- a/doc/config.toml +++ b/doc/config.toml @@ -8,6 +8,7 @@ theme = "project-landing-page" author_url = "http://blog.oscarnajera.com" author = "Titan-C" project_url = "https://gitlab.com/Titan-C/org-cv/" + logo = "https://upload.wikimedia.org/wikipedia/commons/a/a6/Org-mode-unicorn.svg" first_color="#f8f8f8" first_border_color="#e7e7e7" diff --git a/doc/themes/project-landing-page b/doc/themes/project-landing-page index b639b77..4f2cf5e 160000 --- a/doc/themes/project-landing-page +++ b/doc/themes/project-landing-page @@ -1 +1 @@ -Subproject commit b639b771b6b799629a7e7e9b4ab068bcda423d7c +Subproject commit 4f2cf5e52fab4e37173f1aea272bf07f7a377fbb From c039870d2d76e0afa449f71be17a23c2eddf2244 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Wed, 25 Apr 2018 15:10:34 +0200 Subject: [PATCH 15/32] Large section heading & export --- doc/content/post/latex_export.md | 10 ++++++++-- doc/themes/project-landing-page | 2 +- readme.org | 9 +++++++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/doc/content/post/latex_export.md b/doc/content/post/latex_export.md index 6c6b4db..f9df014 100644 --- a/doc/content/post/latex_export.md +++ b/doc/content/post/latex_export.md @@ -33,8 +33,8 @@ When exporting you can call the following function to get the latex file. [AltaCV](https://github.com/liantze/AltaCV) is another project to generate a CV, you will need to install it yourself. I maintain a fork too at -because I need extra features and I encourage to use this for on the -sections branch. +because I need extra features and I encourage to use this fork on the +`sections` branch. The style of this CV is more involved and you need some configuration in your org file to get it to work. First define the margins, the large margin @@ -76,3 +76,9 @@ need to enclose it in the `\marginpar{}` command as shown next. ```org #+latex: } ``` + +When exporting you can call the following function to get the latex file. + +```emacs-lisp +(org-export-to-file 'moderncv "moderncv.tex") +``` diff --git a/doc/themes/project-landing-page b/doc/themes/project-landing-page index 4f2cf5e..3566559 160000 --- a/doc/themes/project-landing-page +++ b/doc/themes/project-landing-page @@ -1 +1 @@ -Subproject commit 4f2cf5e52fab4e37173f1aea272bf07f7a377fbb +Subproject commit 35665596cdd2a60e6cbf7b48a97bc2c0570de0c4 diff --git a/readme.org b/readme.org index 098cf57..cf6de6a 100644 --- a/readme.org +++ b/readme.org @@ -131,8 +131,8 @@ When exporting you can call the following function to get the latex file. ** Using alta-cv [[https://github.com/liantze/AltaCV][AltaCV]] is another project to generate a CV, you will need to install it yourself. I maintain a fork too at https://github.com/Titan-C/AltaCV.git -because I need extra features and I encourage to use this for on the -sections branch. +because I need extra features and I encourage to use this fork on the +=sections= branch. The style of this CV is more involved and you need some configuration in your org file to get it to work. First define the margins, the large margin @@ -182,6 +182,11 @@ need to enclose it in the =\marginpar{}= command as shown next. #+include: workcontent.org #+END_SRC +When exporting you can call the following function to get the latex file. +#+BEGIN_SRC emacs-lisp +(org-export-to-file 'moderncv "moderncv.tex") +#+END_SRC + * Update readme ** TODO examples [0/2] *** TODO pictures From 53e75219d10849108d912a8ea27bb063c374c46a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Wed, 25 Apr 2018 15:19:53 +0200 Subject: [PATCH 16/32] try local docker ci --- .gitlab-ci.yml | 3 +-- genfiles.el | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 931ff0b..e290bf0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: najeraoscar/latex-emacs-min +image: latex-emacs-min-org test: script: @@ -6,7 +6,6 @@ test: - wget https://github.com/gohugoio/hugo/releases/download/v0.39/hugo_0.39_Linux-64bit.deb - dpkg -i hugo*.deb - hugo version - - mkdir -p ~/tex/latex - git clone https://github.com/Titan-C/AltaCV.git /usr/share/texmf/tex/latex/AltaCV - emacs --batch --load /tmp/install-org.el - emacs --batch -Q --script genfiles.el diff --git a/genfiles.el b/genfiles.el index 1760810..ae82f3a 100644 --- a/genfiles.el +++ b/genfiles.el @@ -29,5 +29,4 @@ )) (export-latex "altacv.org") -(message "yo") (copy-directory workdir cwd) From 90332f6a5ed6eec9649ae9e9745cba8693f9f171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Wed, 25 Apr 2018 18:17:21 +0200 Subject: [PATCH 17/32] go back to docker hub --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e290bf0..fd17acf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: latex-emacs-min-org +image: najeraoscar/latex-emacs-min test: script: From 50cc9534c6ea3c7c7cbd6c9919f17345e304a5e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Tue, 1 May 2018 17:16:12 +0200 Subject: [PATCH 18/32] experiment with altacv on root --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd17acf..162edc2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ test: - wget https://github.com/gohugoio/hugo/releases/download/v0.39/hugo_0.39_Linux-64bit.deb - dpkg -i hugo*.deb - hugo version - - git clone https://github.com/Titan-C/AltaCV.git /usr/share/texmf/tex/latex/AltaCV + - git clone https://github.com/Titan-C/AltaCV.git /root/texmf/tex/latex/AltaCV - emacs --batch --load /tmp/install-org.el - emacs --batch -Q --script genfiles.el - cd org-cv-exports; latex -pdf altacv.org.tex From 8d077c14eac23e7a823f2cfe4f0f7100451ab794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Tue, 1 May 2018 18:14:16 +0200 Subject: [PATCH 19/32] dependencies installed on a script --- .gitlab-ci.yml | 9 ++------- genfiles.el | 4 +++- installs.sh | 15 +++++++++++++++ 3 files changed, 20 insertions(+), 8 deletions(-) create mode 100755 installs.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 162edc2..c03d630 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,18 +2,13 @@ image: najeraoscar/latex-emacs-min test: script: - - apt-get update && apt install -y wget git - - wget https://github.com/gohugoio/hugo/releases/download/v0.39/hugo_0.39_Linux-64bit.deb - - dpkg -i hugo*.deb - - hugo version - - git clone https://github.com/Titan-C/AltaCV.git /root/texmf/tex/latex/AltaCV - - emacs --batch --load /tmp/install-org.el + - ./installs.sh - emacs --batch -Q --script genfiles.el - - cd org-cv-exports; latex -pdf altacv.org.tex - cd doc; hugo except: - master artifacts: paths: + - org-cv-exports - doc/public diff --git a/genfiles.el b/genfiles.el index ae82f3a..970bc61 100644 --- a/genfiles.el +++ b/genfiles.el @@ -25,8 +25,10 @@ (find-file workfile) (org-mode) (org-export-to-file 'altacv outfile) - (shell-command (format "latexmk -pdf %s" outfile)) + (shell-command (format "pdflatex %s" outfile)) + (copy-file (concat file ".pdf") cwd) )) (export-latex "altacv.org") +(export-latex "moderncv.org") (copy-directory workdir cwd) diff --git a/installs.sh b/installs.sh new file mode 100755 index 0000000..ef38fc4 --- /dev/null +++ b/installs.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +wget https://github.com/gohugoio/hugo/releases/download/v0.39/hugo_0.39_Linux-64bit.deb +dpkg -i hugo*.deb +hugo version + +# Latex +apt-get update && apt install -y fonts-font-awesome +git clone https://github.com/Titan-C/AltaCV.git /root/texmf-dist/tex/latex/AltaCV +wget http://mirrors.ctan.org/fonts/fontawesome/tex/fontawesome.sty +wget http://mirrors.ctan.org/fonts/fontawesome/tex/fontawesomesymbols-generic.tex +wget http://mirrors.ctan.org/fonts/fontawesome/tex/fontawesomesymbols-pdftex.tex + +emacs --batch --load /tmp/install-org.el +cd org-cv-exports; latex -pdf altacv.org.tex From 8a146a251ecec02a731e996018679d3cec59ca03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Tue, 1 May 2018 18:22:50 +0200 Subject: [PATCH 20/32] organize installs --- installs.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/installs.sh b/installs.sh index ef38fc4..895be6a 100755 --- a/installs.sh +++ b/installs.sh @@ -1,15 +1,19 @@ #!/usr/bin/env bash +apt-get update && apt install -y fonts-font-awesome wget https://github.com/gohugoio/hugo/releases/download/v0.39/hugo_0.39_Linux-64bit.deb dpkg -i hugo*.deb + +echo "Installed Hugo:" hugo version # Latex -apt-get update && apt install -y fonts-font-awesome -git clone https://github.com/Titan-C/AltaCV.git /root/texmf-dist/tex/latex/AltaCV -wget http://mirrors.ctan.org/fonts/fontawesome/tex/fontawesome.sty -wget http://mirrors.ctan.org/fonts/fontawesome/tex/fontawesomesymbols-generic.tex -wget http://mirrors.ctan.org/fonts/fontawesome/tex/fontawesomesymbols-pdftex.tex +echo "Install altacv" +git clone https://github.com/Titan-C/AltaCV.git /root/texmf/tex/latex/AltaCV +echo "Install fontawesome for latex" +fontdir = /root/texmf/tex/latex/fontawesome/ +mkdir -p $fontdir -emacs --batch --load /tmp/install-org.el -cd org-cv-exports; latex -pdf altacv.org.tex +wget -P $fontdir http://mirrors.ctan.org/fonts/fontawesome/tex/fontawesome.sty +wget -P $fontdir http://mirrors.ctan.org/fonts/fontawesome/tex/fontawesomesymbols-generic.tex +wget -P $fontdir http://mirrors.ctan.org/fonts/fontawesome/tex/fontawesomesymbols-pdftex.tex From 174c645594bc97e89dba909b2f818f496e72f4a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Tue, 1 May 2018 18:29:34 +0200 Subject: [PATCH 21/32] fix syntax in install file --- installs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installs.sh b/installs.sh index 895be6a..51e6351 100755 --- a/installs.sh +++ b/installs.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -apt-get update && apt install -y fonts-font-awesome +apt-get update && apt-get install -y fonts-font-awesome wget https://github.com/gohugoio/hugo/releases/download/v0.39/hugo_0.39_Linux-64bit.deb dpkg -i hugo*.deb @@ -11,7 +11,7 @@ hugo version echo "Install altacv" git clone https://github.com/Titan-C/AltaCV.git /root/texmf/tex/latex/AltaCV echo "Install fontawesome for latex" -fontdir = /root/texmf/tex/latex/fontawesome/ +fontdir=/root/texmf/tex/latex/fontawesome/ mkdir -p $fontdir wget -P $fontdir http://mirrors.ctan.org/fonts/fontawesome/tex/fontawesome.sty From 36cd273cbe4fdc63d4b66516cf43aa7179890f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Tue, 1 May 2018 18:35:48 +0200 Subject: [PATCH 22/32] use correct backend --- genfiles.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/genfiles.el b/genfiles.el index 970bc61..0d66cbd 100644 --- a/genfiles.el +++ b/genfiles.el @@ -18,17 +18,17 @@ (copy-file (concat cwd "doc/smile.png") workdir) -(defun export-latex (file) +(defun export-latex (backend file) (let ((workfile (concat workdir file)) (outfile (concat workdir file ".tex"))) (message (format "%s exists: %s" workfile (file-exists-p workfile))) (find-file workfile) (org-mode) - (org-export-to-file 'altacv outfile) + (org-export-to-file backend outfile) (shell-command (format "pdflatex %s" outfile)) (copy-file (concat file ".pdf") cwd) )) -(export-latex "altacv.org") -(export-latex "moderncv.org") +(export-latex 'altacv "altacv.org") +(export-latex 'moderncv "moderncv.org") (copy-directory workdir cwd) From 597c77a2fd94afddf94b55dfa13f0adb9596ec12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Tue, 1 May 2018 18:36:58 +0200 Subject: [PATCH 23/32] fix example email --- doc/content/post/basic_config.md | 1 + readme.org | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/content/post/basic_config.md b/doc/content/post/basic_config.md index 73e96ed..7d36125 100644 --- a/doc/content/post/basic_config.md +++ b/doc/content/post/basic_config.md @@ -28,6 +28,7 @@ foreseen job. ```org #+TITLE: My dream job #+AUTHOR: John Doe +#+email: john@doe.lost #+ADDRESS: My Awesome crib #+ADDRESS: Fantastic city -- Planet Earth diff --git a/readme.org b/readme.org index cf6de6a..ae68eae 100644 --- a/readme.org +++ b/readme.org @@ -54,6 +54,7 @@ foreseen job. #+BEGIN_SRC org :tangle basic_cv.org ,#+TITLE: My dream job ,#+AUTHOR: John Doe +,#+email: john@doe.lost ,#+ADDRESS: My Awesome crib ,#+ADDRESS: Fantastic city -- Planet Earth From ba25453f9e010cb3d93095390c6d4cd8200d0453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Tue, 1 May 2018 18:51:00 +0200 Subject: [PATCH 24/32] install my moderncv version --- installs.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/installs.sh b/installs.sh index 51e6351..505577e 100755 --- a/installs.sh +++ b/installs.sh @@ -10,6 +10,8 @@ hugo version # Latex echo "Install altacv" git clone https://github.com/Titan-C/AltaCV.git /root/texmf/tex/latex/AltaCV +echo "Install moderncv" +git clone https://github.com/Titan-C/moderncv.git /root/texmf/tex/latex/moderncv echo "Install fontawesome for latex" fontdir=/root/texmf/tex/latex/fontawesome/ mkdir -p $fontdir From fdfae8168fc03687c2d832eaa45f37f6ca1dd827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Tue, 1 May 2018 19:59:43 +0200 Subject: [PATCH 25/32] Install latex cv templates from last git version --- genfiles.el | 2 +- installs.sh | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/genfiles.el b/genfiles.el index 0d66cbd..7710088 100644 --- a/genfiles.el +++ b/genfiles.el @@ -25,7 +25,7 @@ (find-file workfile) (org-mode) (org-export-to-file backend outfile) - (shell-command (format "pdflatex %s" outfile)) + (shell-command (format "pdflatex %s" outfile) "*Messages*" "*Messages*") (copy-file (concat file ".pdf") cwd) )) diff --git a/installs.sh b/installs.sh index 505577e..c5c44a8 100755 --- a/installs.sh +++ b/installs.sh @@ -8,12 +8,15 @@ echo "Installed Hugo:" hugo version # Latex +latexdir=/root/texmf/tex/latex echo "Install altacv" -git clone https://github.com/Titan-C/AltaCV.git /root/texmf/tex/latex/AltaCV +wget https://github.com/Titan-C/AltaCV/archive/sections.zip +unzip -j sections.zip -d $latexdir/AltaCV echo "Install moderncv" -git clone https://github.com/Titan-C/moderncv.git /root/texmf/tex/latex/moderncv +wget https://github.com/Titan-C/moderncv/archive/master.zip +unzip -j master.zip -d $latexdir/moderncv echo "Install fontawesome for latex" -fontdir=/root/texmf/tex/latex/fontawesome/ +fontdir=$latexdir/fontawesome/ mkdir -p $fontdir wget -P $fontdir http://mirrors.ctan.org/fonts/fontawesome/tex/fontawesome.sty From dbf1d5c61157ce7295605f7154d133959b5dd864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Tue, 1 May 2018 20:44:16 +0200 Subject: [PATCH 26/32] Clean readme a bit more and use my git repo for template --- .gitlab-ci.yml | 1 - .gitmodules | 2 +- doc/content/post/goal.md | 11 ++++++++++ doc/content/post/latex_export.md | 14 ++++++++++-- genfiles.el | 3 +-- readme.org | 37 ++++++++++++++++++++++++++------ 6 files changed, 56 insertions(+), 12 deletions(-) create mode 100644 doc/content/post/goal.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c03d630..dec25a1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,5 +10,4 @@ test: artifacts: paths: - - org-cv-exports - doc/public diff --git a/.gitmodules b/.gitmodules index 60df6fe..33c882c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "doc/themes/project-landing-page"] path = doc/themes/project-landing-page - url = https://github.com/nsomar/github-project-landing-page.git + url = https://github.com/Titan-C/github-project-landing-page.git diff --git a/doc/content/post/goal.md b/doc/content/post/goal.md new file mode 100644 index 0000000..c47b50e --- /dev/null +++ b/doc/content/post/goal.md @@ -0,0 +1,11 @@ ++++ +title = "Goal: Export backend for CV" +author = ["Óscar Nájera"] +draft = false +weight = 1001 ++++ + +This project aims to generate from an org-mode file with reasonably ordered +items a latex file which compiles into a reasonably nice CV. In the same +spirit the org-mode file must export to markdown so that it can be uses for +web based CV. diff --git a/doc/content/post/latex_export.md b/doc/content/post/latex_export.md index f9df014..d02078a 100644 --- a/doc/content/post/latex_export.md +++ b/doc/content/post/latex_export.md @@ -26,8 +26,13 @@ When exporting you can call the following function to get the latex file. ```emacs-lisp (org-export-to-file 'moderncv "moderncv.tex") +(org-latex-compile "moderncv.tex") ``` + +

Alternative text - include a link to the PDF!

+
+ ## Using alta-cv {#using-alta-cv} @@ -57,7 +62,7 @@ need to enclose it in the `\marginpar{}` command as shown next. - Free food - Free beer -* Programming Languages +* Programming - Python - C/C++ - EmacsLisp @@ -80,5 +85,10 @@ need to enclose it in the `\marginpar{}` command as shown next. When exporting you can call the following function to get the latex file. ```emacs-lisp -(org-export-to-file 'moderncv "moderncv.tex") +(org-export-to-file 'altacv "altacv.tex") +(org-latex-compile "altacv.tex") ``` + + +

Alternative text - include a link to the PDF!

+
diff --git a/genfiles.el b/genfiles.el index 7710088..6564263 100644 --- a/genfiles.el +++ b/genfiles.el @@ -26,9 +26,8 @@ (org-mode) (org-export-to-file backend outfile) (shell-command (format "pdflatex %s" outfile) "*Messages*" "*Messages*") - (copy-file (concat file ".pdf") cwd) + (copy-file (concat file ".pdf") (concat cwd "/doc/static")) )) (export-latex 'altacv "altacv.org") (export-latex 'moderncv "moderncv.org") -(copy-directory workdir cwd) diff --git a/readme.org b/readme.org index ae68eae..299b3f6 100644 --- a/readme.org +++ b/readme.org @@ -6,6 +6,10 @@ #+HUGO_SECTION: post #+HUGO_WEIGHT: auto +* Goal: Export backend for CV + :PROPERTIES: + :EXPORT_FILE_NAME: goal + :END: This project aims to generate from an org-mode file with reasonably ordered items a latex file which compiles into a reasonably nice CV. In the same spirit the org-mode file must export to markdown so that it can be uses for @@ -128,7 +132,14 @@ org file. When exporting you can call the following function to get the latex file. #+BEGIN_SRC emacs-lisp (org-export-to-file 'moderncv "moderncv.tex") +(org-latex-compile "moderncv.tex") #+END_SRC + +#+BEGIN_EXPORT md + +

Alternative text - include a link to the PDF!

+
+#+END_EXPORT ** Using alta-cv [[https://github.com/liantze/AltaCV][AltaCV]] is another project to generate a CV, you will need to install it yourself. I maintain a fork too at https://github.com/Titan-C/AltaCV.git @@ -139,7 +150,7 @@ The style of this CV is more involved and you need some configuration in your org file to get it to work. First define the margins, the large margin to the right is to allow for a second column. #+BEGIN_SRC org :tangle altacv.org -,#+LATEX_HEADER: \geometry{left=1cm,right=9cm,marginparwidth=6.8cm,marginparsep=1.2cm,top=1.25cm,bottom=1.25cm} +,#+LATEX_HEADER: \geometry{left=1cm,right=9cm,marginparwidth=7cm,marginparsep=1.2cm,top=1.25cm,bottom=1.25cm} #+END_SRC # Next block is to generate exports #+BEGIN_SRC org :exports none :tangle altacv.org @@ -156,7 +167,7 @@ need to enclose it in the =\marginpar{}= command as shown next. - Free food - Free beer -,* Programming Languages +,* Programming - Python - C/C++ - EmacsLisp @@ -185,13 +196,27 @@ need to enclose it in the =\marginpar{}= command as shown next. When exporting you can call the following function to get the latex file. #+BEGIN_SRC emacs-lisp -(org-export-to-file 'moderncv "moderncv.tex") +(org-export-to-file 'altacv "altacv.tex") +(org-latex-compile "altacv.tex") #+END_SRC +#+BEGIN_EXPORT md + +

Alternative text - include a link to the PDF!

+
+#+END_EXPORT + + +* Docker container * Update readme -** TODO examples [0/2] -*** TODO pictures -*** TODO scripts +** TODO examples [2/2] +*** DONE pictures +- State "DONE" from "TODO" [2018-05-01 Tue 20:41] +The website generates the output pdfs, and the orgmode logo is just taken +from wikipedia commons by link. +*** DONE scripts +- State "DONE" from "TODO" [2018-05-01 Tue 20:40] +Now I can completely build a website from this readme and get the targeted CVs. * TODO Make a package Complete the file with license and how to load it. * DONE Base environment From 97648224ef78f0aef905edb0b6048d380e60c3a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Tue, 1 May 2018 22:32:05 +0200 Subject: [PATCH 27/32] Get the table styling correctly --- doc/content/post/basic_config.md | 7 +++-- doc/content/post/latex_export.md | 2 +- doc/themes/project-landing-page | 2 +- readme.org | 54 +++----------------------------- 4 files changed, 10 insertions(+), 55 deletions(-) diff --git a/doc/content/post/basic_config.md b/doc/content/post/basic_config.md index 7d36125..b0aa677 100644 --- a/doc/content/post/basic_config.md +++ b/doc/content/post/basic_config.md @@ -2,7 +2,7 @@ title = "Basic Org file" author = ["Óscar Nájera"] draft = false -weight = 1002 +weight = 1003 +++ The basic structure of an org file containing your CV is shown next. @@ -10,13 +10,14 @@ The basic structure of an org file containing your CV is shown next. ## Personal contact information {#personal-contact-information} -`TITLE` and `AUTHOR` are standard org options. But on `TITLE` you put your -foreseen job. +`TITLE`, `AUTHOR` and `EMAIL` are standard org options. But on `TITLE` you +put your foreseen job. | Field | Description | |----------|----------------------------------------------------| | TITLE | Desired job | | AUTHOR | Who you are? | +| EMAIL | Your contact email | | ADDRESS | Mailing address, this can span over multiple lines | | HOMEPAGE | URL of your website | | MOBILE | Mobile phone | diff --git a/doc/content/post/latex_export.md b/doc/content/post/latex_export.md index d02078a..8c0780a 100644 --- a/doc/content/post/latex_export.md +++ b/doc/content/post/latex_export.md @@ -2,7 +2,7 @@ title = "Latex Exporter" author = ["Óscar Nájera"] draft = false -weight = 1003 +weight = 1004 +++ ## Using modern-cv {#using-modern-cv} diff --git a/doc/themes/project-landing-page b/doc/themes/project-landing-page index 3566559..753b51a 160000 --- a/doc/themes/project-landing-page +++ b/doc/themes/project-landing-page @@ -1 +1 @@ -Subproject commit 35665596cdd2a60e6cbf7b48a97bc2c0570de0c4 +Subproject commit 753b51a174b8126ad9fb68f3f5eb2c6fe7cf217b diff --git a/readme.org b/readme.org index 299b3f6..4860d63 100644 --- a/readme.org +++ b/readme.org @@ -40,13 +40,14 @@ use =use-package= to manage the installation for example of =ox-moderncv=. :END: The basic structure of an org file containing your CV is shown next. ** Personal contact information -=TITLE= and =AUTHOR= are standard org options. But on =TITLE= you put your -foreseen job. +=TITLE=, =AUTHOR= and =EMAIL= are standard org options. But on =TITLE= you +put your foreseen job. | Field | Description | |----------+----------------------------------------------------| | TITLE | Desired job | | AUTHOR | Who you are? | +| EMAIL | Your contact email | | ADDRESS | Mailing address, this can span over multiple lines | | HOMEPAGE | URL of your website | | MOBILE | Mobile phone | @@ -150,7 +151,7 @@ The style of this CV is more involved and you need some configuration in your org file to get it to work. First define the margins, the large margin to the right is to allow for a second column. #+BEGIN_SRC org :tangle altacv.org -,#+LATEX_HEADER: \geometry{left=1cm,right=9cm,marginparwidth=7cm,marginparsep=1.2cm,top=1.25cm,bottom=1.25cm} +,#+LATEX_HEADER: \geometry{left=1cm,right=9cm,marginparwidth=6.8cm,marginparsep=1.2cm,top=1.25cm,bottom=1.25cm} #+END_SRC # Next block is to generate exports #+BEGIN_SRC org :exports none :tangle altacv.org @@ -207,53 +208,6 @@ When exporting you can call the following function to get the latex file. #+END_EXPORT -* Docker container -* Update readme -** TODO examples [2/2] -*** DONE pictures -- State "DONE" from "TODO" [2018-05-01 Tue 20:41] -The website generates the output pdfs, and the orgmode logo is just taken -from wikipedia commons by link. -*** DONE scripts -- State "DONE" from "TODO" [2018-05-01 Tue 20:40] -Now I can completely build a website from this readme and get the targeted CVs. -* TODO Make a package -Complete the file with license and how to load it. -* DONE Base environment -- State "DONE" from "TODO" [2018-03-22 Thu 17:57] -I have the basic cv template that gets exported -* DONE org-exporter for latex -- State "DONE" from "TODO" [2018-04-05 Thu 03:04] -:LOGBOOK: -CLOCK: [2018-03-22 Thu 23:17]--[2018-03-23 Fri 03:25] => 4:08 -CLOCK: [2018-03-22 Thu 17:58]--[2018-03-22 Thu 18:37] => 0:39 -:END: -I'm comparing the contents of the template export function. It looks that -this one give the genera document layout and this is where I shall insert -them data. -comparing ox-latex, ox-beamer, ox-koma - -I learned quite a lot from the main latex and koma files. Currently I -already reproduce latex export, which is not much as that was already a -working output. But now I have the specific keywords for the personal -information part. -** DONE Process headings with properties into cventries -- State "DONE" from "TODO" [2018-03-24 Sat 03:02] -:LOGBOOK: -CLOCK: [2018-03-23 Fri 22:54]--[2018-03-24 Sat 03:05] => 4:11 -CLOCK: [2018-03-23 Fri 14:41]--[2018-03-23 Fri 19:05] => 4:24 -:END: -I'm constructing the entries quite fine but somehow the intermedia function -refuses to get written even when it appears that its output is correct. - -I don't fully understand. But it appear that I need to call the exporter -again within the exporting of the headings. This maybe is what helps -getting down the subtrees and getting to the latex output. -** DONE Incorporate from beamer how the do the theme settings -- State "DONE" from "TODO" [2018-03-23 Fri 16:01] -This looks like a fancy way to avoid repetition. Have a look too trying to -imitate that behavior for the other personal tags of social media,url,phones. -* DONE Markdown exporter for integration with hugo blog * Local Variables :ARCHIVE: # Local Variables: # eval: (add-hook 'after-save-hook #'org-hugo-export-wim-to-md-after-save :append :local) From e8542bbed64dbfbe136a2b6b91eb9e7b1f8f1c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Tue, 1 May 2018 22:32:19 +0200 Subject: [PATCH 28/32] fontawesome for latex should be in the docker container --- installs.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/installs.sh b/installs.sh index c5c44a8..8250546 100755 --- a/installs.sh +++ b/installs.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -apt-get update && apt-get install -y fonts-font-awesome wget https://github.com/gohugoio/hugo/releases/download/v0.39/hugo_0.39_Linux-64bit.deb dpkg -i hugo*.deb @@ -15,10 +14,3 @@ unzip -j sections.zip -d $latexdir/AltaCV echo "Install moderncv" wget https://github.com/Titan-C/moderncv/archive/master.zip unzip -j master.zip -d $latexdir/moderncv -echo "Install fontawesome for latex" -fontdir=$latexdir/fontawesome/ -mkdir -p $fontdir - -wget -P $fontdir http://mirrors.ctan.org/fonts/fontawesome/tex/fontawesome.sty -wget -P $fontdir http://mirrors.ctan.org/fonts/fontawesome/tex/fontawesomesymbols-generic.tex -wget -P $fontdir http://mirrors.ctan.org/fonts/fontawesome/tex/fontawesomesymbols-pdftex.tex From 9782b9c2badc03401c400e74b5bbcc7369eda810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Tue, 1 May 2018 23:02:29 +0200 Subject: [PATCH 29/32] styling the table the ox-hugo way --- doc/content/post/basic_config.md | 5 +++++ doc/themes/project-landing-page | 2 +- readme.org | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/content/post/basic_config.md b/doc/content/post/basic_config.md index b0aa677..4ab5c85 100644 --- a/doc/content/post/basic_config.md +++ b/doc/content/post/basic_config.md @@ -13,6 +13,9 @@ The basic structure of an org file containing your CV is shown next. `TITLE`, `AUTHOR` and `EMAIL` are standard org options. But on `TITLE` you put your foreseen job. +
+
+ | Field | Description | |----------|----------------------------------------------------| | TITLE | Desired job | @@ -26,6 +29,8 @@ put your foreseen job. | LINKEDIN | Linkedin username | | PHOTO | path to photo file | +
+ ```org #+TITLE: My dream job #+AUTHOR: John Doe diff --git a/doc/themes/project-landing-page b/doc/themes/project-landing-page index 753b51a..24fa397 160000 --- a/doc/themes/project-landing-page +++ b/doc/themes/project-landing-page @@ -1 +1 @@ -Subproject commit 753b51a174b8126ad9fb68f3f5eb2c6fe7cf217b +Subproject commit 24fa3973fe9822c133292fe356132975738c226e diff --git a/readme.org b/readme.org index 4860d63..5a8408d 100644 --- a/readme.org +++ b/readme.org @@ -43,6 +43,7 @@ The basic structure of an org file containing your CV is shown next. =TITLE=, =AUTHOR= and =EMAIL= are standard org options. But on =TITLE= you put your foreseen job. +#+attr_html: :class table table-striped | Field | Description | |----------+----------------------------------------------------| | TITLE | Desired job | From 9997c83f7f760e43b768f91fc1d270f209adaf8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Tue, 1 May 2018 23:33:17 +0200 Subject: [PATCH 30/32] prepare gitlab-ci for publishing pages --- .gitlab-ci.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dec25a1..da3a0cc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,13 @@ image: najeraoscar/latex-emacs-min +variables: + GIT_SUBMODULE_STRATEGY: recursive + +before_script: + - ./installs.sh + test: script: - - ./installs.sh - emacs --batch -Q --script genfiles.el - cd doc; hugo except: @@ -11,3 +16,14 @@ test: artifacts: paths: - doc/public + +pages: + script: + - emacs --batch -Q --script genfiles.el + - cd doc; hugo + - mv doc/public/ public/ + artifacts: + paths: + - public + only: + - master From aa1e60f95ba158c2b84cc36736d45b3a04f886f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Tue, 1 May 2018 23:42:07 +0200 Subject: [PATCH 31/32] fix forgotten latexpath and give page url --- doc/config.toml | 2 +- installs.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/config.toml b/doc/config.toml index 1e7eb2b..fe1bf62 100644 --- a/doc/config.toml +++ b/doc/config.toml @@ -1,4 +1,4 @@ -baseURL = "http://example.org/" +baseURL = "https://titan-c.gitlab.io/org-cv/" languageCode = "en-us" title = "Org CV backend export" theme = "project-landing-page" diff --git a/installs.sh b/installs.sh index 8250546..698087a 100755 --- a/installs.sh +++ b/installs.sh @@ -8,6 +8,7 @@ hugo version # Latex latexdir=/root/texmf/tex/latex +mkdir -p $latexdir echo "Install altacv" wget https://github.com/Titan-C/AltaCV/archive/sections.zip unzip -j sections.zip -d $latexdir/AltaCV From 4030c01b145493c1d6cd17d3ffd931b8f0782db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Tue, 1 May 2018 23:49:31 +0200 Subject: [PATCH 32/32] make dir the static directory be specific on file for copy --- doc/content/img/intro-bg.svg | 65 ------------------------------------ genfiles.el | 3 +- 2 files changed, 2 insertions(+), 66 deletions(-) delete mode 100644 doc/content/img/intro-bg.svg diff --git a/doc/content/img/intro-bg.svg b/doc/content/img/intro-bg.svg deleted file mode 100644 index b823836..0000000 --- a/doc/content/img/intro-bg.svg +++ /dev/null @@ -1,65 +0,0 @@ - - - - app-icon-board - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/genfiles.el b/genfiles.el index 6564263..c54be17 100644 --- a/genfiles.el +++ b/genfiles.el @@ -26,8 +26,9 @@ (org-mode) (org-export-to-file backend outfile) (shell-command (format "pdflatex %s" outfile) "*Messages*" "*Messages*") - (copy-file (concat file ".pdf") (concat cwd "/doc/static")) + (copy-file (concat file ".pdf") (concat cwd "/doc/static/" (concat file ".pdf"))) )) +(make-directory (concat cwd "/doc/static/") t) (export-latex 'altacv "altacv.org") (export-latex 'moderncv "moderncv.org")