From c8c84dcb5288f3dfb9c319669ce1be6cfd3a87c1 Mon Sep 17 00:00:00 2001 From: Andrea Fazzi Date: Tue, 26 Apr 2022 11:25:39 +0200 Subject: [PATCH] Improve markdown template --- backend/data/.gitignore | 1 + backend/data/palette.gif | Bin 0 -> 43 bytes backend/data/screen.tpl.md | 13 +++++++++++++ backend/main.go | 3 ++- 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 backend/data/palette.gif diff --git a/backend/data/.gitignore b/backend/data/.gitignore index 2457646..398806c 100644 --- a/backend/data/.gitignore +++ b/backend/data/.gitignore @@ -1,2 +1,3 @@ *.sh +*.bmp diff --git a/backend/data/palette.gif b/backend/data/palette.gif new file mode 100644 index 0000000000000000000000000000000000000000..109c3b5ecbcd43514206aa99f049c08e932e7a4e GIT binary patch literal 43 qcmZ?wbhEHbWMW`s_`t{j1poj4SNzEWVln7|2#^c|6B7>?gEaunnFl-o literal 0 HcmV?d00001 diff --git a/backend/data/screen.tpl.md b/backend/data/screen.tpl.md index 2639c77..cffd1d7 100644 --- a/backend/data/screen.tpl.md +++ b/backend/data/screen.tpl.md @@ -1,3 +1,16 @@ +--- +fontfamily: libertinus +fontfamilyoptions: +- osf +- p +papersize: a6 +fontsize: 12pt +geometry: +- top=5mm +- left=5mm +- right=5mm +... + # Buongiorno Aldo! Oggi รจ il {{day}}.{{month}}.{{year}}. diff --git a/backend/main.go b/backend/main.go index 3e87cb9..418b863 100644 --- a/backend/main.go +++ b/backend/main.go @@ -87,7 +87,8 @@ func serveScreen(res http.ResponseWriter, req *http.Request) { } log.Println("Converting markdown to pdf.") - err = pandoc.Convert("./data/screen.md", "./data/screen.pdf", "-V", "geometry:papersize={3.8in,6in}", "-V", "pagestyle:empty") + // err = pandoc.Convert("./data/screen.md", "./data/screen.pdf", "-V", "geometry:papersize={3.8in,6in}", "-V", "pagestyle:empty") + err = pandoc.Convert("./data/screen.md", "./data/screen.pdf", "-V", "pagestyle:empty") if err != nil { panic(err) }