Skip to content
jpadenPublic

About

Generate a general CV and a promotion-and-tenure CV (.docx) from one Excel workbook. Python standard library only.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

CV from a spreadsheet

Keep every CV entry in one Excel workbook, one worksheet per kind of entry, and generate two Word documents from it:

  • a general CV to hand out, and
  • a promotion and tenure (P&T) CV in the layout of the University of Kansas "MSWord CV Template", with the supplemental line that the KU EECS department asks for under each recent publication.

Python standard library only. Nothing to install, and no template file is needed: both documents are written from scratch.

Quick start

python make_example.py example/example-cv-data.xlsx
python cv_generate.py  example/example-cv-data.xlsx example/example-cv.docx
python pt_generate.py  example/example-cv-data.xlsx example/example-pt-cv.docx

The example folder holds the results: the workbook, both Word documents, and a PDF of each for a quick look. Everything in the example is invented (person, university, co-authors, students, award numbers, DOIs).

To start your own, copy example/example-cv-data.xlsx, replace the rows, and run the two generators on your copy. Keep your own workbook out of this repository if it holds student names.

The workbook

Columns with a blue header are yours to edit. Gray columns are for reference and are not printed. A column is found by its header text before the first (, so the hint in parentheses can be reworded but the leading words must stay. Entries print in row order; numbered lists are numbered by the generators.

Worksheet One row per Used by
Personal last name, first name, middle initial both
Education degree both
Employment position (short form) both
Courses course taught both
Undergrad-Advising undergraduate mentee both
Grad-Advising graduate student or postdoctoral fellow, by fields both
Honors honor or award, with category Teaching, Research or Service both
Publications publication; List is Major, Minor or Submitted both
Software-Data software or data product both
Presentations presentation; List is Major or Minor both
Grants grant or proposal; Type is Funded, Under review, Submitted, not funded, or Internal funding both
Patents patent; Type is Approved or Submitted both
Service service item, with group and level both
Notes a note printed under a list heading, such as how major and minor are defined P&T CV
CV-Contact a line of the contact block (left and right half) general CV
CV-Text a paragraph under a section heading of your choice general CV
CV-Experience responsibilities of a position, and earlier positions general CV
CV-Teaching-Other other teaching, such as teaching assistantships general CV
CV-Field-Work field season general CV
CV-Collaborations collaborating institution general CV
Settings an option; the last column says what each one does both

Details that matter:

  • Before/after appointment. The P&T CV prints the entries after the appointment first, then a ruled line, then the earlier entries. The general CV ignores the column.
  • Citations. Write the citation as it should print. The forms of your name listed in Settings are printed in bold. The Venue column must repeat the venue exactly as it appears in the citation; that part is printed in italics.
  • Supplemental line. The five columns from "Peer review" to "My contribution" form the line under a publication in the P&T CV. Leave them empty for a publication that needs no line.
  • Grants. Write a funded grant as dates: agency, title, award. <institution> investigators: name (role, unit), ... <institution> budget: $amount; my portion: N%. The general CV shortens it to dates, agency, title, award, amount and your role. A Settings row prints the full wording instead.
  • None. A row whose text is None prints as "None" in the P&T CV and is left out of the general CV.
  • CV-Experience. A row whose Position equals the start of a title in the Employment sheet adds its responsibilities to that position. Any other row is printed as an earlier position, with its own dates and organization.

What the general CV leaves out

Before/after appointment lines, supplemental lines, the Notes sheet, None placeholders, and proposals that were not funded. Three Settings rows switch optional detail on: course enrollment and percent taught, proposals under review, and the full grant wording.

Files

File Purpose
cv_generate.py workbook to general CV
pt_generate.py workbook to P&T CV
make_example.py writes the example workbook
schema.py the worksheets and their columns
cvlib.py reading and writing .xlsx and .docx, and the wording rules both generators share
word-sync/ the opposite direction, described below

The opposite direction (word-sync)

These tools treat a P&T CV Word file as the master copy and keep a workbook in step with it. They were written for one document in the KU layout and are kept here in case the need arises again; the generators above do not use them.

python word-sync/word2xlsx.py <pt-cv.docx> <publications.csv or ""> <out.xlsx> <Word file name> <saved time> [<previous workbook>]
python word-sync/xlsx2word.py <workbook.xlsx> <pt-cv.docx> <publications.csv or ""> <out.docx> <UTC time, 2026-01-31T12:00:00Z style>
python word-sync/compare_docx.py word-sync <a.docx> <b.docx> <publications.csv or "">
python word-sync/roundtrip_test.py
  • word2xlsx.py reads every paragraph and table cell of the Word file into the worksheets. The CV- sheets and Settings are not in the Word file, so it copies them from the previous workbook.
  • xlsx2word.py writes the workbook's differences into a new Word file as tracked changes. It stops if the Word file is not the one the workbook was made from.
  • compare_docx.py checks that two P&T CV files hold the same entries, including bold and italics in citations.
  • The workbook these tools write has extra reference columns (IDs, numbers); the generators ignore them.
  • Limit: their Undergrad-Advising sheet has no before/after column, so every undergraduate row is read as after the appointment.

Checks used during development

  • A P&T CV generated from a real workbook of 495 rows was read back with word2xlsx.py and matched the hand-maintained Word file row for row, including bold and italics.
  • The example round-trips: workbook to Word to workbook to Word gives the same 50 rows.

Requirements

Python 3.8 or later. Microsoft Word is needed only to make a PDF or to accept tracked changes.

License

MIT; see LICENSE.

About

Generate a general CV and a promotion-and-tenure CV (.docx) from one Excel workbook. Python standard library only.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages