1
0

blah navigation

This commit is contained in:
dtb 2023-08-06 07:30:58 -04:00
parent 91c77e6128
commit cbb94fb844

View File

@ -1,5 +1,20 @@
#!/bin/sh #!/bin/sh
set -x
for f in ./blah/*.html
do
f="$(printf '%s\n' "$f" | sed 's,./blah/,,')"
test -n "$last" \
&& sed -i "./blah/$last" \
-e "s,\$!NAVIGATION,$nav<A HREF=\"$f\">\&gt;</A>,g" \
&& nav="<A HREF=\"$last\">\&lt;</A>" \
|| true
nav="$nav<A HREF=\"index.html\">^</A>"
last="$f"
done
sed -i "s,\$!NAVIGATION,$nav,g" "./blah/$last"
ls ./blah/*.html \ ls ./blah/*.html \
| sed -e 's_.*/__g' \ | sed -e 's_.*/__g' \
-e 's/\.html$//g' \ -e 's/\.html$//g' \
@ -8,10 +23,11 @@ ls ./blah/*.html \
| sed -e 's_.*_<A HREF="/blah/&.html">&</A>_g' \ | sed -e 's_.*_<A HREF="/blah/&.html">&</A>_g' \
-e "1i\ -e "1i\
<!DOCTYPE html><HEAD><TITLE>blah</TITLE></HEAD>\ <!DOCTYPE html><HEAD><TITLE>blah</TITLE></HEAD>\
<BODY><PRE><A HREF="..">..</A>" \ <BODY><PRE><A HREF=\"..\">..</A>" \
-e '$a</PRE></BODY></HTML>' \ -e '$a</PRE></BODY></HTML>' \
>./blah/index.html >./blah/index.html
sed -i feed.xml \ sed -i feed.xml \
-e "1i\ -e "1i\
<?xml version=\"1.0\" encoding=\"utf-8\"?><rss version=\"2.0\">\ <?xml version=\"1.0\" encoding=\"utf-8\"?><rss version=\"2.0\">\