Dashboarding
Right, it’s been a while… how does this work again? Right. Anyway.
I’ve been following Mark Bernstein’s posts on building a dashboard in Tinderbox and enjoying them… and puzzling out how to implement them, in a lot of cases.
One thing I wanted to do, once I figured out how the example he gave in the post above worked, was not have to type in all the random words I wanted as notes in a note in my Tinderbox file.
So what I did was use Tinderbox’s ability to run command line to grab a random word out of the built-in system dictionary. I couldn’t quite get the perl one-liner working inline, so what I did was I created a file called randomWord and put the following in it:
#!/bin/sh word=`perl -e 'open IN, "</usr/share/dict/words";rand($.) < 1 && ($n=$_) while <IN>;print $n'` echo $word
if($Date!="today") {$Text=runCommand("randomWord", "");date="today";}
Posted: March 19th, 2009 under Tech Talk, Writing.
Comments: none
Write a comment