forked from mirrors/org-cv
51c7ef8ed5
Added a new ox-awesomecv.el, which provides support for the AwesomeCV LaTeX class: https://github.com/posquit0/Awesome-CV Added the corresponding documentation in the README as well. An example of a CV produced with this exporter can be found at https://zzamboni.org/vita/
307 lines
10 KiB
Org Mode
307 lines
10 KiB
Org Mode
#+TITLE: Org exporter for curriculum vitae
|
|
#+AUTHOR: Óscar Nájera
|
|
#+EMAIL: hello@oscarnajera.com
|
|
|
|
#+HUGO_BASE_DIR: doc
|
|
#+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
|
|
web based CV.
|
|
|
|
- Online documentation in [[https://titan-c.gitlab.io/org-cv/]]
|
|
- Development happens in the gitlab repository: https://gitlab.com/Titan-C/org-cv
|
|
- There is a mirror in github for backup: https://github.com/Titan-C/org-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
|
|
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 the installation for example of =ox-moderncv=.
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
(use-package ox-moderncv
|
|
: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=, =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 |
|
|
| 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 |
|
|
| 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
|
|
,#+email: john@doe.lost
|
|
|
|
,#+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.png
|
|
#+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:
|
|
: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
|
|
#+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
|
|
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 :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")
|
|
(org-latex-compile "moderncv.tex")
|
|
#+END_SRC
|
|
|
|
#+BEGIN_EXPORT md
|
|
<object data="moderncv.org.pdf" type="application/pdf" width="100%" height="500px">
|
|
<p>Alternative text - include a link <a href="moderncv.org.pdf">to the PDF!</a></p>
|
|
</object>
|
|
#+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
|
|
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
|
|
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}
|
|
#+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 :tangle altacv.org
|
|
,#+latex: \marginpar{
|
|
#+END_SRC
|
|
#+BEGIN_SRC org :tangle sideactivities.org
|
|
,* Main Interests
|
|
- Free/Libre and Open Source Software (FLOSS)
|
|
- Free food
|
|
- Free beer
|
|
|
|
,* Programming
|
|
- Python
|
|
- C/C++
|
|
- EmacsLisp
|
|
- Bash
|
|
- JavaScript
|
|
- PHP
|
|
|
|
,* Languages
|
|
|
|
- *English* Fluent
|
|
- *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
|
|
|
|
When exporting you can call the following function to get the latex file.
|
|
#+BEGIN_SRC emacs-lisp
|
|
(org-export-to-file 'altacv "altacv.tex")
|
|
(org-latex-compile "altacv.tex")
|
|
#+END_SRC
|
|
|
|
#+BEGIN_EXPORT md
|
|
<object data="altacv.org.pdf" type="application/pdf" width="100%" height="500px">
|
|
<p>Alternative text - include a link <a href="altacv.org.pdf">to the PDF!</a></p>
|
|
</object>
|
|
#+END_EXPORT
|
|
|
|
** Using AwesomeCV
|
|
|
|
[[https://github.com/posquit0/Awesome-CV][AwesomeCV]] is another LaTeX template for producing nice-looking
|
|
CVs. AwesomeCV supports a few additional types of environment types in
|
|
=CV_ENV=, including =cvemployer=, =cvskills=, =cvhonors= and =cvschool=. Some of
|
|
these support additional property fields:
|
|
|
|
#+attr_html: :class table table-striped
|
|
| Field | Description |
|
|
|-----------+------------------------------------------------------------------|
|
|
| FROM | Start date of the entry |
|
|
| TO | End date of the entry |
|
|
| DATE | Shortcut to specify both =FROM= and =TO= as the same date. |
|
|
| | Both =FROM= and =TO= override =DATE=. |
|
|
| EMPLOYER | Employer or organization, can also be specified |
|
|
| | as =ORGANIZATION=, =SCHOOL=, =EVENT= or =POSITION= (different |
|
|
| | names make more sense depending on the type of environment) |
|
|
| LABEL | In =cvsubentry= environments, adds the given text to the left |
|
|
| | of the date range, can be used to add additional information |
|
|
| | to the entry. |
|
|
| RIGHT_IMG | path to an image to include floating to the right of a =cventry=, |
|
|
| | a =cvsubentry= or =cvschool= entry. Meant to be used to show a logo. |
|
|
|
|
All the supported values of =CV_ENV= are described below.
|
|
|
|
*** =cventries=
|
|
|
|
Enclose all the subheaders in a =cventries= environment. Subheaders can
|
|
be of type =cventry=, =cvschool=, or =cvemployer=.
|
|
|
|
*** =cvhonors=
|
|
|
|
Enclose all the subheaders in a =cvhonors= environment. Subheaders must
|
|
be of type =cvhonor=
|
|
|
|
*** =cventry=
|
|
|
|
Converts to a =\cventry= command. Supports attributes =FROM=, =TO=, =DATE=,
|
|
=EMPLOYER=, =LOCATION=, =RIGHT_IMG=.
|
|
|
|
*** =cvsubentry=
|
|
|
|
Converts to a =\cvsubentry= command. Supports attributes =FROM=, =TO=, =DATE=,
|
|
=LABEL= =RIGHT_IMG=.
|
|
|
|
*** =cvemployer=
|
|
|
|
Converts to a =\cventry= with only the title line. Supports attributes
|
|
=FROM=, =TO=, =DATE= and =LOCATION=.
|
|
|
|
*** =cvschool=
|
|
|
|
Converts to a =\cventry=. The headline should contain the degree
|
|
obtained, shown as the main title. Supports attributes =LOCATION=,
|
|
=SCHOOL=, =FROM=, =TO=, =DATE= and =RIGHT_IMG=.
|
|
|
|
*** =cvhonor=
|
|
|
|
Converts to a =\cvhonor= command (must be inside a =cvhonors=
|
|
headline). Supports attributes =LOCATION=, =EMPLOYER= (in this case =EVENT=
|
|
or =POSITION= might be more semantically accurate, and can also be
|
|
used), =FROM=, =TO=, =DATE=.
|
|
|
|
*** =cvskills=
|
|
|
|
Converts to a =\cvskills= environment. The headline must contain a
|
|
[[https://orgmode.org/manual/Plain-lists.html][description list]], which gets converted into a sequence of =\cvskill=
|
|
commands, with the term as the skill title and the description as its
|
|
contents.
|
|
|
|
* Markdown Hugo Exporter
|
|
:PROPERTIES:
|
|
:EXPORT_FILE_NAME: hugo_export
|
|
:END:
|
|
If your target is not a PDF file but a website, this exporter extends the
|
|
[[https://ox-hugo.scripter.co/][ox-hugo]] exporter backend. So be sure to install that too.
|
|
|
|
To export, there is nothing fancy to keep track of, but as an example I
|
|
exclude some tags during export.
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
(let ((org-export-exclude-tags '("noexport" "latexonly")))
|
|
(org-export-to-file 'hugocv "hugocv.md"))
|
|
#+END_SRC
|
|
|
|
You are responsible for styling your website.
|
|
|
|
|
|
* Local Variables :ARCHIVE:
|
|
# Local Variables:
|
|
# eval: (add-hook 'after-save-hook #'org-hugo-export-wim-to-md-after-save :append :local)
|
|
# End:
|