summaryrefslogtreecommitdiff
path: root/.local/bin/manualgen
blob: 738ef5cba9525b68e4e7534b197e6ac785ba616f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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"