summaryrefslogtreecommitdiff
path: root/personal
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2019-12-07 19:58:25 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2019-12-07 20:29:31 +0100
commitdf679d9a57c218deeaac64e63be658d6b783e1d6 (patch)
treeeb91f0235890e37abc13882f9b7e325570f340d3 /personal
parente470dab312b37d21dd27755e4bf4b815e6380f02 (diff)
downloadmemory-leaks-df679d9a57c218deeaac64e63be658d6b783e1d6.tar.xz
Add "CV" """infrastructure"""
The phone and e-mail emojis take 2 columns when displayed, but I don't think Pandoc has any way to know that when parsing tables (unless there is some Unicode metadata marking those glyphs as wider than normal).
Diffstat (limited to 'personal')
-rw-r--r--personal/cv/.gitignore2
-rw-r--r--personal/cv/Makefile23
-rwxr-xr-xpersonal/cv/add-personal-info.sh29
-rw-r--r--personal/cv/en-short.md8
-rw-r--r--personal/cv/fonts.tex12
-rw-r--r--personal/cv/personal-info.template3
6 files changed, 77 insertions, 0 deletions
diff --git a/personal/cv/.gitignore b/personal/cv/.gitignore
new file mode 100644
index 0000000..30c5702
--- /dev/null
+++ b/personal/cv/.gitignore
@@ -0,0 +1,2 @@
+results
+personal-info \ No newline at end of file
diff --git a/personal/cv/Makefile b/personal/cv/Makefile
new file mode 100644
index 0000000..00715cd
--- /dev/null
+++ b/personal/cv/Makefile
@@ -0,0 +1,23 @@
+PDFs = $(patsubst %.md,results/%.pdf,$(wildcard *.md))
+inputs = $(patsubst %.md,results/%.md,$(wildcard *.md))
+
+pandoc_options = --verbose
+
+$(PDFs): pandoc_options += \
+--pdf-engine=xelatex \
+--include-in-header=fonts.tex \
+ -V mainfont="DejaVu Sans" -V colorlinks
+
+all: $(PDFs)
+
+results/%.pdf: results/%.md fonts.tex | results
+ pandoc $< $(pandoc_options) -o $@
+
+results/%.md: %.md add-personal-info.sh | results
+ ./add-personal-info.sh $< $@
+
+results:
+ mkdir $@
+
+clean:
+ -rm -r results
diff --git a/personal/cv/add-personal-info.sh b/personal/cv/add-personal-info.sh
new file mode 100755
index 0000000..2e9ea8b
--- /dev/null
+++ b/personal/cv/add-personal-info.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+set -eu
+
+input=$1; output=$2
+cp ${input} ${output}
+
+. personal-info
+
+fullname=$(getent passwd $(whoami) | cut -d: -f5 | cut -d, -f1)
+sed -i s/INSERT-FULLNAME-HERE/"${fullname}"/ ${output}
+
+# On the one hand, anyone can compute my age from my birth date. On
+# the other hand, wasting reader brain cycles on this computation
+# sounds kind of rude. On the gripping hand, having to bump my age
+# manually every year would be silly. Clearly the way forward is to
+# summon the powers of bash, date, bc and sed to save us the trouble.
+
+birthstamp=$(date -d "${birthday}" +%s)
+now=$(date +%s)
+age=$(bc <<< "(${now}-${birthstamp})/(3600*24*365.25)")
+sed -i s/INSERT-BIRTHDATE-HERE/"${birthday} (${age})"/ ${output}
+
+sed -i s/INSERT-LOCATION-HERE/"${location}"/ ${output}
+
+sed -i s/INSERT-PHONE-HERE/"${phone_number}"/ ${output}
+
+# Set by .profile and/or .xsessionrc.
+sed -i s/INSERT-MAIL-HERE/${EMAIL}/ ${output}
diff --git a/personal/cv/en-short.md b/personal/cv/en-short.md
new file mode 100644
index 0000000..0702e57
--- /dev/null
+++ b/personal/cv/en-short.md
@@ -0,0 +1,8 @@
+% INSERT-FULLNAME-HERE
+
+------------- ---------------------
+Date of birth INSERT-BIRTHDATE-HERE
+Location INSERT-LOCATION-HERE
+📱 INSERT-PHONE-HERE
+📧 INSERT-MAIL-HERE
+------------- ---------------------
diff --git a/personal/cv/fonts.tex b/personal/cv/fonts.tex
new file mode 100644
index 0000000..1a36389
--- /dev/null
+++ b/personal/cv/fonts.tex
@@ -0,0 +1,12 @@
+\tracinglostchars=2
+
+\usepackage{fontspec}
+\usepackage[Latin,NumberForms,Punctuation,Symbols]{ucharclasses}
+
+\newfontfamily{\mydefaultfont}{Symbola}
+\newfontfamily{\mymainfont}{DejaVu Sans}
+
+\setTransitionsForSymbols{\mydefaultfont}{\mymainfont}
+\setTransitionsFor{NumberForms}{\mydefaultfont}{\mymainfont}
+\setTransitionTo{Punctuation}{\mymainfont}
+\setTransitionTo{Latin}{\mymainfont}
diff --git a/personal/cv/personal-info.template b/personal/cv/personal-info.template
new file mode 100644
index 0000000..0ec9b09
--- /dev/null
+++ b/personal/cv/personal-info.template
@@ -0,0 +1,3 @@
+birthday='1970-01-01'
+location='Somewhere'
+phone_number='+42 7 42 42 42 42'