mirror of
https://gitlab.com/Titan-C/org-cv.git
synced 2024-12-22 04:29:04 +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.
|
||||
|
||||
<div class="ox-hugo-table table table-striped">
|
||||
<div></div>
|
||||
|
||||
| Field | Description |
|
||||
|----------|----------------------------------------------------|
|
||||
|
@ -47,10 +46,18 @@ put your foreseen job.
|
|||
```
|
||||
|
||||
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`.
|
||||
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 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
|
||||
* 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
|
||||
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
|
||||
|
@ -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:
|
||||
|
||||
<div class="ox-hugo-table table table-striped">
|
||||
<div></div>
|
||||
|
||||
| Field | Description |
|
||||
|------------------|-------------------------------------------------------------|
|
||||
| PHOTOSTYLE | Style of photo to use. Comma-separated values can include |
|
||||
| | circle/rectangle,edge/noedge,left/right. |
|
||||
| CVCOLOR | Color of highlights. |
|
||||
| STACKOVERFLOW | Stack overflow info, must be specified as "`ID username`" |
|
||||
| FONTDIR | Directory where the fonts can be found, defaults |
|
||||
| | to `fonts/` (as in the standard AwesomeCV) |
|
||||
| CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true |
|
||||
| QUOTE | Optional quote to include at the top of the CV |
|
||||
| FIRSTNAME | First name to be shown in the CV. By default the first |
|
||||
| | space-separated part of AUTHOR is used. |
|
||||
| LASTNAME | Last name to be shown in the CV. By default the second |
|
||||
| | space-separated part of AUTHOR is used. |
|
||||
| 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\_RIGHT | Text to include in the right footer. None by default. |
|
||||
| LATEX\_TITLE | Text to use as the title section. \makecvheader by default. |
|
||||
| | (Can specify \makecvheader[R] to justify to the right) |
|
||||
| Field | Description |
|
||||
|-----------------|-------------------------------------------------------------|
|
||||
| PHOTOSTYLE | Style of photo to use. Comma-separated values can include |
|
||||
| | circle/rectangle,edge/noedge,left/right. |
|
||||
| CVCOLOR | Color of highlights. |
|
||||
| STACKOVERFLOW | Stack overflow info, must be specified as "`ID username`" |
|
||||
| FONTDIR | Directory where the fonts can be found, defaults |
|
||||
| | to `fonts/` (as in the standard AwesomeCV) |
|
||||
| CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true |
|
||||
| QUOTE | Optional quote to include at the top of the CV |
|
||||
| FIRSTNAME | First name to be shown in the CV. By default the first |
|
||||
| | space-separated part of AUTHOR is used. |
|
||||
| LASTNAME | Last name to be shown in the CV. By default the second |
|
||||
| | space-separated part of AUTHOR is used. |
|
||||
| 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_RIGHT | Text to include in the right footer. None by default. |
|
||||
| LATEX_TITLE | Text to use as the title section. \makecvheader by default. |
|
||||
| | (Can specify \makecvheader[R] to justify to the right) |
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -152,24 +151,23 @@ including `cvemployer`, `cvskills`, `cvhonors` and `cvschool` (see full list bel
|
|||
Some of these support additional property fields:
|
||||
|
||||
<div class="ox-hugo-table table table-striped">
|
||||
<div></div>
|
||||
|
||||
| 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. |
|
||||
| PAGEBREAK | Causes a LaTeX `\clearpage` statement to be inserted in the |
|
||||
| | exported output before the heading. |
|
||||
| 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. |
|
||||
| PAGEBREAK | Causes a LaTeX `\clearpage` statement to be inserted in the |
|
||||
| | exported output before the heading. |
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -262,19 +260,18 @@ They will *not* be exported.
|
|||
```
|
||||
|
||||
<div class="ox-hugo-table table table-striped">
|
||||
<div></div>
|
||||
|
||||
| Field | Description |
|
||||
|------------------|----------------------------------------------------------------------------------|
|
||||
| RECIPIENT | Addressee E.g. Company Recruitment Team |
|
||||
| EMPLOYER | Company name |
|
||||
| LOCATION | Company address |
|
||||
| LETTER\_OPENING | Letter opening, E.g. Dear Ms./Mr./Dr. LastName |
|
||||
| LETTER\_CLOSING | Letter closing, E.g. Yours Sincerely, |
|
||||
| DATE | The date used for the letter, uses \\\today as default if unspecified |
|
||||
| DATEFORMAT | Specify an alternative date format for the letter header |
|
||||
| | 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" |
|
||||
| Field | Description |
|
||||
|-----------------|----------------------------------------------------------------------------------|
|
||||
| RECIPIENT | Addressee E.g. Company Recruitment Team |
|
||||
| EMPLOYER | Company name |
|
||||
| LOCATION | Company address |
|
||||
| LETTER_OPENING | Letter opening, E.g. Dear Ms./Mr./Dr. LastName |
|
||||
| LETTER_CLOSING | Letter closing, E.g. Yours Sincerely, |
|
||||
| DATE | The date used for the letter, uses \\\today as default if unspecified |
|
||||
| DATEFORMAT | Specify an alternative date format for the letter header |
|
||||
| | 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" |
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -50,22 +50,21 @@ today => today"
|
|||
FROM-DATE -- TO-DATE
|
||||
in case TO-DATE is nil return Present.
|
||||
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"
|
||||
(org-cv-utils-org-timestamp-to-shortdate to-date))))
|
||||
|
||||
(if from
|
||||
(if (or (string= from to))
|
||||
from
|
||||
(concat from " -- " to))
|
||||
"")))
|
||||
(if (or (string= from to))
|
||||
from
|
||||
(concat from " -- " to))))
|
||||
|
||||
(defun org-cv-utils--parse-cventry (headline info)
|
||||
"Return alist describing the entry in HEADLINE.
|
||||
INFO is a plist used as a communication channel."
|
||||
(let* ((title (org-export-data (org-element-property :title headline) info))
|
||||
(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))
|
||||
(host (or (org-element-property :HOST 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 :EVENT headline) "")))
|
||||
`((title . ,title)
|
||||
(from-date . ,(or from-date
|
||||
(error "No FROM property provided for cventry %s" title)))
|
||||
(to-date . ,to-date)
|
||||
(date . , (org-cv-utils--format-time-window from-date to-date))
|
||||
(host . ,host)
|
||||
(location . ,(or (org-element-property :LOCATION headline) ""))
|
||||
(image . ,(org-element-property :IMAGE headline)))))
|
||||
|
|
51
readme.org
51
readme.org
|
@ -81,10 +81,19 @@ put your foreseen job.
|
|||
#+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=.
|
||||
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 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
|
||||
,* Employement
|
||||
,** 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
|
||||
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.
|
||||
#+BEGIN_SRC org :tangle moderncv.org
|
||||
# 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 |
|
||||
| | circle/rectangle,edge/noedge,left/right. |
|
||||
| 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 |
|
||||
| | to =fonts/= (as in the standard AwesomeCV) |
|
||||
| | to =fonts/= (as in the standard AwesomeCV) |
|
||||
| CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true |
|
||||
| QUOTE | Optional quote to include at the top of the CV |
|
||||
| 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:
|
||||
|
||||
#+attr_html: :class table table-striped
|
||||
| Field | Description |
|
||||
|-----------+------------------------------------------------------------------|
|
||||
| FROM | Start date of the entry |
|
||||
| TO | End date of the entry |
|
||||
| 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=, |
|
||||
| | 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. |
|
||||
| PAGEBREAK | Causes a LaTeX =\clearpage= statement to be inserted in the |
|
||||
| | exported output before the heading. |
|
||||
| PAGEBREAK | Causes a LaTeX =\clearpage= statement to be inserted in the |
|
||||
| | exported output before the heading. |
|
||||
|
||||
All the supported values of =CV_ENV= for CVs are described below.
|
||||
|
||||
|
|
Loading…
Reference in a new issue