Abusing the command line
26th March 2004
If you’re running OS X, try this:
say -v Kathy `curl --silent http://api.technorati.com/getinfo?username=simonwillison | grep ’<inbound' | sed -e 's/ <//' | sed -e 's/inboundblogs>/Simons blog has /’ | sed -e ’s/<\/inboundblogs>/ inbound blogs and /’ | sed -e ’s/inboundlinks>//’ | sed -e ’s/<\/inboundlinks>/ inbound links/’`
Your computer should read out to you my Technorati inbound blogs and inbound links, extracted from the Technorati web API. Parsing XML using sed is a nasty trick I picked up from this O’Reilly article; speaking the output of a command using the ’say’ and the backtick shell operator was my moment of inspiration for the day.
More recent articles
- ChatGPT Canvas can make API requests now, but it's complicated - 10th December 2024
- I can now run a GPT-4 class model on my laptop - 9th December 2024
- Prompts.js - 7th December 2024