From 0d0310cea760f99a441bb2965284ee00d5dd37f5 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 22 Feb 2025 21:55:09 +0100 Subject: [PATCH] build --- build.py | 25 +++++++++++++++++++++++++ vcard.sh | 11 ----------- 2 files changed, 25 insertions(+), 11 deletions(-) create mode 100755 build.py delete mode 100755 vcard.sh diff --git a/build.py b/build.py new file mode 100755 index 0000000..fb89a0a --- /dev/null +++ b/build.py @@ -0,0 +1,25 @@ +#! /usr/bin/env python3 +"""Build resume.""" + +from pathlib import Path + +from rwx import fs +from rwx.ps import run + +if __name__ == "__main__": + root = Path(__file__).resolve().parent + out = root / "out" + web = out / "web" + fs.wipe(out) + fs.make_directory(web / "img") + run( + "qrencode", + ("--background", "00000000"), + ("--foreground", "000000FF"), + ("--level", "L"), + ("--margin", "1"), + ("--read-from", str(root / "vcard.vcf")), + ("--size", "4"), + ("-t", "SVG"), + ("--output", str(root / "img" / "vcard.svg")), + ) diff --git a/vcard.sh b/vcard.sh deleted file mode 100755 index 0c3dd04..0000000 --- a/vcard.sh +++ /dev/null @@ -1,11 +0,0 @@ -#! /usr/bin/env sh - -cat "vcard.vcf" | - qrencode \ - --background "00000000" \ - --foreground "000000FF" \ - --level "L" \ - --margin "1" \ - --size "4" \ - -t "SVG" \ - --output "img/vcard.svg"