May 14, 2010
Get App Store info via the commandline

Apple recently added web previews for the iTunes Store, meaning that you don’t have to launch iTunes to get information about a song or a piece of software.

The problem is that the web previews then automatically launch iTunes which I find to be annoying, especially on a slow Internet connection, and especially when I might have just wanted to see a price for an app.

If I am writing a review for an app from the App Store, I usually use the official icon from the iTunes page. For this I don’t need iTunes.app at all, and in fact it’s a complete hindrance.

But Apple also doesn’t make it easy to get that image from the webpage. I’m not sure if that is intentional or not, but either way, I decided to write a script that would fetch the image for me, or at least show me the URL.

Well, that sort of spiraled.

The script will now show:

  1. The app name and developer
  2. Cost, if any
  3. Age
  4. Rating for current version and all time (if available) plus total number of ratings
  5. Canonical URL for the app
  6. URL for the app icon
  7. Description of the app (same as what you would see in iTunes
  8. A link to other apps by the same developer/company
  9. (Optional) The app icon will be saved to a local folder, and named something meaningful, including the width x height

Here’s an example:

$> app-store-info.sh ‘http://itunes.apple.com/us/app/instapaper-pro/id288545208?mt=8’

NAME:   Instapaper Pro  (by Marco Arment)

COST:   $4.99

AGES:   4+

STARS:  Current:    4  (254 Ratings) 
    All time:   4  (1847 Ratings) 

URL:
http://itunes.apple.com/us/app/instapaper-pro/id288545208?mt=8

ICON:
http://a1.phobos.apple.com/us/r1000/002/Purple/b1/13/29/mzl.qtucolbr.175x175-75.jpg 

DESCRIPTION:
   Save web pages for later offline reading, optimized for readability 
   on your iPhone or iPod touch's screen.  Featured by Apple and 
   critically acclaimed by top blogs, newspapers, and magazines!
   Great for long articles and blog posts that you find during the 
   day and would like to read, but don't have the time when you find
   them. Save with Instapaper, then read later when you're commuting, 
   in a meeting, or waiting in line. Browse the Editor's Picks for more
   stories to read when you haven't had time to find any.
   PRO FEATURES:
   - Folders
   - Automatic updates
   - Save your position
   - Dictionary lookups
   - Tilt scrolling, pagination
   - Adjustable fonts and text sizes
   - Dark mode for night reading
   - Send to Tumblr and Twitter
   And more. Details: http://www.instapaper.com/iphone


To See Other Apps by Marco Arment:
http://itunes.apple.com/us/artist/marco-arment/id284942716 

AppIcon saved to:
/Users/luomat/Dropbox/Photos/AppStoreIcons/Instapaper-Pro.175x175.jpg

You can download the script from http://db.luo.ma/bin/app-store-info.sh.

Note that is the live version of the script, the same one that I use, so it is constantly changing.

The script is extensively commented.

Requires lynx which is not installed on OS X by default.

  1. luoma posted this
blog comments powered by Disqus