New blog!
So, another new page - and with proper hosting too! As you can hopefully see, I've flawlessly transitioned (thanks mostly to Ross Burton) from blogger to PyBlosxom. If anyone's interested in the script I wrote to do this, here it is (I warn you, it isn't pretty!):
for file in */*/*.html; do
export filename=`basename $file|sed -e 's:\.html::'`-`dirname $file|sed -e 's:/.*::'`-`dirname $file|sed -e 's:.*/::'`-`grep \"date\-header\" $file|sed -e 's:.*, [^ ]* ::'|sed -e 's:,.*::'`-00-00.txt
echo "Generating $filename"
export var=0
cat $file|while read line; do
if [ $var -eq 0 ]; then
if [ "`echo $line|grep '<div class=\"post-body\">'`" -o "`echo $line|grep '<h3 class=\"post-title\">'`" ]; then
export var=1
line=`echo $line|sed -e "s:.*<div class=\"post-body\">::"|sed -e "s:.*<h3 class=\"post-title\">::"`
fi
fi
if [ $var -gt 0 ]; then
while [ "`echo $line|grep '</div>'`" -o "`echo $line|grep '</h3>'`" ]; do
line=`echo $line|sed -e "s:</div>::"|sed -e "s:</h3>::"`
export var=`expr $var \- 1`
done
while [ "`echo $line|grep '<div'`" -o "`echo $line|grep '<h3'`" ]; do
line=`echo $line|sed -e "s:<div[^>]*>::"|sed -e "s:<h3[^>]*>::"`
export var=`expr $var \+ 1`
done
if echo $line|grep -q '\w'; then
echo $line|sed -e "s:</*div[^>]*>::g"|sed -e "s:</h3>::g" >> pyblosxom/$filename
fi
fi
done
done
unset var
unset filename
Jamiroquai - Funktion


