main
gensitemap.sh
1#!/bin/sh
2
3ba=0
4
5printf '<p>take a look at the sitemap, find what you want.</p>'
6ba=$(find . -type f|grep -v git|wc -l)
7echo "there are <i>$ba</i> files composing this site</p><br>"
8
9echo "<div style='margin-left: 40px; margin-right:500px; font-family: monospace;'>"
10
11find . -maxdepth 1 -type f|grep -v git|while read -r f; do
12 printf '<a href=%s>%s<br></a>\n' $f $(printf $f|sed 's#./##')
13done;printf '<br>\n'
14
15for i in $(find -maxdepth 1 -type d|grep -v git); do
16 [ $i = "." ] && continue
17 printf '<h3>%s</h3>\n' $(printf $i|sed 's#./##')
18 for j in $(find $i -maxdepth 1 -type f); do
19 printf '<a href=%s>%s<br></a>\n' $j $(printf $j|sed 's#./##')
20 done;printf '<br>\n'
21done
22
23echo "</div>"
24
25echo "<title>sitemap</title>"