A bunch of RSS changes

main
silverwizard 2 months ago
parent 559cf8f206
commit ac72587fcd
  1. 8
      local.env
  2. 4
      mark.sh
  3. 11
      rss.sh
  4. 3
      src/hibeck.md
  5. 3
      src/test.md
  6. 5
      src/test2.md
  7. 8
      templates/header.html

@ -1,7 +1,9 @@
BASEDIR="~/Generator/"
BASEDIR="/home/silverwizard/Generator"
SRC="$BASEDIR/src"
STATIC="$BASEDIR/static"
TEMPLATES="$BASEDIR/templates"
DEST="/var/www/htdocs"
DEST="$BASEDIR/dest"
export BASEDIR SRC STATIC TEMPLATES DEST
TITLE="Am I A Hacker? I've No Idea"
export BASEDIR SRC STATIC TEMPLATES DEST TITLE

@ -1,12 +1,12 @@
IFS='
'
cat templates/header.html > dest/index.html
sh templates/header.html > dest/index.html
for file in `find src -type f -name "*.md"`
do
src=$file
dest=`echo $file |sed -e 's/^src/dest/' -e 's/md$/html/'`
echo "SRC: $src DEST: $dest"
cat templates/header.html > $dest
sh templates/header.html > $dest
cat templates/cardbegin.html >> $dest
markdown_py $src >> $dest

@ -0,0 +1,11 @@
IFS='
'
. ./local.env
echo '<rss version="2.0">' > $DEST/rss.xml
printf "\t<channel>\n" > $DEST/rss.xml
printf "\t\t<title>$TITLE</title>\n" > $DEST/rss.xml
for file in `find $SRC -type f -name "*.md"`
do
stat -f %Sm $file >> $DEST/rss.xml
done
echo "</rss>" >> $DEST/rss.xml

@ -1,3 +0,0 @@
# This should be new!
Heya Becky and Robo!

@ -1,3 +0,0 @@
# This is a test
I am trying to create a blogpost - but I don't know what I'm doing

@ -1,3 +1,2 @@
# I should have a title
I want to do another test
# This is
also a test

@ -1,4 +1,4 @@
<html>
<link rel="stylesheet" href="style.css">
<h1>A Meditation On Hating Security</h1>
<div class="leftcolumn">
echo "<html>"
echo '<link rel="stylesheet" href="style.css">'
echo "<h1>$TITLE</h1>"
echo '<div class="leftcolumn">'

Loading…
Cancel
Save