before I test
This commit is contained in:
parent
7eb4c3104d
commit
412f929e3d
12
src/_tape/gensmap.sh
Normal file
12
src/_tape/gensmap.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
function r {echo $@ >> sitemap.xml;}
|
||||||
|
pushd ../..
|
||||||
|
sed -i d sitemap.xml
|
||||||
|
r '<?xml version="1.0" encoding="UTF-8"?>'
|
||||||
|
w '<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'
|
||||||
|
for i in `find *`; do
|
||||||
|
w "<url>"
|
||||||
|
w "<loc>https://atlas48.neocities.org/$i</loc>"
|
||||||
|
w "<lastmod>$(date +"%Y-%M-%d" -r $i)</lastmod>"
|
||||||
|
r "</url>"
|
||||||
|
done
|
||||||
|
r "</urlset>"
|
@ -1,8 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# render.sh: part of the tape-and-string framework.
|
# render.sh: part of the tape-and-string framework.
|
||||||
# v2.0
|
# v2.0
|
||||||
|
source string.sh
|
||||||
cd ..
|
cd ..
|
||||||
files=(`find -not -path '_*'`)
|
files=(`find -not -path './_*'`)
|
||||||
for i in ${files[@]}; do
|
for i in ${files[@]}; do
|
||||||
if test -d $i; then
|
if test -d $i; then
|
||||||
if test -d ../$i; then
|
if test -d ../$i; then
|
||||||
@ -10,7 +11,7 @@ for i in ${files[@]}; do
|
|||||||
else continue
|
else continue
|
||||||
fi
|
fi
|
||||||
elif test -f $i; then
|
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
|
else
|
||||||
echo "Skipping $i, unknown file type"
|
echo "Skipping $i, unknown file type"
|
||||||
fi
|
fi
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
declare -A prog
|
declare -A prog
|
||||||
prog[m4]=`readlink -f main.html`
|
prog[m4]=`readlink -f main.html.m4`
|
||||||
prog[title]=`readlink -f titlelookup`
|
prog[title]=`readlink -f titlelookup`
|
||||||
function tape {
|
function tape {
|
||||||
case $1 in
|
case $1 in
|
||||||
*.txti) redcloth $1 ;;
|
*.txti) redcloth $1 ;;
|
||||||
*.org) org-ruby --translate html $1 ;;
|
*.org) org-ruby --translate html $1 ;;
|
||||||
*.md) comrak --gfm $1 ;;
|
*.md) comrak --gfm $1 ;;
|
||||||
|
*.html) cat $1
|
||||||
*) pandoc --cols 168 -t html $i || echo "Unable to render $i, unknown format" ;;
|
*) pandoc --cols 168 -t html $i || echo "Unable to render $i, unknown format" ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user