Python and AppleScript for searching the iTunes, App, and Mac App Stores and creating Markdown reference affiliate links.
- python-itunes for implementing the iTunes Search API in Python.
- CocoaDialog for showing multiple search results.
A Python script that takes a search string as an argument and returns the URL of a match. It finds the top 25 matches for the search string and presents them to the user in a dropdown menu. Whichever item the user selects is the one whose URL is returned.
Because the iTunes stores are so big, the search can be limited to specific media types through command line options:
-mor--mac: Mac software only-ior--ios: iOS software only-sor--song: Songs only-aor--album: Albums only-bor--book: Ebooks only-for--movie: Movies only
If no option is provided, a generic search is performed, which typically isn't very useful.
An AppleScript for use with BBEdit to create Markdown reference-style affiliate links to items in iTunes, App, or Mac App Stores. It takes the current selection as the search string, asks the user which media type to search for, and calls isearch to present the search results to the user. After the user chooses, the selected text is turned into a link with a numbered reference at the bottom of the page.
iTunes Search Link should be put in BBEdit's Scripts folder. It expects to find isearch, bbstdin, and nextreflink in ~/Dropbox/bin.
Helper scripts that allow iTunes Search Link to work. Described in detail here.