generated from neurogenomics/templateR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autoCV.Rmd
99 lines (69 loc) · 2.35 KB
/
autoCV.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
---
title: "autoCV"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{autoCV}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r setup, include=TRUE}
library(autoCV)
```
# Set up data
## Get example data
```{r Get example data}
wd <- autoCV::get_data(save_dir = file.path(tempdir(),"example_data"))
### List all files, grouped by subfolder
autoCV::get_data_list(wd)
```
## Customise data
Now you may edit each file as needed to customise your CV.
The subfolders are organised as follows:
- `cv_data/` contains the data files for each section of the CV.
- `img/` contains any images you wish to include in the CV.
- `css/` contains the CSS file for styling the CV.
# Create CV
## Set up template
```{r Set up template}
file <- autoCV::get_template(wd = wd,
save_dir = tempdir(),
tagline = "Simplicity is the ultimate sophistication.",
extra = list("### Studio of Andrea del Verrocchio",
"### Painter, Draughtsman, Engineer, Scientist",
"### MD, PhD"),
logo = get_logo(img = system.file("img","davinci.png",
package = "autoCV"),
width = "60px"),
force_new = TRUE
)
```
You can then inspect and make any further edits to the Rmarkdown file
by opening it with in RStudio with: `browseURL(file)`
```{r, eval=FALSE}
browseURL(file)
```
## Render as HTML
To generate the CV, render the template file with `render_cv`.
```{r Render template, eval=FALSE}
file_html <- autoCV::render_cv(file = file)
```
You can then open the rendered HTML file in RStudio with: `browseURL(file_html)`
```{r, eval=FALSE}
browseURL(file_html)
```
## Render as PDF
To render the CV as a PDF instead, simply use the `as_pdf` argument.
```{r, eval=FALSE}
file_pdf <- autoCV::render_cv(file = file,
as_pdf = TRUE)
```
# Rendered examples
See here for an example of a rendered CV:
## [HTML format](https://bschilder.github.io/CV/CV.html)
## [PDF format](https://bschilder.github.io/CV/CV.pdf)
# Session info
<details>
```{r}
utils::sessionInfo()
```
</details>