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!):
12345678910111213141516171819202122232425262728 for file in */*/*.html; doexport 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.txtecho "Generating $filename"export var=0cat $file|while read line; doif [ $var -eq 0 ]; thenif [ "`echo $line|grep '<div class=\"post-body\">'`" -o "`echo $line|grep '<h3 class=\"post-title\">'`" ]; thenexport var=1line=`echo $line|sed -e "s:.*<div class=\"post-body\">::"|sed -e "s:.*<h3 class=\"post-title\">::"`fifiif [ $var -gt 0 ]; thenwhile [ "`echo $line|grep '</div>'`" -o "`echo $line|grep '</h3>'`" ]; doline=`echo $line|sed -e "s:</div>::"|sed -e "s:</h3>::"`export var=`expr $var \- 1`donewhile [ "`echo $line|grep '<div'`" -o "`echo $line|grep '<h3'`" ]; doline=`echo $line|sed -e "s:<div[^>]*>::"|sed -e "s:<h3[^>]*>::"`export var=`expr $var \+ 1`doneif echo $line|grep -q '\w'; thenecho $line|sed -e "s:</*div[^>]*>::g"|sed -e "s:</h3>::g" >> pyblosxom/$filenamefifidonedoneunset varunset filename
Jamiroquai – Funktion
]]>