mirror of
https://gitlab.com/Titan-C/org-cv.git
synced 2024-11-21 13:38:35 +00:00
some utils and readme update
This commit is contained in:
parent
f62d53b82e
commit
e3146f494c
4 changed files with 97 additions and 87 deletions
|
@ -14,7 +14,6 @@ The basic structure of an org file containing your CV is shown next.
|
||||||
put your foreseen job.
|
put your foreseen job.
|
||||||
|
|
||||||
<div class="ox-hugo-table table table-striped">
|
<div class="ox-hugo-table table table-striped">
|
||||||
<div></div>
|
|
||||||
|
|
||||||
| Field | Description |
|
| Field | Description |
|
||||||
|----------|----------------------------------------------------|
|
|----------|----------------------------------------------------|
|
||||||
|
@ -47,10 +46,18 @@ put your foreseen job.
|
||||||
```
|
```
|
||||||
|
|
||||||
You can use org-modes hierarchical structure to describe your CV. To make a
|
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,
|
specific subtree an item describing an experience point (Job you have, degree
|
||||||
degree you pursued, etc.) you use the org properties drawer and with the
|
you pursued, etc.) you use the org properties drawer and with the `:CV_ENV:
|
||||||
`:CV_ENV: cventry` property. You should also include the `FROM` and `TO`
|
cventry` property. You should also include the `FROM` and `TO` properties
|
||||||
properties defining the span of the event, as `LOCATION` and `EMPLOYER`.
|
defining the span of the entry, as well as `LOCATION` and `EMPLOYER`.
|
||||||
|
|
||||||
|
Because work isn't everything we do, it is more meaningful to label differently
|
||||||
|
the host of those other events like studies, events, certifications, etc. Thus
|
||||||
|
`HOST`, `ORGANIZATION`, `INSTITUTION`, `SCHOOL`, `EMPLOYER` or `EVENT` are all
|
||||||
|
equivalent and the first match in that order has precedence.
|
||||||
|
|
||||||
|
`DATE` is a shortcut for `FROM` and `TO` when you have a single date in mind
|
||||||
|
instead of a range. Both `FROM` and `TO` override `DATE`.
|
||||||
|
|
||||||
```org
|
```org
|
||||||
* Employement
|
* Employement
|
||||||
|
|
|
@ -12,7 +12,7 @@ latex distributions. I maintain a fork of it, to work with my use case at
|
||||||
<https://github.com/Titan-C/moderncv.git> Feel free to use any or even your
|
<https://github.com/Titan-C/moderncv.git> Feel free to use any or even your
|
||||||
personal fork for your desired use case.
|
personal fork for your desired use case.
|
||||||
|
|
||||||
To configure the export for moderncv you need the addition options in your
|
To configure the export for moderncv you need the additional options in your
|
||||||
org file.
|
org file.
|
||||||
|
|
||||||
```org
|
```org
|
||||||
|
@ -120,27 +120,26 @@ Note that AwesomeCV uses the `fontspec` package, so you need to set `org-latex-c
|
||||||
In addition to the regular document attributes, the following are supported:
|
In addition to the regular document attributes, the following are supported:
|
||||||
|
|
||||||
<div class="ox-hugo-table table table-striped">
|
<div class="ox-hugo-table table table-striped">
|
||||||
<div></div>
|
|
||||||
|
|
||||||
| Field | Description |
|
| Field | Description |
|
||||||
|------------------|-------------------------------------------------------------|
|
|-----------------|-------------------------------------------------------------|
|
||||||
| PHOTOSTYLE | Style of photo to use. Comma-separated values can include |
|
| PHOTOSTYLE | Style of photo to use. Comma-separated values can include |
|
||||||
| | circle/rectangle,edge/noedge,left/right. |
|
| | circle/rectangle,edge/noedge,left/right. |
|
||||||
| CVCOLOR | Color of highlights. |
|
| CVCOLOR | Color of highlights. |
|
||||||
| STACKOVERFLOW | Stack overflow info, must be specified as "`ID username`" |
|
| STACKOVERFLOW | Stack overflow info, must be specified as "`ID username`" |
|
||||||
| FONTDIR | Directory where the fonts can be found, defaults |
|
| FONTDIR | Directory where the fonts can be found, defaults |
|
||||||
| | to `fonts/` (as in the standard AwesomeCV) |
|
| | to `fonts/` (as in the standard AwesomeCV) |
|
||||||
| CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true |
|
| CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true |
|
||||||
| QUOTE | Optional quote to include at the top of the CV |
|
| QUOTE | Optional quote to include at the top of the CV |
|
||||||
| FIRSTNAME | First name to be shown in the CV. By default the first |
|
| FIRSTNAME | First name to be shown in the CV. By default the first |
|
||||||
| | space-separated part of AUTHOR is used. |
|
| | space-separated part of AUTHOR is used. |
|
||||||
| LASTNAME | Last name to be shown in the CV. By default the second |
|
| LASTNAME | Last name to be shown in the CV. By default the second |
|
||||||
| | space-separated part of AUTHOR is used. |
|
| | space-separated part of AUTHOR is used. |
|
||||||
| CVFOOTER\_LEFT | Text to include in the left footer. None by default |
|
| CVFOOTER_LEFT | Text to include in the left footer. None by default |
|
||||||
| CVFOOTER\_MIDDLE | Text to include in the middle footer. None by default. |
|
| CVFOOTER_MIDDLE | Text to include in the middle footer. None by default. |
|
||||||
| CVFOOTER\_RIGHT | Text to include in the right footer. None by default. |
|
| CVFOOTER_RIGHT | Text to include in the right footer. None by default. |
|
||||||
| LATEX\_TITLE | Text to use as the title section. \makecvheader by default. |
|
| LATEX_TITLE | Text to use as the title section. \makecvheader by default. |
|
||||||
| | (Can specify \makecvheader[R] to justify to the right) |
|
| | (Can specify \makecvheader[R] to justify to the right) |
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -152,24 +151,23 @@ including `cvemployer`, `cvskills`, `cvhonors` and `cvschool` (see full list bel
|
||||||
Some of these support additional property fields:
|
Some of these support additional property fields:
|
||||||
|
|
||||||
<div class="ox-hugo-table table table-striped">
|
<div class="ox-hugo-table table table-striped">
|
||||||
<div></div>
|
|
||||||
|
|
||||||
| Field | Description |
|
| Field | Description |
|
||||||
|------------|----------------------------------------------------------------------|
|
|-----------|----------------------------------------------------------------------|
|
||||||
| FROM | Start date of the entry |
|
| FROM | Start date of the entry |
|
||||||
| TO | End date of the entry |
|
| TO | End date of the entry |
|
||||||
| DATE | Shortcut to specify both `FROM` and `TO` as the same date. |
|
| DATE | Shortcut to specify both `FROM` and `TO` as the same date. |
|
||||||
| | Both `FROM` and `TO` override `DATE`. |
|
| | Both `FROM` and `TO` override `DATE`. |
|
||||||
| EMPLOYER | Employer or organization, can also be specified |
|
| EMPLOYER | Employer or organization, can also be specified |
|
||||||
| | as `ORGANIZATION`, `SCHOOL`, `EVENT` or `POSITION` (different |
|
| | as `ORGANIZATION`, `SCHOOL`, `EVENT` or `POSITION` (different |
|
||||||
| | names make more sense depending on the type of environment) |
|
| | names make more sense depending on the type of environment) |
|
||||||
| LABEL | In `cvsubentry` environments, adds the given text to the left |
|
| LABEL | In `cvsubentry` environments, adds the given text to the left |
|
||||||
| | of the date range, can be used to add additional information |
|
| | of the date range, can be used to add additional information |
|
||||||
| | to the entry. |
|
| | to the entry. |
|
||||||
| RIGHT\_IMG | path to an image to include floating to the right of a `cventry`, |
|
| 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. |
|
| | a `cvsubentry` or `cvschool` entry. Meant to be used to show a logo. |
|
||||||
| PAGEBREAK | Causes a LaTeX `\clearpage` statement to be inserted in the |
|
| PAGEBREAK | Causes a LaTeX `\clearpage` statement to be inserted in the |
|
||||||
| | exported output before the heading. |
|
| | exported output before the heading. |
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -262,19 +260,18 @@ They will *not* be exported.
|
||||||
```
|
```
|
||||||
|
|
||||||
<div class="ox-hugo-table table table-striped">
|
<div class="ox-hugo-table table table-striped">
|
||||||
<div></div>
|
|
||||||
|
|
||||||
| Field | Description |
|
| Field | Description |
|
||||||
|------------------|----------------------------------------------------------------------------------|
|
|-----------------|----------------------------------------------------------------------------------|
|
||||||
| RECIPIENT | Addressee E.g. Company Recruitment Team |
|
| RECIPIENT | Addressee E.g. Company Recruitment Team |
|
||||||
| EMPLOYER | Company name |
|
| EMPLOYER | Company name |
|
||||||
| LOCATION | Company address |
|
| LOCATION | Company address |
|
||||||
| LETTER\_OPENING | Letter opening, E.g. Dear Ms./Mr./Dr. LastName |
|
| LETTER_OPENING | Letter opening, E.g. Dear Ms./Mr./Dr. LastName |
|
||||||
| LETTER\_CLOSING | Letter closing, E.g. Yours Sincerely, |
|
| LETTER_CLOSING | Letter closing, E.g. Yours Sincerely, |
|
||||||
| DATE | The date used for the letter, uses \\\today as default if unspecified |
|
| DATE | The date used for the letter, uses \\\today as default if unspecified |
|
||||||
| DATEFORMAT | Specify an alternative date format for the letter header |
|
| DATEFORMAT | Specify an alternative date format for the letter header |
|
||||||
| | E.g. %e %M %Y might provide 19 March 2021 |
|
| | E.g. %e %M %Y might provide 19 March 2021 |
|
||||||
| LETTER\_ATTACHED | Attachments to the letter, will be listed at the bottom. E.g. "Curriculum Vitae" |
|
| LETTER_ATTACHED | Attachments to the letter, will be listed at the bottom. E.g. "Curriculum Vitae" |
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -50,22 +50,21 @@ today => today"
|
||||||
FROM-DATE -- TO-DATE
|
FROM-DATE -- TO-DATE
|
||||||
in case TO-DATE is nil return Present.
|
in case TO-DATE is nil return Present.
|
||||||
If both dates are the same, return just FROM-DATE"
|
If both dates are the same, return just FROM-DATE"
|
||||||
(let ((from (when from-date (org-cv-utils-org-timestamp-to-shortdate from-date)))
|
(let ((from (org-cv-utils-org-timestamp-to-shortdate from-date))
|
||||||
(to (if (not to-date) "Present"
|
(to (if (not to-date) "Present"
|
||||||
(org-cv-utils-org-timestamp-to-shortdate to-date))))
|
(org-cv-utils-org-timestamp-to-shortdate to-date))))
|
||||||
|
(if (or (string= from to))
|
||||||
(if from
|
from
|
||||||
(if (or (string= from to))
|
(concat from " -- " to))))
|
||||||
from
|
|
||||||
(concat from " -- " to))
|
|
||||||
"")))
|
|
||||||
|
|
||||||
(defun org-cv-utils--parse-cventry (headline info)
|
(defun org-cv-utils--parse-cventry (headline info)
|
||||||
"Return alist describing the entry in HEADLINE.
|
"Return alist describing the entry in HEADLINE.
|
||||||
INFO is a plist used as a communication channel."
|
INFO is a plist used as a communication channel."
|
||||||
(let* ((title (org-export-data (org-element-property :title headline) info))
|
(let* ((title (org-export-data (org-element-property :title headline) info))
|
||||||
(date (org-element-property :DATE headline))
|
(date (org-element-property :DATE headline))
|
||||||
(from-date (or (org-element-property :FROM headline) date))
|
(from-date (or (org-element-property :FROM headline)
|
||||||
|
date
|
||||||
|
(user-error "No FROM property provided for cventry %s" title)))
|
||||||
(to-date (or (org-element-property :TO headline) date))
|
(to-date (or (org-element-property :TO headline) date))
|
||||||
(host (or (org-element-property :HOST headline)
|
(host (or (org-element-property :HOST headline)
|
||||||
(org-element-property :ORGANIZATION headline)
|
(org-element-property :ORGANIZATION headline)
|
||||||
|
@ -74,9 +73,7 @@ INFO is a plist used as a communication channel."
|
||||||
(org-element-property :EMPLOYER headline)
|
(org-element-property :EMPLOYER headline)
|
||||||
(org-element-property :EVENT headline) "")))
|
(org-element-property :EVENT headline) "")))
|
||||||
`((title . ,title)
|
`((title . ,title)
|
||||||
(from-date . ,(or from-date
|
(date . , (org-cv-utils--format-time-window from-date to-date))
|
||||||
(error "No FROM property provided for cventry %s" title)))
|
|
||||||
(to-date . ,to-date)
|
|
||||||
(host . ,host)
|
(host . ,host)
|
||||||
(location . ,(or (org-element-property :LOCATION headline) ""))
|
(location . ,(or (org-element-property :LOCATION headline) ""))
|
||||||
(image . ,(org-element-property :IMAGE headline)))))
|
(image . ,(org-element-property :IMAGE headline)))))
|
||||||
|
|
51
readme.org
51
readme.org
|
@ -81,10 +81,19 @@ put your foreseen job.
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
You can use org-modes hierarchical structure to describe your CV. To make a
|
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,
|
specific subtree an item describing an experience point (Job you have, degree
|
||||||
degree you pursued, etc.) you use the org properties drawer and with the
|
you pursued, etc.) you use the org properties drawer and with the =:CV_ENV:
|
||||||
=:CV_ENV: cventry= property. You should also include the =FROM= and =TO=
|
cventry= property. You should also include the =FROM= and =TO= properties
|
||||||
properties defining the span of the event, as =LOCATION= and =EMPLOYER=.
|
defining the span of the entry, as well as =LOCATION= and =EMPLOYER=.
|
||||||
|
|
||||||
|
Because work isn't everything we do, it is more meaningful to label differently
|
||||||
|
the host of those other events like studies, events, certifications, etc. Thus
|
||||||
|
=HOST=, =ORGANIZATION=, =INSTITUTION=, =SCHOOL=, =EMPLOYER= or =EVENT= are all
|
||||||
|
equivalent and the first match in that order has precedence.
|
||||||
|
|
||||||
|
=DATE= is a shortcut for =FROM= and =TO= when you have a single date in mind
|
||||||
|
instead of a range. Both =FROM= and =TO= override =DATE=.
|
||||||
|
|
||||||
#+BEGIN_SRC org :tangle workcontent.org
|
#+BEGIN_SRC org :tangle workcontent.org
|
||||||
,* Employement
|
,* Employement
|
||||||
,** One job
|
,** One job
|
||||||
|
@ -124,7 +133,7 @@ latex distributions. I maintain a fork of it, to work with my use case at
|
||||||
https://github.com/Titan-C/moderncv.git Feel free to use any or even your
|
https://github.com/Titan-C/moderncv.git Feel free to use any or even your
|
||||||
personal fork for your desired use case.
|
personal fork for your desired use case.
|
||||||
|
|
||||||
To configure the export for moderncv you need the addition options in your
|
To configure the export for moderncv you need the additional options in your
|
||||||
org file.
|
org file.
|
||||||
#+BEGIN_SRC org :tangle moderncv.org
|
#+BEGIN_SRC org :tangle moderncv.org
|
||||||
# CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
|
# CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
|
||||||
|
@ -253,9 +262,9 @@ Note that AwesomeCV uses the =fontspec= package, so you need to set =org-latex-c
|
||||||
| PHOTOSTYLE | Style of photo to use. Comma-separated values can include |
|
| PHOTOSTYLE | Style of photo to use. Comma-separated values can include |
|
||||||
| | circle/rectangle,edge/noedge,left/right. |
|
| | circle/rectangle,edge/noedge,left/right. |
|
||||||
| CVCOLOR | Color of highlights. |
|
| CVCOLOR | Color of highlights. |
|
||||||
| STACKOVERFLOW | Stack overflow info, must be specified as "=ID username=" |
|
| STACKOVERFLOW | Stack overflow info, must be specified as "=ID username=" |
|
||||||
| FONTDIR | Directory where the fonts can be found, defaults |
|
| FONTDIR | Directory where the fonts can be found, defaults |
|
||||||
| | to =fonts/= (as in the standard AwesomeCV) |
|
| | to =fonts/= (as in the standard AwesomeCV) |
|
||||||
| CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true |
|
| CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true |
|
||||||
| QUOTE | Optional quote to include at the top of the CV |
|
| QUOTE | Optional quote to include at the top of the CV |
|
||||||
| FIRSTNAME | First name to be shown in the CV. By default the first |
|
| FIRSTNAME | First name to be shown in the CV. By default the first |
|
||||||
|
@ -275,22 +284,22 @@ including =cvemployer=, =cvskills=, =cvhonors= and =cvschool= (see full list bel
|
||||||
Some of these support additional property fields:
|
Some of these support additional property fields:
|
||||||
|
|
||||||
#+attr_html: :class table table-striped
|
#+attr_html: :class table table-striped
|
||||||
| Field | Description |
|
| Field | Description |
|
||||||
|-----------+------------------------------------------------------------------|
|
|-----------+----------------------------------------------------------------------|
|
||||||
| FROM | Start date of the entry |
|
| FROM | Start date of the entry |
|
||||||
| TO | End date of the entry |
|
| TO | End date of the entry |
|
||||||
| DATE | Shortcut to specify both =FROM= and =TO= as the same date. |
|
| DATE | Shortcut to specify both =FROM= and =TO= as the same date. |
|
||||||
| | Both =FROM= and =TO= override =DATE=. |
|
| | Both =FROM= and =TO= override =DATE=. |
|
||||||
| EMPLOYER | Employer or organization, can also be specified |
|
| EMPLOYER | Employer or organization, can also be specified |
|
||||||
| | as =ORGANIZATION=, =SCHOOL=, =EVENT= or =POSITION= (different |
|
| | as =ORGANIZATION=, =SCHOOL=, =EVENT= or =POSITION= (different |
|
||||||
| | names make more sense depending on the type of environment) |
|
| | names make more sense depending on the type of environment) |
|
||||||
| LABEL | In =cvsubentry= environments, adds the given text to the left |
|
| LABEL | In =cvsubentry= environments, adds the given text to the left |
|
||||||
| | of the date range, can be used to add additional information |
|
| | of the date range, can be used to add additional information |
|
||||||
| | to the entry. |
|
| | to the entry. |
|
||||||
| RIGHT_IMG | path to an image to include floating to the right of a =cventry=, |
|
| 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. |
|
| | a =cvsubentry= or =cvschool= entry. Meant to be used to show a logo. |
|
||||||
| PAGEBREAK | Causes a LaTeX =\clearpage= statement to be inserted in the |
|
| PAGEBREAK | Causes a LaTeX =\clearpage= statement to be inserted in the |
|
||||||
| | exported output before the heading. |
|
| | exported output before the heading. |
|
||||||
|
|
||||||
All the supported values of =CV_ENV= for CVs are described below.
|
All the supported values of =CV_ENV= for CVs are described below.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue