cv-tools-cli 2.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. cv_tools/__init__.py +7 -0
  2. cv_tools/__main__.py +5 -0
  3. cv_tools/api.py +123 -0
  4. cv_tools/bib.py +122 -0
  5. cv_tools/charset.py +142 -0
  6. cv_tools/cli.py +384 -0
  7. cv_tools/doctor.py +185 -0
  8. cv_tools/engine.py +320 -0
  9. cv_tools/loader.py +424 -0
  10. cv_tools/markup.py +614 -0
  11. cv_tools/migrate.py +222 -0
  12. cv_tools/model.py +192 -0
  13. cv_tools/render/__init__.py +1 -0
  14. cv_tools/render/html.py +581 -0
  15. cv_tools/render/latex.py +154 -0
  16. cv_tools/schema/cv-v2.schema.json +707 -0
  17. cv_tools/starter/cv.yaml +129 -0
  18. cv_tools/starter/publications.bib +55 -0
  19. cv_tools/templates/html/cv.css +252 -0
  20. cv_tools/templates/html/cv.html.jinja +19 -0
  21. cv_tools/templates/html/icons/github.svg +1 -0
  22. cv_tools/templates/html/icons/linkedin.svg +1 -0
  23. cv_tools/templates/html/icons/orcid.svg +1 -0
  24. cv_tools/templates/html/icons/twitter.svg +1 -0
  25. cv_tools/templates/html/macros.jinja +89 -0
  26. cv_tools/templates/latex/cv.tex.jinja +45 -0
  27. cv_tools/templates/latex/layouts/dated.jinja +12 -0
  28. cv_tools/templates/latex/layouts/entries-inline.jinja +23 -0
  29. cv_tools/templates/latex/layouts/entries.jinja +29 -0
  30. cv_tools/templates/latex/layouts/list.jinja +24 -0
  31. cv_tools/templates/latex/layouts/pairs.jinja +14 -0
  32. cv_tools/templates/latex/layouts/publications.jinja +14 -0
  33. cv_tools/templates/latex/layouts/text.jinja +10 -0
  34. cv_tools/templates/latex/orcid.pdf +0 -0
  35. cv_tools/templates/latex/packages.txt +47 -0
  36. cv_tools/templates/latex/resume.cls +265 -0
  37. cv_tools/templates/latex/unicode.txt +398 -0
  38. cv_tools/v1.py +484 -0
  39. cv_tools/validate.py +165 -0
  40. cv_tools/watch.py +76 -0
  41. cv_tools_cli-2.0.0.dist-info/METADATA +498 -0
  42. cv_tools_cli-2.0.0.dist-info/RECORD +46 -0
  43. cv_tools_cli-2.0.0.dist-info/WHEEL +5 -0
  44. cv_tools_cli-2.0.0.dist-info/entry_points.txt +2 -0
  45. cv_tools_cli-2.0.0.dist-info/licenses/LICENSE +21 -0
  46. cv_tools_cli-2.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,707 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://cv-tools.phonethk.com/schema/v2.json",
