From 55d5862b10adaafbaf0ec7bd2cf601a1025ad8e6 Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Wed, 10 Apr 2024 23:42:21 +0200 Subject: [PATCH] note making easy pdfs --- README.md | 6 +++--- vision/lowdown.md | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 vision/lowdown.md diff --git a/README.md b/README.md index 123a04d..00745fc 100644 --- a/README.md +++ b/README.md @@ -61,9 +61,9 @@ How to see which websites you're actively accessing: ss -tr dst :$PORT ` ` ` -> State Recv-Q Send-Q Local Address:Port Peer Address:Port Process -> ESTAB 0 0 192.168.0.14:42476 149.154.167.91:https -> ESTAB 0 0 192.168.0.14:43644 104.17.90.199:https +> State Recv-Q Send-Q Local Address:Port Peer Address:Port Process +> ESTAB 0 0 192.168.0.14:42476 149.154.167.91:https +> ESTAB 0 0 192.168.0.14:43644 104.17.90.199:https ``` diff --git a/vision/lowdown.md b/vision/lowdown.md new file mode 100644 index 0000000..44d64b8 --- /dev/null +++ b/vision/lowdown.md @@ -0,0 +1,21 @@ +--- +title: "Markdown to PDF" +tags: [ "Documentation", "Markdown", "PDF", "Vision" ] +--- + +Turn a markdown file into a pdf: + +```bash +lowdown -stms "$FILE".md | pdfroff -itk -mspdf > "$FILE".pdf +``` + +To give the document a title, put that title in the metadata: + +```bash +sed -i "1 i---" "$FILE".md +sed -i "1 ititle: $TITLE" "$FILE".md +sed -i "1 i---" "$FILE".md +lowdown -L "$FILE".md +lowdown -X title "$FILE".md +lowdown -stms "$FILE".md | pdfroff -itk -mspdf > "$FILE".pdf +```