How to import your TiddlyWiki into a Blogger Blog

Geek, Lighting Tech, Maker

How to import your TiddlyWiki into a Blogger Blog

UPDATE–11/20/2012: Take a look at My program TiddlePie. It is a simple command line tool to download, edit and email tiddlers.

First Download the Geekland Tiddler from 

docbox.flint.com:8081/geekland

wget http://docbox.flint.com:8081/geekland/?action=export -O GeekLand.html

The following counts the number of  tiddlers in the Wiki

cat GeekLand.html |grep ‘<div tiddler=”‘|wc -l

output:

208

Print only a specific tiddler in the File

cat GeekLand.html |grep ‘<div tiddler=”‘  |sed -n ’10p’

Output:

<div tiddler=”Ubuntu 8.10 first impressions” modifier=”david” modified=”200811291933″ created=”200810100220″ tags=””>ok, today marks the day that i have made the leap into betaland. 8.10 for me has a few new features and one regression that i have found. when you first login you will notice the new theme, it is a lot darker with lots of black and dark orange. another new feature is dkms (dynamic kernel module service) which instead of downloading modules pre-compiled for your current kernel it will download the modules as source and recompile whenever required (this is my favourite new feature as i don’t have to wait for virtualbox to have it’s module compiled to enjoy the benefits of the new kernel.) in ubuntu 8.04 the volume control on my hp/compaq 6715b did not work at all, that is fixed in the beta. the broadcom 4311 also did not work correctly but now it seems to work perfectly and i don’t have to use the ugly hack i wrote about earlier.the only regression i have run into is that they appeared to have broken pulseaudio again so just use &quot;killall pulseaudio&quot; until they find a more permanent fix. as with all beta versions of ubuntu the propriatery drivers haven’t been rewritten to take advantage of xorg 7.4 and as such they don’t work yet. but that is the price you pay when you rely on non free packages. luckily for me the r500 open source driver has been included in this release for basic 3d functions. so in conclusion i am really excited to see this hit final release.nn{{https://wiki.ubuntu.com/IntrepidIbex/TechnicalOverview</div>

To get Tiddler Title

cat GeekLand.html |grep ‘<div tiddler=”‘  |sed -n ’10p’ |cut -d ” -f 2

Output

Ubuntu 8.10 first impressions

To get Tiddler Body

cat GeekLand.html |grep ‘<div tiddler=”‘  |sed -n ’10p’ |cut -d ” -f 10- |cut -c 3- |cut -d < -f 1

Output

ok, today marks the day that i have made the leap into betaland. 8.10 for me has a few new features and one regression that i have found. when you first login you will notice the new theme, it is a lot darker with lots of black and dark orange. another new feature is dkms (dynamic kernel module service) which instead of downloading modules pre-compiled for your current kernel it will download the modules as source and recompile whenever required (this is my favourite new feature as i don’t have to wait for virtualbox to have it’s module compiled to enjoy the benefits of the new kernel.) in ubuntu 8.04 the volume control on my hp/compaq 6715b did not work at all, that is fixed in the beta. the broadcom 4311 also did not work correctly but now it seems to work perfectly and i don’t have to use the ugly hack i wrote about earlier.the only regression i have run into is that they appeared to have broken pulseaudio again so just use &quot;killall pulseaudio&quot; until they find a more permanent fix. as with all beta versions of ubuntu the propriatery drivers haven’t been rewritten to take advantage of xorg 7.4 and as such they don’t work yet. but that is the price you pay when you rely on non free packages. luckily for me the r500 open source driver has been included in this release for basic 3d functions. so in conclusion i am really excited to see this hit final release.nn{{https://wiki.ubuntu.com/IntrepidIbex/TechnicalOverview

Send it to blogger

#!/bin/bash
N=$(cat lastline)N=$(echo $N+1|bc)
cat GeekLand.html |grep ‘<div tiddler=”‘|wc -l> lines
Lin=$(cat lines)
cat GeekLand.html |grep ‘<div tiddler=”‘| while read line
do
echo $N “out of” $Lin
cat GeekLand.html |grep ‘<div tiddler=”‘ |sed -n $N’p’  |cut -d ” -f 2 >”SUB.txt”
SUBJECT=$(cat SUB.txt)
# Email To ?
EMAIL=”bloggeremail@blogger.com”
# Email text/message
EMAILMESSAGE=”email.txt”
cat GeekLand.html |grep ‘<div tiddler=”‘ |sed -n $N’p’   |cut -d ” -f 10- |cut -c 3- |cut -d < -f 1 > $EMAILMESSAGE
# send an email using /bin/mail
/usr/bin/mail -s “$SUBJECT” “$EMAIL” < $EMAILMESSAGE

#Testing
#echo “$SUBJECT” “$EMAIL”
#cat $EMAILMESSAGE
echo $N >lastline
N=$(echo $N+1|bc)
sleep 5s
done

Final Note

Be careful using this script. If you send Blogger too many posts they will mark you as a spammer. 

No Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.