memory-leaks

Still reachable: lots of words in many pages.
git clone https://git.kevinlegouguec.net/memory-leaks
Log | Files | Refs | README | LICENSE

commit df679d9a57c218deeaac64e63be658d6b783e1d6
parent e470dab312b37d21dd27755e4bf4b815e6380f02
Author: Kévin Le Gouguec <kevin.legouguec@gmail.com>
Date:   Sat,  7 Dec 2019 19:58:25 +0100

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:
Apersonal/cv/.gitignore | 3+++
Apersonal/cv/Makefile | 23+++++++++++++++++++++++
Apersonal/cv/add-personal-info.sh | 29+++++++++++++++++++++++++++++
Apersonal/cv/en-short.md | 8++++++++
Apersonal/cv/fonts.tex | 12++++++++++++
Apersonal/cv/personal-info.template | 3+++
6 files changed, 78 insertions(+), 0 deletions(-)

diff --git a/personal/cv/.gitignore 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -0,0 +1,3 @@ +birthday='1970-01-01' +location='Somewhere' +phone_number='+42 7 42 42 42 42'