4
+ "title": "cv-tools CV (format version 2)",
5
+ "type": "object",
6
+ "required": [
7
+ "version",
8
+ "name"
9
+ ],
10
+ "additionalProperties": false,
11
+ "properties": {
12
+ "version": {
13
+ "const": 2,
14
+ "description": "Format version. Always 2."
15
+ },
16
+ "name": {
17
+ "$ref": "#/$defs/text",
18
+ "description": "Your name, printed as the page heading."
19
+ },
20
+ "date": {
21
+ "$ref": "#/$defs/dateText",
22
+ "description": "\"auto\" (default) prints the compile date. Anything else is text, printed with markup, such as \"Spring 2025\" or {latex: ...}. It must fit on one line."
23
+ },
24
+ "contact": {
25
+ "type": "array",
26
+ "maxItems": 3,
27
+ "items": {
28
+ "$ref": "#/$defs/contactLine"
29
+ },
30
+ "description": "Up to three lines under the name. Each line is a list of items."
31
+ },
32
+ "sections": {
33
+ "type": "array",
34
+ "items": {
35
+ "$ref": "#/$defs/sectionItem"
36
+ }
37
+ }
38
+ },
39
+ "$defs": {
40
+ "latex": {
41
+ "type": "object",
42
+ "required": [
43
+ "latex"
44
+ ],
45
+ "additionalProperties": false,
46
+ "properties": {
47
+ "latex": {
48
+ "type": "string",
49
+ "description": "Raw LaTeX, inserted verbatim."
50
+ }
51
+ }
52
+ },
53
+ "text": {
54
+ "x-expected": "text (a string, a number or {latex: ...})",
55
+ "if": {
56
+ "type": "object"
57
+ },
58
+ "then": {
59
+ "$ref": "#/$defs/latex"
60
+ },
61
+ "else": {
62
+ "type": [
63
+ "string",
64
+ "number"
65
+ ],
66
+ "x-expected": "text (a string, a number or {latex: ...})"
67
+ }
68
+ },
69
+ "textList": {
70
+ "type": "array",
71
+ "items": {
72
+ "$ref": "#/$defs/text"
73
+ }
74
+ },
75
+ "link": {
76
+ "x-expected": "a URL (a string or {latex: ...})",
77
+ "if": {
78
+ "type": "object"
79
+ },
80
+ "then": {
81
+ "$ref": "#/$defs/lineLatex"
82
+ },
83
+ "else": {
84
+ "type": "string",
85
+ "x-expected": "a URL (a string or {latex: ...})",
86
+ "not": {
87
+ "pattern": "[\\n\\r\\u000b\\u000c\\u001c-\\u001e\\u0085\\u2028\\u2029]"
88
+ },
89
+ "x-message": "contact items are single-line; add another contact line"
90
+ }
91
+ },
92
+ "linkItem": {
93
+ "type": "object",
94
+ "minProperties": 1,
95
+ "maxProperties": 1,
96
+ "additionalProperties": false,
97
+ "x-expected": "exactly one of the keys url, orcid, linkedin, github, twitter",
98
+ "properties": {
99
+ "url": {
100
+ "$ref": "#/$defs/link",
101
+ "description": "A web address, printed as a link."
102
+ },
103
+ "orcid": {
104
+ "$ref": "#/$defs/link",
105
+ "description": "An ORCID iD, printed as the ORCID icon."
106
+ },
107
+ "linkedin": {
108
+ "$ref": "#/$defs/link",
109
+ "description": "A LinkedIn URL, printed as an icon."
110
+ },
111
+ "github": {
112
+ "$ref": "#/$defs/link",
113
+ "description": "A GitHub URL, printed as an icon."
114
+ },
115
+ "twitter": {
116
+ "$ref": "#/$defs/link",
117
+ "description": "A Twitter URL, printed as an icon."
118
+ }
119
+ }
120
+ },
121
+ "contactItem": {
122
+ "if": {
123
+ "type": "object",
124
+ "required": [
125
+ "latex"
126
+ ]
127
+ },
128
+ "then": {
129
+ "$ref": "#/$defs/lineLatex"
130
+ },
131
+ "else": {
132
+ "if": {
133
+ "type": "object"
134
+ },
135
+ "then": {
136
+ "$ref": "#/$defs/linkItem"
137
+ },
138
+ "else": {
139
+ "type": [
140
+ "string",
141
+ "number"
142
+ ],
143
+ "x-expected": "a contact item (text or a {url: ...} style mapping)",
144
+ "not": {
145
+ "type": "string",
146
+ "pattern": "[\\n\\r\\u000b\\u000c\\u001c-\\u001e\\u0085\\u2028\\u2029]"
147
+ },
148
+ "x-message": "contact items are single-line; add another contact line"
149
+ }
150
+ }
151
+ },
152
+ "contactLine": {
153
+ "if": {
154
+ "type": "object"
155
+ },
156
+ "then": {
157
+ "type": "object",
158
+ "required": [
159
+ "items"
160
+ ],
161
+ "additionalProperties": false,
162
+ "properties": {
163
+ "items": {
164
+ "type": "array",
165
+ "items": {
166
+ "$ref": "#/$defs/contactItem"
167
+ }
168
+ },
169
+ "separator": {
170
+ "$ref": "#/$defs/lineText",
171
+ "description": "Printed between items. Default \" | \"."
172
+ }
173
+ }
174
+ },
175
+ "else": {
176
+ "type": "array",
177
+ "items": {
178
+ "$ref": "#/$defs/contactItem"
179
+ },
180
+ "x-expected": "a contact line (a list of items, or {items: [...]})"
181
+ }
182
+ },
183
+ "sectionItem": {
184
+ "if": {
185
+ "type": "string"
186
+ },
187
+ "then": {
188
+ "const": "newpage",
189
+ "x-expected": "'newpage' or a section mapping"
190
+ },
191
+ "else": {
192
+ "$ref": "#/$defs/section"
193
+ }
194
+ },
195
+ "section": {
196
+ "type": "object",
197
+ "required": [
198
+ "title",
199
+ "layout"
200
+ ],
201
+ "properties": {
202
+ "layout": {
203
+ "enum": [
204
+ "entries",
205
+ "entries-inline",
206
+ "list",
207
+ "pairs",
208
+ "dated",
209
+ "text",
210
+ "publications"
211
+ ]
212
+ }
213
+ },
214
+ "allOf": [
215
+ {
216
+ "if": {
217
+ "required": [
218
+ "layout"
219
+ ],
220
+ "properties": {
221
+ "layout": {
222
+ "const": "entries"
223
+ }
224
+ }
225
+ },
226
+ "then": {
227
+ "$ref": "#/$defs/section-entries"
228
+ }
229
+ },
230
+ {
231
+ "if": {
232
+ "required": [
233
+ "layout"
234
+ ],
235
+ "properties": {
236
+ "layout": {
237
+ "const": "entries-inline"
238
+ }
239
+ }
240
+ },
241
+ "then": {
242
+ "$ref": "#/$defs/section-entries-inline"
243
+ }
244
+ },
245
+ {
246
+ "if": {
247
+ "required": [
248
+ "layout"
249
+ ],
250
+ "properties": {
251
+ "layout": {
252
+ "const": "list"
253
+ }
254
+ }
255
+ },
256
+ "then": {
257
+ "$ref": "#/$defs/section-list"
258
+ }
259
+ },
260
+ {
261
+ "if": {
262
+ "required": [
263
+ "layout"
264
+ ],
265
+ "properties": {
266
+ "layout": {
267
+ "const": "pairs"
268
+ }
269
+ }
270
+ },
271
+ "then": {
272
+ "$ref": "#/$defs/section-pairs"
273
+ }
274
+ },
275
+ {
276
+ "if": {
277
+ "required": [
278
+ "layout"
279
+ ],
280
+ "properties": {
281
+ "layout": {
282
+ "const": "dated"
283
+ }
284
+ }
285
+ },
286
+ "then": {
287
+ "$ref": "#/$defs/section-dated"
288
+ }
289
+ },
290
+ {
291
+ "if": {
292
+ "required": [
293
+ "layout"
294
+ ],
295
+ "properties": {
296
+ "layout": {
297
+ "const": "text"
298
+ }
299
+ }
300
+ },
301
+ "then": {
302
+ "$ref": "#/$defs/section-text"
303
+ }
304
+ },
305
+ {
306
+ "if": {
307
+ "required": [
308
+ "layout"
309
+ ],
310
+ "properties": {
311
+ "layout": {
312
+ "const": "publications"
313
+ }
314
+ }
315
+ },
316
+ "then": {
317
+ "$ref": "#/$defs/section-publications"
318
+ }
319
+ }
320
+ ]
321
+ },
322
+ "section-entries": {
323
+ "type": "object",
324
+ "required": [
325
+ "title",
326
+ "layout",
327
+ "entries"
328
+ ],
329
+ "additionalProperties": false,
330
+ "properties": {
331
+ "title": {
332
+ "$ref": "#/$defs/text"
333
+ },
334
+ "layout": {
335
+ "const": "entries"
336
+ },
337
+ "description": {
338
+ "$ref": "#/$defs/text"
339
+ },
340
+ "entries": {
341
+ "type": "array",
342
+ "items": {
343
+ "$ref": "#/$defs/entry"
344
+ }
345
+ }
346
+ }
347
+ },
348
+ "section-entries-inline": {
349
+ "type": "object",
350
+ "required": [
351
+ "title",
352
+ "layout",
353
+ "entries"
354
+ ],
355
+ "additionalProperties": false,
356
+ "properties": {
357
+ "title": {
358
+ "$ref": "#/$defs/text"
359
+ },
360
+ "layout": {
361
+ "const": "entries-inline"
362
+ },
363
+ "description": {
364
+ "$ref": "#/$defs/text"
365
+ },
366
+ "entries": {
367
+ "type": "array",
368
+ "items": {
369
+ "$ref": "#/$defs/entry"
370
+ }
371
+ }
372
+ }
373
+ },
374
+ "entry": {
375
+ "type": "object",
376
+ "required": [
377
+ "title"
378
+ ],
379
+ "additionalProperties": false,
380
+ "properties": {
381
+ "title": {
382
+ "$ref": "#/$defs/text"
383
+ },
384
+ "date": {
385
+ "$ref": "#/$defs/text"
386
+ },
387
+ "subtitle": {
388
+ "$ref": "#/$defs/text"
389
+ },
390
+ "note": {
391
+ "$ref": "#/$defs/text"
392
+ },
393
+ "location": {
394
+ "$ref": "#/$defs/text"
395
+ },
396
+ "details": {
397
+ "$ref": "#/$defs/textList"
398
+ },
399
+ "bullets": {
400
+ "$ref": "#/$defs/textList"
401
+ }
402
+ }
403
+ },
404
+ "section-list": {
405
+ "type": "object",
406
+ "required": [
407
+ "title",
408
+ "layout",
409
+ "entries"
410
+ ],
411
+ "additionalProperties": false,
412
+ "properties": {
413
+ "title": {
414
+ "$ref": "#/$defs/text"
415
+ },
416
+ "layout": {
417
+ "const": "list"
418
+ },
419
+ "description": {
420
+ "$ref": "#/$defs/text"
421
+ },
422
+ "entries": {
423
+ "type": "array",
424
+ "items": {
425
+ "$ref": "#/$defs/listEntry"
426
+ }
427
+ }
428
+ }
429
+ },
430
+ "listEntry": {
431
+ "if": {
432
+ "type": "object",
433
+ "required": [
434
+ "latex"
435
+ ]
436
+ },
437
+ "then": {
438
+ "$ref": "#/$defs/latex"
439
+ },
440
+ "else": {
441
+ "if": {
442
+ "type": "object"
443
+ },
444
+ "then": {
445
+ "type": "object",
446
+ "required": [
447
+ "text"
448
+ ],
449
+ "additionalProperties": false,
450
+ "properties": {
451
+ "text": {
452
+ "$ref": "#/$defs/text"
453
+ },
454
+ "bullets": {
455
+ "$ref": "#/$defs/textList"
456
+ }
457
+ }
458
+ },
459
+ "else": {
460
+ "$ref": "#/$defs/text"
461
+ }
462
+ }
463
+ },
464
+ "section-pairs": {
465
+ "type": "object",
466
+ "required": [
467
+ "title",
468
+ "layout",
469
+ "entries"
470
+ ],
471
+ "additionalProperties": false,
472
+ "properties": {
473
+ "title": {
474
+ "$ref": "#/$defs/text"
475
+ },
476
+ "layout": {
477
+ "const": "pairs"
478
+ },
479
+ "description": {
480
+ "$ref": "#/$defs/text"
481
+ },
482
+ "entries": {
483
+ "type": "array",
484
+ "items": {
485
+ "type": "object",
486
+ "required": [
487
+ "title",
488
+ "text"
489
+ ],
490
+ "additionalProperties": false,
491
+ "properties": {
492
+ "title": {
493
+ "$ref": "#/$defs/text"
494
+ },
495
+ "text": {
496
+ "$ref": "#/$defs/text"
497
+ }
498
+ }
499
+ }
500
+ }
501
+ }
502
+ },
503
+ "section-dated": {
504
+ "type": "object",
505
+ "required": [
506
+ "title",
507
+ "layout",
508
+ "entries"
509
+ ],
510
+ "additionalProperties": false,
511
+ "properties": {
512
+ "title": {
513
+ "$ref": "#/$defs/text"
514
+ },
515
+ "layout": {
516
+ "const": "dated"
517
+ },
518
+ "description": {
519
+ "$ref": "#/$defs/text"
520
+ },
521
+ "entries": {
522
+ "type": "array",
523
+ "items": {
524
+ "$ref": "#/$defs/datedEntry"
525
+ }
526
+ }
527
+ }
528
+ },
529
+ "section-text": {
530
+ "type": "object",
531
+ "required": [
532
+ "title",
533
+ "layout",
534
+ "entries"
535
+ ],
536
+ "additionalProperties": false,
537
+ "properties": {
538
+ "title": {
539
+ "$ref": "#/$defs/text"
540
+ },
541
+ "layout": {
542
+ "const": "text"
543
+ },
544
+ "description": {
545
+ "$ref": "#/$defs/text"
546
+ },
547
+ "entries": {
548
+ "type": "array",
549
+ "items": {
550
+ "$ref": "#/$defs/textEntry"
551
+ }
552
+ }
553
+ }
554
+ },
555
+ "section-publications": {
556
+ "type": "object",
557
+ "required": [
558
+ "title",
559
+ "layout",
560
+ "bib"
561
+ ],
562
+ "additionalProperties": false,
563
+ "properties": {
564
+ "title": {
565
+ "$ref": "#/$defs/text"
566
+ },
567
+ "layout": {
568
+ "const": "publications"
569
+ },
570
+ "description": {
571
+ "$ref": "#/$defs/text"
572
+ },
573
+ "bib": {
574
+ "type": "string",
575
+ "description": "Path to a .bib file, relative to this YAML file."
576
+ },
577
+ "highlight": {
578
+ "type": "array",
579
+ "items": {
580
+ "type": "string"
581
+ },
582
+ "description": "Author names to print in bold. Default: [name]."
583
+ }
584
+ }
585
+ },
586
+ "lineText": {
587
+ "x-expected": "text (a string, a number or {latex: ...})",
588
+ "if": {
589
+ "type": "object"
590
+ },
591
+ "then": {
592
+ "$ref": "#/$defs/lineLatex"
593
+ },
594
+ "else": {
595
+ "type": [
596
+ "string",
597
+ "number"
598
+ ],
599
+ "x-expected": "text (a string, a number or {latex: ...})",
600
+ "not": {
601
+ "type": "string",
602
+ "pattern": "[\\n\\r\\u000b\\u000c\\u001c-\\u001e\\u0085\\u2028\\u2029]"
603
+ },
604
+ "x-message": "contact items are single-line; add another contact line"
605
+ }
606
+ },
607
+ "lineLatex": {
608
+ "$ref": "#/$defs/latex",
609
+ "properties": {
610
+ "latex": {
611
+ "type": "string",
612
+ "not": {
613
+ "pattern": "\\n[ \\t]*\\n"
614
+ },
615
+ "x-message": "a blank line ends the paragraph; contact items and the date must not contain one"
616
+ }
617
+ }
618
+ },
619
+ "textEntry": {
620
+ "if": {
621
+ "type": "object",
622
+ "required": [
623
+ "latex"
624
+ ]
625
+ },
626
+ "then": {
627
+ "$ref": "#/$defs/latex"
628
+ },
629
+ "else": {
630
+ "if": {
631
+ "type": "object"
632
+ },
633
+ "then": {
634
+ "type": "object",
635
+ "required": [
636
+ "text"
637
+ ],
638
+ "additionalProperties": false,
639
+ "properties": {
640
+ "text": {
641
+ "$ref": "#/$defs/text"
642
+ }
643
+ }
644
+ },
645
+ "else": {
646
+ "$ref": "#/$defs/text"
647
+ }
648
+ }
649
+ },
650
+ "datedEntry": {
651
+ "if": {
652
+ "type": "object",
653
+ "required": [
654
+ "latex"
655
+ ]
656
+ },
657
+ "then": {
658
+ "$ref": "#/$defs/latex"
659
+ },
660
+ "else": {
661
+ "if": {
662
+ "type": "object"
663
+ },
664
+ "then": {
665
+ "type": "object",
666
+ "required": [
667
+ "text"
668
+ ],
669
+ "additionalProperties": false,
670
+ "properties": {
671
+ "date": {
672
+ "$ref": "#/$defs/text",
673
+ "description": "Split at its last space into two columns, such as \"Nov. 2023\"."
674
+ },
675
+ "text": {
676
+ "$ref": "#/$defs/text"
677
+ }
678
+ }
679
+ },
680
+ "else": {
681
+ "$ref": "#/$defs/text"
682
+ }
683
+ }
684
+ },
685
+ "dateText": {
686
+ "x-expected": "text (a string, a number or {latex: ...})",
687
+ "if": {
688
+ "type": "object"
689
+ },
690
+ "then": {
691
+ "$ref": "#/$defs/lineLatex"
692
+ },
693
+ "else": {
694
+ "type": [
695
+ "string",
696
+ "number"
697
+ ],
698
+ "x-expected": "text (a string, a number or {latex: ...})",
699
+ "not": {
700
+ "type": "string",
701
+ "pattern": "[\\n\\r\\u000b\\u000c\\u001c-\\u001e\\u0085\\u2028\\u2029]"
702
+ },
703
+ "x-message": "the date is printed in a contact line and must be single-line"
704
+ }
705
+ }
706
+ }
707
+ }