diff --git a/.gitignore b/.gitignore index 1f91da3..1bdfd08 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ src src/ src/* *.html +*.rss diff --git a/template/page.html b/template/page.html index bb30379..5a4e39a 100644 --- a/template/page.html +++ b/template/page.html @@ -23,5 +23,11 @@ +

+ +
+RSS feed +
+ diff --git a/xfwc b/xfwc index 14fff15..9b4e407 100755 --- a/xfwc +++ b/xfwc @@ -1,5 +1,18 @@ #!/bin/bash +ABSURL="https://xfnw.ttm.sh/xfwc" + +cat < feed.rss + + + + +xfwc +$ABSURL/ +xfwc + +EOF + BOOPTMP=$(mktemp) TOTAL=$(ls src | wc -w) @@ -8,12 +21,20 @@ rm index.html ln -s $TOTAL.html index.html -for fn in $(ls src); do -NUM=$(echo "${fn%???}" | sed 's/[^0-9]*//g') +NUM=$TOTAL +for fn in $(ls -t src); do NEWF=$NUM.html -TITLE=$(echo ${fn%????} | sed 's/_/ /g; s/[0-9]*//g' | sed -e 's/[]$.*[\^]/\\&/g') +TITLE=$(echo ${fn%????} | sed 's/_/ /g' | sed -e 's/[]$.*[\^]/\\&/g') echo "rendering $NEWF..." +cat <> feed.rss + +$TITLE +$ABSURL/$NEWF +image #$NUM + +EOF + echo "$TITLE" > $BOOPTMP cp template/page.html $NEWF @@ -33,6 +54,13 @@ sed -i "s/LAST/"$TOTAL"/" $NEWF sed -i 's/PRE/#/; s/NEXT/#/' $NEWF +NUM=$(( NUM - 1 )) + done +cat <> feed.rss + + +EOF +