From e371d9edd474bcf89cf5d462eaccb8638900b390 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sat, 3 Oct 2020 19:27:15 -0400 Subject: Initial commit --- .local/bin/manualgen | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 .local/bin/manualgen (limited to '.local/bin/manualgen') diff --git a/.local/bin/manualgen b/.local/bin/manualgen new file mode 100755 index 0000000..738ef5c --- /dev/null +++ b/.local/bin/manualgen @@ -0,0 +1,19 @@ +#!/bin/sh + +config=$(cat $HOME/.config/sxhkd/sxhkdrc | sed " +s/^\s.*//g; +s/^#\s.*//; +s/^##\s/##\n-\ \*\*/; +s/#-#\s*/##\n-->/; +s/\s*#-#$/\n##/; +/^$/d" | awk '/##/{if (x)print x;x="";next}{x=(!x)?$0:x"**:`"$0;}STOP{print x;}' | + sed "s/-->/##\ /; + s/:\(.*\)$/:\1\`/; + s/\s+\s/+/g; + s/#\*\*:.*//") + +manual=$(cat $HOME/.config/manual.part) + +printf " $manual \n $config" | gd2pdf + +# printf " $manual \n $config" -- cgit v1.2.3