blob: 8c7e81ed4c2fb5ee680f3f2660030a0dab1c4433 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/sh -e
tmp=$(mktemp -p /tmp)
css="h3,.lp-ref {font-family: neue-haas-grotesk-text, var(--fs-sans); font-size: 1rem; font-weight: normal; font-style: italic;} h3 {margin: 1rem;}"
for file in "data" "log" "tangle" "weave" ; do
in="${file}.lp" ; out="doc/${file}.html" ;
cat "doc/header" "$in" | ./weave > "$tmp" ;
sed "s;title: ;&${in};1" -i'' "$tmp" ;
sed "s;leading: ;&${in};1" -i'' "$tmp" ;
pushd "../web" > "/dev/null" ;
sh "./md.sh" "$tmp" "../literary/$out" > "/dev/null" ;
popd > "/dev/null" ;
sed "s~</head>~<style>${css}</style>\n&~1" -i'' "$out" ;
sed 's;\(.*\)@= \(.*\) =@;\1<span class="lp-ref">(\2)</span>;1' -i'' "$out" ;
sh "./../sync.sh" ;
echo "[ok] generated text '${file}'" ;
done
rm "$tmp"
|