Waiting for Lion: On your mark, get set, geek out
Waiting for Lion to show up in App Store? We are too. Here's how we are checking.
When you want to pull a URL from Mac App Store, you need to emulate its user agent. curl -silent -A "iMacAppStore/1.0.1 (Macintosh; U; Intel Mac OS X 10.6.7; en) AppleWebKit/533.20.25" will do that for you.
Want to search the store? Same idea, but give it a query like this: curl -A "iMacAppStore/1.0.1 (Macintosh; U; Intel Mac OS X 10.6.7; en) AppleWebKit/533.20.25" -H "X-Apple-Store-Front: 143441-1,13" 'http://ax.search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?q=SEARCH_PHRASE_HERE'
The search phrase must be URL-escaped, e.g. "OS X Lion" is "OS%20X%20Lion".
Then do a little grep-fu, namely grep -iv 'killer' | grep 'mt=12' | grep 'class=.name' These steps search for app listings only whose name does not include "killer", as in "Killer Guide for OS X Lion". Who knew?
I threw together a few utilities to help with this. Lionscanner is a command line app that performs this search (or, if you give it an argument searches for that instead of "OS X Lion") and then processes the results to kill everything but in-line text, i.e. no XML tags, following the greps I mentioned above.
If you run it without arguments it hunts for "OS X Lion". If it finds nothing, there's no "OS X Lion" product in App Store. Presumably. That's why I've also included the basic how-to. So you can create your own tools that are a little more flexible in case Apple doesn't name it quite "OS X Lion".
Second, I have my handy-dandy-age-of-the-dinosaurs-csh-script as always, the one you readers always mock me for. Still works, still csh, you still need to run it with something like repeat 5000 ./doLionCheck:
./lionscanner | grep -i "lion" > /dev/null
if ($? == 0) then
say "LION MAY BE AVAILABLE"
Okay, that's everything you need. Don't forget to make stuff executable (chmod 755). Now go forth and build some better tools for us.
Waiting for Lion to show up in App Store? We are too. Here's how we are checking. When you want to pull a URL from Mac App Store, you...
Subscribe to Newsletter
Software Updatesmore updates
- Daily App: MyScript Calculator solves your hand-written math equations
- Findery app lets you discover the world around you using annotated notes and maps
- The Learnist app brings its crowd-sourced collection of information to your iPhone
- My cat Cinnamon reviews Friskies Cat Fishing 2
- Photo Grid Collage Maker is capable and free
- iExit gets new features and is now free