- 🗄️ big reorg
-  add html export
main
dozens 2024-02-05 16:25:02 -07:00
parent e2e8198be5
commit 2974b5a5f1
12 changed files with 538 additions and 13 deletions

View File

@ -1,6 +1,6 @@
POSTCARD LICENSE
Copyright 2023-12-05 christopher.p.brown@gmail.com
Copyright 2023-12-05 dozens@tilde.team
You are free to use this software under the following conditions:

View File

@ -30,6 +30,8 @@ and then exported to pdf.
[3]: https://mustache.github.io/
It also writes to html and text.
## You Will Need
1. groff 1.23.0: for typesetting and pdf output (with the ms macro package; it *should* be installed anywhere groff is installed)

199
dist/example.html vendored 100644
View File

@ -0,0 +1,199 @@
<style>
body {
width: 8.5in;
margin: 0 auto;
}
p {
margin: 0;
}
ul {
margin: 0;
padding: 0 1em;
}
h2 {
padding: 0;
margin-bottom: 0;
border-bottom: solid 1px black;
}
header {
text-align: center;
.basics {
font-size: small;
}
.summary {
margin: 1em;
font-style: italic;
}
}
section div {
display: flex;
justify-content: space-between;
align-items: end;
p:nth-child(2) {
text-align: right;
}
}
#experience div:first-child {
p:first-child {
font-weight: bold;
font-size: larger;
margin-top: 0.5em;
}
}
#projects > div > p:first-child {
font-weight: bold;
}
.role {
text-decoration: underline;
font-size: large;
}
section.table div {
justify-content: flex-start;
align-items: start;
p:first-child{
text-align: right;
width: 10em;
margin-right: 2em;
}
p:nth-child(2) {
text-align: left;
}
}
</style>
<header>
<h1>Richard Hendriks</h1>
<div class="basics">
<p>
richard.hendriks@mail.com - (912) 555-4321
</p>
<p>
https://soundcloud.example.com/dandymusicnl
</p>
<p>
San Francisco, CA 94115
</p>
</div>
<div class="summary">
<p>
Richard hails from Tulsa. He has earned degrees from the University of Oklahoma and Stanford. (Go Sooners and Cardinal!) Before starting Pied Piper, he worked for Hooli as a part time software developer. While his work focuses on applied information theory, mostly optimizing lossless compression schema of both the length-limited and adaptive variants, his non-work interests range widely, everything from quantum computing to chaos theory. He could tell you about it, but THAT would NOT be a "length-limited" conversation!
</p>
</div>
</header>
<main>
<section id="experience">
<h2>Professional Experience</h2>
<article>
<div class="location">
<p>
Pied Piper
</p>
<p>
Palo Alto, CA
</p>
</div>
<div class="position">
<p class="role">
CEO/President
</p>
<p>
2013-12-01&mdash;2014-12-01
</p>
</div>
<ul>
<li>Build an algorithm for artist to detect if their music was violating copy right infringement laws</li>
<li>Successfully won Techcrunch Disrupt</li>
<li>Optimized an algorithm that holds the current world record for Weisman Scores</li>
</ul>
</article>
</section>
<section id="projects">
<h2>Projects</h2>
<div>
<p>
Miss Direction
</p>
<p>
2016-08-24
</p>
</div>
<p>
A mapping engine that misguides you
</p>
<p>
missdirection.example.com
</p>
<ul>
<li>Won award at AIHacks 2016</li>
<li>Built by all women team of newbie programmers</li>
<li>Using modern technologies such as GoogleMaps, Chrome Extension and Javascript</li>
</ul>
</section>
<section id="skills" class="table">
<h2>Skills</h2>
<div>
<p>
Web Development
</p>
<p>
HTML, CSS, Javascript
</p>
</div>
<div>
<p>
Compression
</p>
<p>
Mpeg, MP4, GIF
</p>
</div>
</section>
<section id="awards">
<h2>Awards</h2>
<div>
<p>
Digital Compression Pioneer Award, Techcrunch
</p>
<p>
2014-11-01
</p>
</div>
</section>
<section id="education">
<h2>Education</h2>
<div>
<p>
University of Oklahoma, Information Technology
</p>
<p>
2011-06-01&mdash;2014-01-01
</p>
</div>
</section>
<section id="interests" class="table">
<h2>Interests</h2>
<div>
<p>
Wildlife
</p>
<p>
Ferrets, Unicorns
</p>
</div>
</section>
</main>

View File

66
dist/example.txt vendored 100644
View File

@ -0,0 +1,66 @@
Richard Hendriks
richard.hendriks@mail.com (912) 5554321
https://soundcloud.example.com/dandymusicnl
San Francisco, CA 94115
Richard hails from Tulsa. He has earned degrees from the University of
Oklahoma and Stanford. (Go Sooners and Cardinal!) Before starting Pied
Piper, he worked for Hooli as a part time software developer. While
his work focuses on applied information theory, mostly optimizing
lossless compression schema of both the lengthlimited and adaptive
variants, his nonwork interests range widely, everything from quantum
computing to chaos theory. He could tell you about it, but THAT would
NOT be a "lengthlimited" conversation!
Professional Experience
Pied Piper Palo Alto, CA
CEO/President 2013120120141201
Build an algorithm for artist to detect if their music was violating
copy right infringement laws
Successfully won Techcrunch Disrupt
Optimized an algorithm that holds the current world record for Weis
man Scores
Projects
Miss Direction 20160824
A mapping engine that misguides you
missdirection.example.com
Won award at AIHacks 2016
Built by all women team of newbie programmers
Using modern technologies such as GoogleMaps, Chrome Extension and
Javascript
Skills
Web Development HTML, CSS, Javascript
Compression Mpeg, MP4, GIF
Awards
Digital Compression Pioneer Award, Techcrunch 20141101
Education
University of Oklahoma, Information Technology 2011060120140101
Interests
Wildlife Ferrets, Unicorns

View File

@ -1,27 +1,74 @@
toml:="src/example.toml"
tmpl:="template/pdf.tmpl"
outpdf:="dist/example.pdf"
outhtm:="dist/example.html"
outtxt:="dist/example.txt"
# show all recipes
default:
just --list --unsorted
# format toml
fmt:
taplo fmt example.toml
taplo fmt {{toml}}
# validate toml
validate:
taplo lint example.toml
taplo lint {{toml}}
# create pdf
pdf:
# create view
_view:
#!/usr/bin/env sh
for f in "lib/lambdas.js" "{{toml}}"
do
if [ "$f" -nt lib/view.js ]
then
ed<<EOF
i
module.exports =
.
r !taplo get -f example.toml -o json
r !taplo get -f {{toml}} -o json
-1s/$/,
.r lambdas.js
w view.js
.r lib/lambdas.js
w lib/view.js
q
EOF
mustache view.js resume.template \
| groff -ms -t -Tpdf > example.pdf
fi
done
# create pdf
@pdf: _view
-[ lib/view.js -nt {{outpdf}} ] \
&& echo "Creating PDF" \
&& mustache lib/view.js {{tmpl}} \
| groff -ms -t -Tpdf > {{outpdf}} \
|| echo "No update"
# start a watcher
watch:
ls {{toml}} {{tmpl}} | entr -c just pdf
# create text
@text: _view
-[ lib/view.js -nt {{outtxt}} ] \
&& echo "Creating txt" \
&& mustache lib/view.js {{tmpl}} \
| nroff -ms -t \
| iconv -c -f utf-8 -t ascii \
> {{outtxt}} \
|| echo "No update"
# create html
@html: _view
-[ lib/view.js -nt {{outhtm}} ] \
&& echo "Creating html" \
&& mustache lib/view.js template/html.tmpl \
> {{outhtm}} \
|| echo "No update"

207
template/html.tmpl 100644
View File

@ -0,0 +1,207 @@
<style>
body {
width: 8.5in;
margin: 0 auto;
}
p {
margin: 0;
}
ul {
margin: 0;
padding: 0 1em;
}
h2 {
padding: 0;
margin-bottom: 0;
border-bottom: solid 1px black;
}
header {
text-align: center;
.basics {
font-size: small;
}
.summary {
margin: 1em;
font-style: italic;
}
}
section div {
display: flex;
justify-content: space-between;
align-items: end;
p:nth-child(2) {
text-align: right;
}
}
#experience div:first-child {
p:first-child {
font-weight: bold;
font-size: larger;
margin-top: 0.5em;
}
}
#projects > div > p:first-child {
font-weight: bold;
}
.role {
text-decoration: underline;
font-size: large;
}
section.table div {
justify-content: flex-start;
align-items: start;
p:first-child{
text-align: right;
width: 10em;
margin-right: 2em;
}
p:nth-child(2) {
text-align: left;
}
}
</style>
<header>
{{#basics}}
<h1>{{name}}</h1>
<div class="basics">
<p>
{{email}} - {{phone}}
</p>
<p>
{{#profiles}} {{{url}}} {{/profiles}}
</p>
<p>
{{location.city}}, {{location.postalCode}}
</p>
</div>
<div class="summary">
<p>
{{{summary}}}
</p>
</div>
{{/basics}}
</header>
<main>
<section id="experience">
<h2>Professional Experience</h2>
{{#work}}
<article>
<div class="location">
<p>
{{{name}}}
</p>
<p>
{{{location}}}
</p>
</div>
{{#role}}
<div class="position">
<p class="role">
{{{position}}}
</p>
<p>
{{startDate}}&mdash;{{endDate}}
</p>
</div>
<ul>
{{#highlights}}
<li>{{{.}}}</li>
{{/highlights}}
</ul>
{{/role}}
</article>
{{/work}}
</section>
<section id="projects">
<h2>Projects</h2>
{{#projects}}
<div>
<p>
{{name}}
</p>
<p>
{{endDate}}
</p>
</div>
<p>
{{description}}
</p>
<p>
{{{url}}}
</p>
<ul>
{{#highlights}}
<li>{{{.}}}</li>
{{/highlights}}
</ul>
{{/projects}}
</section>
<section id="skills" class="table">
<h2>Skills</h2>
{{#skills}}
<div>
<p>
{{{name}}}
</p>
<p>
{{#join}} {{{keywords}}} {{/join}}
</p>
</div>
{{/skills}}
</section>
<section id="awards">
<h2>Awards</h2>
<div>
{{#awards}}
<p>
{{title}}, {{awarder}}
</p>
<p>
{{date}}
</p>
{{/awards}}
</div>
</section>
<section id="education">
<h2>Education</h2>
{{#education}}
<div>
<p>
{{institution}}, {{area}}
</p>
<p>
{{startDate}}&mdash;{{endDate}}
</p>
</div>
{{/education}}
</section>
<section id="interests" class="table">
<h2>Interests</h2>
{{#interests}}
<div>
<p>
{{name}}
</p>
<p>
{{#join}} {{{keywords}}} {{/join}}
</p>
</div>
{{/interests}}
</section>
</main>

View File

@ -4,6 +4,8 @@
.nr FM .5i \" tighter footer margin
.nr PI 2n \" tighter paragraph indentation (for bullet lists)
.nr PD 0 \" tighter paragraph spacing
.nr PO 0.75i \" smaller page offset
.nr LL 7i \" longer line length
.
.
.
@ -63,7 +65,10 @@ T{
.sp 0.5
.LG
{{{name}}}
T};{{{location}}}
T};T{
.sp 0.5
{{{location}}}
T}
{{#role}}
{{{position}}};{{startDate}}\*[-]{{endDate}}
{{#highlights}}
@ -214,5 +219,4 @@ T}
{{/interests}}
.TE
.KE
.\" vim: filetype=groff