about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2019-06-30 12:50:07 -0500
committerCase Duckworth2019-06-30 12:50:07 -0500
commit0cdf3e1d6d881e78bed6956c0c7ad286f4c6b79b (patch)
tree2d14ea4d8903d9494d191d13d299c9e0e8639f22
downloadunk-0cdf3e1d6d881e78bed6956c0c7ad286f4c6b79b.tar.gz
unk-0cdf3e1d6d881e78bed6956c0c7ad286f4c6b79b.zip
Initial commit with lht &shabby
-rwxr-xr-xlht5
-rwxr-xr-xshabby14
2 files changed, 19 insertions, 0 deletions
diff --git a/lht b/lht new file mode 100755 index 0000000..771fcad --- /dev/null +++ b/lht
@@ -0,0 +1,5 @@
1#!/usr/bin/awk -f
2function s(t,i){while(match($0,t)){if(I[ni]==i)ni-=sub(t,"</"i">")
3else if(sub(t,"<"i">"))I[++ni]=i}}BEGIN{FS="\n"; RS="";ni=0}
4{s("[\\*_]{2}","strong");s("[\\*_]","em");s("`","code")
5$0=(match($0,/>$/))?$0:"<p>"$0"</p>";print}
diff --git a/shabby b/shabby new file mode 100755 index 0000000..277d021 --- /dev/null +++ b/shabby
@@ -0,0 +1,14 @@
1#!/bin/sh
2T=tmpl
3alias c=cat q=test e=echo
4rm -rf o;mkdir -p o
5q -e $T||e '`<$F`'>$T
6q -d st&&cp -r st o/
7x(){ eval "$(e 'c<<Z';c "$@";e;e Z)";}
8for F in c/*;do
9q -e "$F"&& (
10FN="${F##*/}"
11TT="$(head -n1 "$P")"
12BD="$(tail -n+2 "$P")"
13x $T>"o/$FN")
14done