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: