From 2974b5a5f19707e6b2d82dad7f8d5d35944c8346 Mon Sep 17 00:00:00 2001 From: dozens Date: Mon, 5 Feb 2024 16:25:02 -0700 Subject: [PATCH] updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 🗄️ big reorg - ✨ add html export --- LICENSE | 2 +- README.md | 2 + dist/example.html | 199 +++++++++++++++++++++++++ example.pdf => dist/example.pdf | Bin dist/example.txt | 66 +++++++++ justfile | 65 +++++++-- lambdas.js => lib/lambdas.js | 0 schema.json => lib/schema.json | 0 view.js => lib/view.js | 0 example.toml => src/example.toml | 0 template/html.tmpl | 207 +++++++++++++++++++++++++++ resume.template => template/pdf.tmpl | 10 +- 12 files changed, 538 insertions(+), 13 deletions(-) create mode 100644 dist/example.html rename example.pdf => dist/example.pdf (100%) create mode 100644 dist/example.txt rename lambdas.js => lib/lambdas.js (100%) rename schema.json => lib/schema.json (100%) rename view.js => lib/view.js (100%) rename example.toml => src/example.toml (100%) create mode 100644 template/html.tmpl rename resume.template => template/pdf.tmpl (94%) diff --git a/LICENSE b/LICENSE index e4917a4..221aa45 100644 --- a/LICENSE +++ b/LICENSE @@ -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: diff --git a/README.md b/README.md index d9dc246..60c46ee 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/dist/example.html b/dist/example.html new file mode 100644 index 0000000..30f14da --- /dev/null +++ b/dist/example.html @@ -0,0 +1,199 @@ + +
+

Richard Hendriks

+
+

+ richard.hendriks@mail.com - (912) 555-4321 +

+

+ 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 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! +

+
+
+ +
+
+

Professional Experience

+
+
+

+ Pied Piper +

+

+ Palo Alto, CA +

+
+
+

+ CEO/President +

+

+ 2013-12-01—2014-12-01 +

+
+
    +
  • 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 Weisman Scores
  • +
+
+
+ + +
+

Projects

+
+

+ Miss Direction +

+

+ 2016-08-24 +

+
+

+ 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 +

+

+ 2014-11-01 +

+
+
+ + +
+

Education

+
+

+ University of Oklahoma, Information Technology +

+

+ 2011-06-01—2014-01-01 +

+
+
+ + +
+

Interests

+
+

+ Wildlife +

+

+ Ferrets, Unicorns +

+
+
+
diff --git a/example.pdf b/dist/example.pdf similarity index 100% rename from example.pdf rename to dist/example.pdf diff --git a/dist/example.txt b/dist/example.txt new file mode 100644 index 0000000..8136b34 --- /dev/null +++ b/dist/example.txt @@ -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 + + + + + + + + diff --git a/justfile b/justfile index c954464..f59d884 100644 --- a/justfile +++ b/justfile @@ -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< 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" diff --git a/lambdas.js b/lib/lambdas.js similarity index 100% rename from lambdas.js rename to lib/lambdas.js diff --git a/schema.json b/lib/schema.json similarity index 100% rename from schema.json rename to lib/schema.json diff --git a/view.js b/lib/view.js similarity index 100% rename from view.js rename to lib/view.js diff --git a/example.toml b/src/example.toml similarity index 100% rename from example.toml rename to src/example.toml diff --git a/template/html.tmpl b/template/html.tmpl new file mode 100644 index 0000000..2d344d6 --- /dev/null +++ b/template/html.tmpl @@ -0,0 +1,207 @@ + +
+ {{#basics}} +

{{name}}

+
+

+ {{email}} - {{phone}} +

+

+ {{#profiles}} {{{url}}} {{/profiles}} +

+

+ {{location.city}}, {{location.postalCode}} +

+
+
+

+ {{{summary}}} +

+
+ {{/basics}} +
+ +
+
+

Professional Experience

+ {{#work}} +
+
+

+ {{{name}}} +

+

+ {{{location}}} +

+
+ {{#role}} +
+

+ {{{position}}} +

+

+ {{startDate}}—{{endDate}} +

+
+
    + {{#highlights}} +
  • {{{.}}}
  • + {{/highlights}} +
+ {{/role}} +
+ {{/work}} +
+ + +
+

Projects

+ {{#projects}} +
+

+ {{name}} +

+

+ {{endDate}} +

+
+

+ {{description}} +

+

+ {{{url}}} +

+
    + {{#highlights}} +
  • {{{.}}}
  • + {{/highlights}} +
+ {{/projects}} +
+ + +
+

Skills

+ {{#skills}} +
+

+ {{{name}}} +

+

+ {{#join}} {{{keywords}}} {{/join}} +

+
+ {{/skills}} +
+ + +
+

Awards

+
+ {{#awards}} +

+ {{title}}, {{awarder}} +

+

+ {{date}} +

+ {{/awards}} +
+
+ + +
+

Education

+ {{#education}} +
+

+ {{institution}}, {{area}} +

+

+ {{startDate}}—{{endDate}} +

+
+ {{/education}} +
+ + +
+

Interests

+ {{#interests}} +
+

+ {{name}} +

+

+ {{#join}} {{{keywords}}} {{/join}} +

+
+ {{/interests}} +
+
diff --git a/resume.template b/template/pdf.tmpl similarity index 94% rename from resume.template rename to template/pdf.tmpl index b61c26f..89d497d 100644 --- a/resume.template +++ b/template/pdf.tmpl @@ -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