During WikiSym, anytime someone tweets the word WikiSym (anywhere, of course), it prints out on a very old, very loud, line printer (on continuous paper, of course).
Previous post: Great view from the office.
Next post: The results are in!
AboutUs.org is creating an editable guide to websites
by Ted Ernst on 9 September 2008
During WikiSym, anytime someone tweets the word WikiSym (anywhere, of course), it prints out on a very old, very loud, line printer (on continuous paper, of course).
Tagged as: WikiSym
Previous post: Great view from the office.
Next post: The results are in!
{ 9 comments }
Great Idea! How does this work?
This is a way cool idea!
Ward and I were looking at this picture yesterday and thinking about how we’d build an AboutUs tweet printer for the office.
How about identica? http://identi.ca/tag/wikisym
Brianna, Does identica only work for #wikisym?
PS I’ve asked the WikiSym folks to comment here about how this actually works.
Hi,
Ted Ernst asked me to post a comment explaining how the wikisym twitter printer works. The code was written in about half an hour and is really terrible but the basic idea is captured in this simple script:
wget http://search.twitter.com/search.atom?q=wikisym
mv search.atom* last.xml
php twitter.php > toprint.txt
./print toprint.txt
The first line gets an xml file from twitter with the last 20 twits containing the word wikisym.
I didn’t have time to find how to make wget to save the contents of that URL into a file with a decent filename, so the second line just moves the result into a file called last.xml.
The third line calls a php file that reads the last.xml file and parses it. This file reads another file that contains the timestamp of the last twit printed and saves all twits with a timestamp bigger than that timestamp into a file called toprint.txt. The php script also updates the file containing the timestamp.
The fourth line call another script that prints the toprint.txt file into the LPT port.
That script is just this (i got this one somewhere in the net, sorry but i don’t have the reference):
[ "x$1" = "x" ] &”;
exit;
}
cat $1 > /dev/lp0
The whole thing was called every 60 seconds using the linux watch command:
watch -n 60 ./get_twits
If anyone wants I can send a zip with the complete set of files. But I double warn you. The code is just terrible
André Restivo
You’re looking for the -O option for wget:
wget -O last.xml http://search.twitter.com/search.atom?q=wikisym
Or you could just use php’s built-in curl lib: http://us3.php.net/curl
I love it… we should get one for the office.
Great idea! Old fashion stuff are in top of geek fashion nowadays!!! Very creative for sure!!!
We’ve made a different kind of Twitter printer! It’s actually a web service that formats all your tweets in a printer friendly way including Twitpic.com images and user avatars so you can print them.
Regards, TwitPrint.com
Comments on this entry are closed.