${alignr}${execpi 3600 curl --silent 'http://tinybuddha.com' | sed '{:q;N;s/\n/ /g;t q}'|grep -o '[^<]*'|sed 's/[[:blank:]]*//;s/[[:blank:]]*$//'|fold -sw 32 | sed -e 's/^/\${alignr}/' -e 's/ $//g'}
Basically, it uses curl to look at Tiny Buddha, an inspirational website featuring daily quotes. Then, for an explanation of all the sed commands, thanks to mobilediesel:
The first sed changes all newlines into spaces so the div tag will be on one line. Then grep looks for the div class="entry" up to the first < character. Then sed again to take out the div tag along with the spaces following it, then the spaces at the end. Then, obviously, through fold so it fits nicely on the desktop.
Since it's looking specifically for the div class="entry" tag, grep should find it even if the site layout changes.
The --silent suggestion is thanks to Crinos512.
Anyway, here's the result, a lovely minimal desktop, with just a battery bar (because I don't use any other indicators, not even a system tray these days!) and the time/date.
From Screenshots |
it doesn't work for me. I just did a copy/paste to my conky.conf and there is no output at all:(
ReplyDelete