forked from tels7ar/resume
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements to contact processing and readme
- put the contact box at the top of the document rather than where the contact lines are extracted from (below the header), so it appears aligned with the top of the name header as before - support both multi-line and bullet-separated contact details
- Loading branch information
Showing
5 changed files
with
37 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,26 @@ | ||
This is a simple resume in Markdown. You can create PDF and HTML versions by | ||
running `make` if you have the document processor | ||
[Pandoc](http://johnmacfarlane.net/pandoc/) installed. You can modify | ||
resume.css to change the appearance of the HTML output and header.tex for the | ||
PDF output. | ||
This is a simple Markdown resumé template and LaTeX header that can be used with | ||
[Pandoc](http://johnmacfarlane.net/pandoc/) to create a professional-looking | ||
PDF. | ||
|
||
Pandoc >= 1.9 is assumed; you can modify the Makefile to change this. | ||
Dependencies | ||
------------ | ||
|
||
In order to enable visually appealing display of contact information, a Python | ||
pre-processing script looks to see if the fourth line of the markdown input | ||
contains items separated by Unicode bullets; if it does, they are extracted and | ||
displayed in a right-aligned, zero-height box in the PDF output generated from | ||
LaTeX. | ||
* Pandoc >= 1.9 (you can adjust the Makefile to use an earlier version) | ||
* Python | ||
* The Tex Gyre Pagella font, available on Debian/Ubuntu from the `tex-gyre` | ||
package | ||
|
||
The default resumé font is Tex Gyre Pagella, which you can install with the | ||
Debian/Ubuntu package `tex-gyre`. | ||
Usage | ||
----- | ||
|
||
The default resume.md contains boilerplate content. Check out the `mwhite` | ||
branch for an actual resume. | ||
Simply run `make` to generate PDF and HTML versions of each .md file in the | ||
directory. | ||
|
||
In order to enable visually appealing display of contact information, the | ||
Markdown is passed through a Python script that looks for contact details | ||
beginning on the fourth line and moves them into a right-aligned, zero-height | ||
box at the top of the document. Lines with bullets (•) will be treated as | ||
separate contact lines in the output. | ||
|
||
The included resume.md contains boilerplate content. Take a look at the | ||
`mwhite` branch for an actual resume. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
# encoding: utf-8 | ||
|
||
import sys | ||
import re | ||
|
||
lines = sys.stdin.readlines() | ||
|
||
for i, line in enumerate(list(lines[3:])): | ||
stripped = line.strip() | ||
if not stripped: | ||
# Contact details are expected to begin on the fourth line, following the | ||
# header and a blank line, and extend until the next blank line. Lines with | ||
# bullets (•) will be split into separate lines. | ||
contact_lines = [] | ||
for line in lines[3:]: | ||
lines.remove(line) | ||
parts = [x.strip() for x in line.split("•")] | ||
if parts == ['']: | ||
break | ||
lines[3 + i] = "\n%s\n" % stripped | ||
|
||
contact_lines.extend(parts) | ||
|
||
lines.insert(3, "\\begin{nospace}\\begin{flushright}") | ||
lines.insert(4 + i, "\\end{flushright}\\end{nospace}\n") | ||
lines.insert(0, "\\begin{nospace}\\begin{flushright}\n" + | ||
"\n\n".join(contact_lines) + | ||
"\n\\end{flushright}\\end{nospace}\n") | ||
|
||
print "".join(lines) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.