site-neo/gensmap.sh

13 lines
514 B
Bash
Raw Normal View History

2023-02-01 16:08:28 -05:00
function r { echo $@ >> sitemap.xml; }
2023-02-01 11:59:44 -05:00
pushd ../..
sed -i d sitemap.xml
r '<?xml version="1.0" encoding="UTF-8"?>'
2023-02-01 16:08:28 -05:00
r '<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">'
2023-02-01 11:59:44 -05:00
for i in `find *`; do
2023-02-01 16:08:28 -05:00
r "<url>"
r "<loc>https://atlas48.neocities.org/$i</loc>"
r "<lastmod>$(date +"%Y-%M-%d" -r $i)</lastmod>"
2023-02-01 11:59:44 -05:00
r "</url>"
done
r "</urlset>"