diff --git a/src/_tape/gensmap.sh b/src/_tape/gensmap.sh new file mode 100644 index 0000000..a9633eb --- /dev/null +++ b/src/_tape/gensmap.sh @@ -0,0 +1,12 @@ +function r {echo $@ >> sitemap.xml;} +pushd ../.. +sed -i d sitemap.xml +r '' +w '' +for i in `find *`; do +w "" +w "https://atlas48.neocities.org/$i" +w "$(date +"%Y-%M-%d" -r $i)" +r "" +done +r "" diff --git a/src/_tape/render.sh b/src/_tape/render.sh index 6e47e82..4610da8 100755 --- a/src/_tape/render.sh +++ b/src/_tape/render.sh @@ -1,8 +1,9 @@ #!/bin/bash # render.sh: part of the tape-and-string framework. # v2.0 +source string.sh cd .. -files=(`find -not -path '_*'`) +files=(`find -not -path './_*'`) for i in ${files[@]}; do if test -d $i; then if test -d ../$i; then @@ -10,7 +11,7 @@ for i in ${files[@]}; do else continue fi elif test -f $i; then - tape $i | m4 -DTITLE=`${prog[title]}` ${prog[m4]} < $i ../$i + tape $i | m4 -DTITLE=`${prog[title]}` ${prog[m4]} < $i > ../$i else echo "Skipping $i, unknown file type" fi diff --git a/src/_tape/string.sh b/src/_tape/string.sh index 55a1b60..1651e82 100644 --- a/src/_tape/string.sh +++ b/src/_tape/string.sh @@ -1,11 +1,12 @@ declare -A prog -prog[m4]=`readlink -f main.html` +prog[m4]=`readlink -f main.html.m4` prog[title]=`readlink -f titlelookup` function tape { case $1 in *.txti) redcloth $1 ;; *.org) org-ruby --translate html $1 ;; *.md) comrak --gfm $1 ;; + *.html) cat $1 *) pandoc --cols 168 -t html $i || echo "Unable to render $i, unknown format" ;; esac }