https://github.com/SergChr/qcv
A JSON to HTML resume generator
https://github.com/SergChr/qcv
cv cv-builder resume resume-generator
Last synced: 11 months ago
JSON representation
A JSON to HTML resume generator
- Host: GitHub
- URL: https://github.com/SergChr/qcv
- Owner: SergChr
- License: mit
- Created: 2020-07-14T17:49:24.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-20T17:38:28.000Z (over 5 years ago)
- Last Synced: 2024-11-12T21:17:07.907Z (over 1 year ago)
- Topics: cv, cv-builder, resume, resume-generator
- Language: Rust
- Homepage:
- Size: 133 KB
- Stars: 11
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
`qcv` is a tool to generate HTML resume from JSON template.

## Content
- [Use cases](#use-cases)
- [How does it work](#how-does-it-work)
- [List of the available themes](/src/assets/themes/README.md)
- [Custom HTML themes](#custom-html-themes)
- **[How to install](#installing)**
## Use cases
#### Keeping a JSON resume in Git
The tool allows to have one JSON file where the resume information placed. It can be stored in a `git` repository to make the updating process more seamless. There could be branching applied for different versions; the diffs are more simpler to track.
No more `CV_1.pdf`, `CV_1_updated.pdf`, `CV_1_updated_for_facebook.pdf`.
#### Controlling and keeping track of the information
No need to move between different services that generate a resume or/and store it.
#### Generating a simple portfolio website
The tool generates a HTML file based on a HTML template that can be customized.
## How does it work
The tool replaces variables in a HTML template (see `src/assets/themes`) with corresponding values in the JSON template. Example:
This is a HTML template
```html
{{basics.name}}
```
The JSON template is
```json
{
"basics": {
"name": "John Doe"
}
}
```
So the result will be as follows:
```html
John Doe
```
#### Formatting rules
##### cv.json
This is the JSON template example below. It will be generated by the `init` command. It creates `cv.json` file with the similar content:
```json
{
"basics": {
"name": "John Doe",
"label": "Programmer",
"email": "john@gmail.com",
"phone": "(912) 555-4321",
"website": "http://johndoe.com",
"summary": "A brief summary on who I am",
"location": {
"country": "The Johnited States Of Doe",
"address": "2712 Broadway St",
"city": "San Francisco"
},
"profiles": [{
"network": "Twitter",
"username": "john",
"url": "http://twitter.com/john"
}]
},
"work": [{
"company": "Company",
"position": "President",
"website": "http://company.com",
"start_date": "2013-01-01",
"end_date": "2014-01-01",
"summary": "Description..."
}],
"projects": [{
"name": "An app to track time",
"description": "A web and mobile application that allowed 2500 people to track their working time"
}],
"education": [{
"institution": "University",
"area": "Software Development",
"study_type": "Bachelor",
"start_date": "2011-01-01",
"end_date": "2013-01-01",
"courses": [
"DB1101 - Basic SQL"
],
"location": "Washington DC, US"
}],
"skills": [{ "name": "Web Development" }],
"languages": [{
"language": "English",
"level": "Native speaker"
}]
}
```
Put your information into this file. Then use the `build simple` command to generate the `cv.html` output.
## Available themes
See [themes documentation](/src/assets/themes/README.md)
## Custom HTML themes
There is an ability to build your custom HTML template and generate a resume from it. Example:
```sh
$ qcv build-from my_theme.html
```
#### Formatting rules for the HTML templates
_As a reference, you could use "simple" theme (`src/assets/themes/simple/index.html`)._
##### Primitive/simple values
A value inside `{{ root_key }}` in a HTML template looks up for a key `root_key` in the `cv.json` file and replaces `{{ root_key }}` with the corresponding value. Nested keys should be written as `{{ root.nested.more_nested }}`. Say, we have the following `cv.json`:
```json
{
"basics": {
"name": "John Doe",
"label": "Programmer",
},
}
```
A theme could be:
```html
{{ basics.name }}
{{basics.label}}
```
CSS styles could be inside `` as well as Javascript code. A template is just a HTML with `{{ }}` that will be replaced with values from the `cv.json`.
##### Arrays
`cv.json` has arrays with objects. Like:
```json
{
"basics": {
"profiles": [{
"network": "Twitter",
"username": "john",
"url": "http://twitter.com/john"
}]
}
}
```
To map array values, the syntax is:
```html
<!-- Point a key which value is an array -->
{! basics.profiles
<!-- Note the number of braces here: { } not {{ }} -->
<!-- Number of spaces inside { } also doesn't matter -->
<div>{network}</div>
<p>{username}</p>
<a href="{url}">{url}</a>
!}
```
## Installing
#### Installing a crate
If you have Cargo installed, download [qcv crate](https://crates.io/crates/qcv) and use it globally in a terminal.
```sh
$ cargo install qcv
# Usage
$ qcv init
$ qcv build simple
```
#### Installing a binary
Download an archive in the [releases](https://github.com/SergChr/qcv/releases) section. E.g. for Ubuntu, download `...x86_64-unknown-linux-gnu.tar.gz`, unpack it, then use as follows:
```sh
# Create a JSON template
./qcv init
# Generate HTML file
./qcv build simple
```
#### Cloning the repo
Use this method if you have Rust ecosystem installed.
```sh
$ git clone <repo>
# Create cv.json template
$ cargo run init
# Build cv.html result based on cv.json
$ cargo run build simple
```