Quote of the Day Geeklets for GeekTool

I was messing up with the GeekTool on Mac OSX and decided to write some bash commands to grab the quote of the day from brainyquote.com. I did a google search afterwards, sadly someone already did it. Well, here’s mine grabbing from quotebr.js instead of the actual html.
Command:

curl -s www.brainyquote.com/link/quotebr.js | sed -n '3p' | sed -e 's/br.writeln("//g' -e 's/<br>");//g'|tr '\n' ' ' && printf " -" &&curl -s www.brainyquote.com/link/quotebr.js | sed -n '4p' | grep -o  "\\\">.*" | sed -e 's/">//g' -e 's/<\/a>");//g'

Screen Shot 2557-08-11 at 4.06.00 PM

Here’s the link to the other one:
http://www.macosxtips.co.uk/geeklets/internet/brainyquote-of-the-day/

Leave a Reply