#!/bin/sh # Configuration DOMAIN="https://shinobi.btxx.org" TITLE="Shinobi" DESCRIPTION="A text-based, RSS focused blogging system" COPYRIGHT="2022 Bradley Taunt" # RW_DIR="_posts/" POST_DIR="posts/" TTL="60" AUTHOR="bt@btxx.org(Bradley Taunt)" TIME=$(date +"%T %Z") # Advanced Setting: Automatically wrap plain text files at 72 character limit # Detailed documentation: https://git.btxx.org/shinobi # # for i in $(find $RW_DIR -type f); do cp $i $POST_DIR ; done # for i in $(find $POST_DIR -type f); do fold -s -w 72 $i > $i.temp; mv $i.temp $i ; done echo " $TITLE $DOMAIN $DESCRIPTION $COPYRIGHT $TTL"; for file in $POST_DIR*; do echo " $(head -n 1 $file) $TIME $(date -d "$(head -n 1 $file)" +"%Y/%m/%d/%u") $(head -n 2 $file | tail -n 1) $DOMAIN/$file $(tail -n +4 $file | sed 's/&/\&/g; s//\>/g; s/"/\"/g; s/'"'"'/\'/g')]]> $AUTHOR $DOMAIN/$file "; done echo " ";