-
Notifications
You must be signed in to change notification settings - Fork 0
/
examples.py
31 lines (29 loc) · 1.53 KB
/
examples.py
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
#%% Quick build
import orcid_cv as ocv
orcid_dir = r"C:\Users\somlab\Downloads\0000-0002-6806-3302"
output_fname = r"C:\Users\somlab\Downloads\test_cv_quickbuild.pdf"
ocv.quick_build(orcid_dir, output_fname)
#%% Custom example
import orcid_cv as ocv
orcid_dir = r"C:\Users\Somlab\Downloads\0000-0002-6806-3302"
output_fname = r"C:\Users\somlab\OneDrive - The University of Chicago\Miscellaneous\CMG_CV.pdf"
orcid_dict = ocv.extract_orcid_info(orcid_dir)
style = 'greenspon-default'
config = ocv.make_document_config(style)
doc_title = orcid_dict['personal']['fullname'] + ' - CV'
doc = ocv.SimpleDocTemplate(output_fname,
pagesize = ocv.letter,
leftMargin = config['margin'],
rightMargin = config['margin'],
topMargin = config['margin'],
bottomMargin = config['margin'],
title = doc_title)
elements = []
ocv.add_person_section(elements, orcid_dict, config)
ocv.add_affiliation_section(elements, orcid_dict, config, 'Employment', 'employment')
ocv.add_affiliation_section(elements, orcid_dict, config, 'Education', 'education')
ocv.add_work_section(elements, orcid_dict, config, 'Research Publications', ['journal-article','preprint'])
ocv.add_work_section(elements, orcid_dict, config, 'Talks', 'lecture-speech')
ocv.add_work_section(elements, orcid_dict, config, 'Book Chapters', 'book-chapter')
ocv.add_work_section(elements, orcid_dict, config, 'Software', 'software')
doc.build(elements)