1
0

2023-02-19-01

This commit is contained in:
dtb 2023-02-20 10:46:03 -05:00
parent 591eb28388
commit e655aecce1

View File

@ -1,15 +1,18 @@
#!/bin/sh #!/bin/sh
set -ex;mkdir -p blah;cd blah;sed '1,/^exit 0$/d'<../"$0"|python -c "import sys set -ex
mkdir -p blah
cd blah
sed '1,/^exit 0$/d'<../"$0" | python -c "import sys
for day in sys.stdin.read().split('\n\n\n'): for day in sys.stdin.read().split('\n\n\n'):
if '<!DOCTYPE html>' in day: prefix=day;continue with open(day.split('\n')[0],'w') as f: f.write(day)"
elif day.split('\n')[0][:4] == '<!--': suffix=day;continue sed -i 1d *efix; sed -i 1d *ffix
with open(day.split('\n')[0]+'.html', 'x') as g: for f in ????-??-??; do #nt worry :)
g.write(prefix+day+'\n'+suffix)";for f in *.html sed '1i<!DOCTYPE html>'<$f|sed -e '1r 0000prefix' -e '$r 0000suffix'>$f.html
do #nt worry :) rm $f; f=$f.html; test -n "$last" && sed -i \
test -z "$last" || sed -i "s,__NAVIGATION__,$nav<A HREF=\"$f\">\&gt;</A></P>," \ "s,__NAVIGATION__,$nav<A HREF=\"$f\">\&gt;</A><BR />," "$last" \
"$last";nav="<P>";test -z "$last"||nav="$nav<A HREF=\"$last\">\&lt;</A>" && nav="<A HREF=\"$last\">\&lt;</A>"; nav="$nav<A HREF=\"index.html\">^</A>"
nav="$nav<A HREF=\"index.html\">^</A>";last="$f";done last="$f"; done
sed -i "s,__NAVIGATION__,$nav</P>," "$last" sed -i "s,__NAVIGATION__,$nav<BR />," "$last"; rm 0*
ls *.html|sed 's/\..*//g'|tee feed.xml|sed 's_.*_<A HREF="/blah/&.html">&</A>_'\ ls *.html|sed 's/\..*//g'|tee feed.xml|sed 's_.*_<A HREF="/blah/&.html">&</A>_'\
| sort -r |>index.html sed -e "1i\ | sort -r |>index.html sed -e "1i\
<!DOCTYPE html><HTML><HEAD><TITLE>blah</TITLE></HEAD>\ <!DOCTYPE html><HTML><HEAD><TITLE>blah</TITLE></HEAD>\
@ -26,7 +29,8 @@ sed -i \
<lastBuildDate>$(date)</lastBuildDate>" \ <lastBuildDate>$(date)</lastBuildDate>" \
-e '$a</channel></rss>' feed.xml -e '$a</channel></rss>' feed.xml
exit 0 exit 0
<!DOCTYPE html><HEAD><TITLE>blah</TITLE></HEAD><BODY><PRE> 0000prefix
<HEAD><TITLE>blah</TITLE></HEAD><BODY><PRE>
THE WRITER MUST EAT -&gt; patreon.com/trn1ty &lt;- THE WRITER MUST EAT -&gt; patreon.com/trn1ty &lt;-
blah! blah!
@ -41,7 +45,7 @@ ideas-
__NAVIGATION__ __NAVIGATION__
<!-- insert legal threat or something --> 0000suffix
</PRE></BODY></HTML> </PRE></BODY></HTML>