Tutorial

This is where you will learn how to use yaml-resume.

Create a resume

Create a resume is easy. You can obviously edit the sample.yml or use the yaml-resume cli to prompt the questions to build your resume:

$ yaml-resume init my-resume.yml

The init subcommand of yaml-resume will prompt all the fields of the resume according to the schema.

Validate the resume

To validate your yaml file, just use the yaml-resume cli again:

$ yaml-resume validate my-resume.yml

The validate subcommand of yaml-resume will check your yaml file against the schema and return the possible errors like missing or unknown field, regex not matched…

Export the resume to html/pdf

To export your yaml resume to html/pdf and apply a theme:

$ yaml-resume export my-resume.yml [-t <theme>] [-e <html|pdf>] [-i <picture>] [-o <output-file>]

By default, the theme is classic, the format is html and the output file will be resume.html.

Schema

yaml-resume uses Cerberus to define a schema and validate our yaml-resume against this schema.

The schema is available inside the yaml_resume.validator.schema module.

Global schema

The global schema shows the different sections and restrictions including subschemas.

 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
resume = {
    "contact": {
        "type": "dict",
        "required": True,
        "require_all": True,
        "schema": contact,
    },
    "profiles": {
        "type": "list",
        "required": False,
        "require_all": True,
        "schema": {"type": "dict", "schema": profile},
    },
    "experiences": {
        "type": "list",
        "required": True,
        "require_all": True,
        "schema": {"type": "dict", "schema": experience},
    },
    "education": {
        "type": "list",
        "required": True,
        "require_all": True,
        "schema": {"type": "dict", "schema": degree},
    },
    "skills": {
        "type": "list",
        "required": True,
        "require_all": True,
        "schema": {"type": "dict", "schema": skill},
    },
    "languages": {
        "type": "list",
        "required": False,
        "require_all": True,
        "schema": {"type": "dict", "schema": language},
    },
    "projects": {
        "type": "list",
        "required": False,
        "require_all": True,
        "schema": {"type": "dict", "schema": project},
    },
    "hobbies": {
        "type": "list",
        "required": False,
        "require_all": False,
        "schema": {"type": "dict", "schema": hobby},
    },
}

Subschemas

The subschemas are defined the same as the global schema but describes inner sections. For example:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
contact = {
    "name": {"type": "string"},
    "job": {"type": "string"},
    "date_of_birth": {"type": "string", "regex": DOB_REGEX},
    "email": {"type": "string", "regex": EMAIL_REGEX},
    "phone": {"type": "string", "regex": PHONE_NUMBER_REGEX},
    "location": {
        "type": "dict",
        "required": True,
        "require_all": True,
        "schema": location,
    },
}

Regular expressions

The regular expressions are defined to verify validity of the data: for example an email address should respect a format such as john@doe.com.

1
EMAIL_REGEX = r"(\w+[.|\w])*@(\w+[.])+\w+"

Example

An YAML resume example is avalaible in the project as sample.yml:

contact:
  name: John Doe
  email: john@doe.com
  date_of_birth: 01/01/1990
  job: Python Developer
  location:
    address: 10 Downing Street
    city: London
    country: UK
    zip: SW1A 2AA
  phone: '+44612345678'
experiences:
- company: Foo company
  position: Senior Python Developer
  start_date: January 2018
  summary: |
        Developer for the main Foo webapp
        Worked on migration from python 2.7 to 3.6
        Scrum master for the team of 8 people
        Added automated unit tests
  website: https://foo.com
  tags:
  - flask
  - mongodb
  - redis
  - pytest
  - scrum
- company: Bar company
  position: Python developer
  start_date: January 2014
  end_date: December 2017
  summary: |
        Made Bar backoffice main features
        Worked on CI/CD
  website: https://bar.net
  tags:
  - django
  - mysql
  - jenkins
- company: Bar company
  position: Junior python developer
  start_date: January 2012
  end_date: December 2013
  website: https://bar.net
  summary: |
        Made multiple KPI dashboards
        Provided automation scripts
profiles:
- network: Facebook
  url: https://facebook.com/johndoe
- network: Twitter
  url: https://twitter.com/nottherealjohndoe
- network: Personal website
  url: https://john.doe.fake
education:
- degree: Bachelor of Software Engineering
  start_date: January 2008
  end_date: January 2012
  institution: University of California, Berkeley
  website: https://www.berkeley.edu
skills:
- name: Python
  level: 90
- name: Flask
  level: 80
- name: Scrum
  level: 80
- name: Java
  level: 50
languages:
- name: English
  level: Native language
- name: French
  level: Proficient
projects:
- name: foo.bar
  description: Just an useless app
  url: https://github.com/johndoe/foo.bar
hobbies:
- name: History
- name: Sport
  details: Running and weightlifting