-
Notifications
You must be signed in to change notification settings - Fork 23
/
README.Rmd
198 lines (151 loc) · 6.58 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
---
output:
md_document:
variant: markdown_github
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
```{r load-data,echo=FALSE}
data(jobs)
```
<!-- badges: start -->
[![R build status](https://github.com/jaredlander/resumer/workflows/R-CMD-check/badge.svg)](https://github.com/jaredlander/resumer/actions)
[![Coverage Status](https://img.shields.io/codecov/c/github/jaredlander/resumer/master.svg)](https://codecov.io/github/jaredlander/resumer?branch=master)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/resumer)](https://cran.r-project.org/package=resumer)
[![Downloads from the RStudio CRAN mirror](https://cranlogs.r-pkg.org/badges/resumer)](https://cran.r-project.org/package=resumer)
<!-- badges: end -->
# resumer
This package stores information for your CV in a CSV and compiles a nicely formatted LaTeX CV.
## Data
Your jobs should be stored in a CSV with these names: `r names(jobs)`.
An example file can be found in [`inst/examples/Jobs.csv`](https://github.com/jaredlander/resumer/blob/master/inst/examples/Jobs.csv) or by running
```{r show-jobs,eval=FALSE}
data(jobs)
head(jobs)
```
```{r show-jobs-do,echo=FALSE}
knitr::kable(head(jobs))
```
A helper function, `createJobFile`, creates a CSV with the correct headers.
Each row represents a detail about a job. So a job may take multiple rows.
The columns are:
- `JobName`: Name identifying this job. This is identifying information used when selecting which jobs to display.
- `Company`: Name of company.
- `Location`: Physical location of job.
- `Title`: Title held at job.
- `Start`: Start date of job, usually represented by a year.
- `End`: End date of job. This would ordinarily by a year, 'Present' or blank.
- `Bullet`: The detail about the job.
- `BulletName`: Identifier for this detail, used when selecting which details to display.
- `Type`: Should be either `Job` or `Research`.
- `Description`: Used for a quick blurb about research roles.
## Usage
In order to make this package as universal as possible it is designed for some information to be input in the yaml header and some in R code. Creating a new file using the template through RStudio will be easiest.
### yaml header
Here you put your name, address, the location of the jobs CSV, education information and any highlights. Remember, proper indenting is required for yaml.
The `name` and `address` fields are self explanatory. `output` takes the form of `package::function` which for this package is `resumer::resumer`.
The location of the jobs CSV is specified in the `JobFile` slot of the `params` entry. This should be the absolute path to the CSV.
These would look like this.
```yaml
---
name: "Generic Name"
address: "New York"
output: resumer::resumer
params:
JobFile: "examples/jobs.csv"
---
```
Supplying education information is done as a list in the `education` entry, with each school containing slots for `school`, `dates` and optionally `notes`. Each slot of the list is started with a `-`. The `notes` slot starts with a `|` and each line (except the last line) must end with two spaces.
For example:
```yaml
---
education:
- school: "Hudson University"
dates: "2007--2009"
notes: |
GPA 3.955
Master of Arts in Statistics
- school: "Smallville College"
dates: "2000--2004"
notes: |
Cumulative GPA 3.838 Summa Cum Laude, Honors in Mathematics
Bachelor of Science in Mathematics, Journalism Minor
The Wayne Award for Excellence in Mathematics
Member of Pi Mu Epsilon, a national honorary mathematics society
---
```
Providing a `highlights` section and confirming that they should be displayed with `doHighlights.
Each `bullet` in the `highlights` entry should be a list slot started by `-`. For example.
```yaml
---
doHighlights: yes
highlights:
- bullet: Author of \emph{Pulitzer Prize} winning article
- bullet: Organizer of \textbf{Glasses and Cowl} Meetup
- bullet: Analyzed global survey by the \textbf{Surveyors Inc}
- bullet: Professor of Journalism at \textbf{Hudson University}
- bullet: Thesis on \textbf{Facial Recognition Errors}
- bullet: Served as reporter in \textbf{Vientiane, Laos}
---
```
The exact structure of the yaml section will change as tweaks are made to the underlying template.
### R Code
Jobs and details are selected for display by building a list of lists named `jobList`. Each inner list represents a job and should have three unnamed elements:
- `CompanyName`
- `JobName`
- Vector of `BulletName`s
An example is:
```{r list-jobs,eval=FALSE}
jobList <- list(
list("Pied Piper", "Tech Startup", c(1, 3)),
list("Goliath National Bank", "Large Bank", 1:2),
list("Goliath National Bank", "Bank Intern", 1:3),
list("Surveyors Inc", "Survery Stats", 1:2),
list("Daily Planet", "Reporting", 2:4),
list("Hudson University", "Professor", c(1, 3:4)),
list("Hooli", "Coding Intern", c(1:3))
)
```
Research is specified similarly in `researchList`.
```{r list-research,eval=FALSE}
# generate a list of lists of research that list the company name, job name and bullet
researchList <- list(
list("Hudson University", "Oddie Research", 4:5),
list("Daily Planet", "Winning Article", 2)
)
```
The job file is read into the `jobs` variable using `read.csv2`.
```{r read-jobs,eval=FALSE}
library(resumer)
jobs <- read.csv2(params$JobFile, header=TRUE, sep=',', stringsAsFactors=FALSE)
```
The jobs and details are written to LaTeX using a code chunk with `results='asis'`.
```{r generatejob-section,results='asis',echo=FALSE,dependson=c('list-research', 'read-jobs'),eval=FALSE}
cat(generateSection(jobs, jobList))
```
Same with research details.
```{r generate-research-section,results='asis',echo=FALSE,eval=TRUE,dependson=c('list-research','read-jobs'),eval=FALSE}
#cat('\\clearpage')
cat(generateSection(jobs, researchList, sectionName='Research Experience', type='Research'))
```
### LaTeX
Regular LaTeX code can be used, such as in specifying an athletics section. Note that this uses a special `rSection` environment.
```LaTeX
\begin{rSection}{Athletics}
\textbf{Ice Hockey} \emph{Goaltender} | \textbf{Hudson University} | 2000--2004 \\
\textbf{Curling} \emph{Vice Skip} | \textbf{Hudson University} | 2000--2004
\end{rSection}
```
## Resources
### LaTeX Templates
- https://www.overleaf.com/learn/latex/How_to_write_a_LaTeX_class_file_and_design_your_own_CV_(Part_1)
### Pandoc
- https://pandoc.org/
- https://pandoc.org/MANUAL.html#heading-identifiers
- https://github.com/jgm/pandocfilters/blob/master/pandocfilters.py