How to Import iTunes Apps into Gamepedia

Talk to other Pedia users about the programs, share tricks and tips or ask questions about existing features.
Post Reply
jeremydouglass
Inductee
Inductee
Posts: 1
Joined: Sun Feb 20, 2011 4:07 pm

How to Import iTunes Apps into Gamepedia

Post by jeremydouglass »

How to Import iTunes Apps into Gamepedia

This is an advanced guide. Because iTunes makes it extremely difficult to export iTunes App metadata, directions are primarily focused on the difficult problem of exporting a tabbed list of Apps with their developers, platforms, and release dates. Once in that form, import into Gamepedia is as normal - or the data could be worked with in spreadsheets or databases.

Task:

Export hundreds of app listings from iTunes and import them into Gamepedia.

Limitations:

This method is quite complicated because iTunes will not export text directly, and does not save tabbed data in its PDF export. Unless you have hundreds of entries, it might be faster to just type them up. Also, this method does not capture app icon art.

Alternatives:

If you don't care about anything but game titles, you can export a single column (Name) and not have to deal with tab parsing.

Steps:

- Open iTunes
- In the left-hand bar, select Library > Apps
- In the top menu, select View > as List
- Right-click or control-click on the list headings, and select the information you want. In order to parse the text correctly later, this example uses Name, Release Date, Seller, Version, Genre, and Kind, *with the columns dragged so that they are visually arranged in that order*
- File > Print
- Song Listing > Custom
- For long / wide lists, optionally click Page Setup and create a large custom page type that will avoid PDF line wrapping problems e.g. 20in wide by 100in tall.
- Continue with print, then select PDF > Save as PDF
- Open the resulting PDF (e.g. in Preview or Acrobat), then selectall-copy-paste the contents into a plain text file.
- Open the resulting text file.

At this point, you should see something like this:

Apps
385 songs, 0 seconds, 9.56 GB
Name Release Date Seller Version Genre Kind
Shadows Never Sleep 7/28/08 360mind 1.0 Book iPhone/iPod touch app
Kindle 3/4/09 Amazon.com 2.6 Books iPhone/iPod touch/iPad app
Classics 10/30/08 Andrew Kaz & Phill Ryu 1.3 Books iPhone/iPod touch app
...

Note that every line is run together, separated only by spaces. In order to import into Gamepedia, every line's Name, Release, Date etc. must be separated by tabs. This can be accomplished using one of two methods:

1) manual editing
2) find-replace with regular expressions (regex)

For method 2, you can use a text editor that supports regex (Smultron, Textmate, etc.). Open the file, open a Find/Replace dialog, and check "regular expression." These examples are given for TextMate:

First, delete periodic header lines:

Find:
^(Apps|\d+ songs, \d+ seconds,.*|Name Release Date Seller Version Genre Kind|Page \d+ of \d+)(\n|\z)
Replace:
...with nothing

Second, tab-delimit the data:

Find:
^(.*) ([1-9]|1[012])/([1-9]|[12][0-9]|3[01])/(\d\d) (.*) (\d[\d\.]*) (Book|Books|Business|Education|Entertainment|Finance|Games|Lifestyle|Medical|Music|Navigation|News|Photography|Productivity|Reference|Science|Social Networking|Travel|Utilities|Weather) (iP.*)$
Replace:
$1\t$3/$2/$4\t$5\t$6\t$7\t$8

Note that in order to import into Gamepedia requires Day/Month/Year format dates, hence swapping the output of $3 of $2.

At this point, your text should be consistently tab-delimited.

- Save tab-delimited text in a new file.
- Open Gamepedia
- File > Import Collection
- Select the text file
- Map the columns to import. For example:
1 -> Title
2 -> Release
3 -> Developer
4 -> Tags
5 -> Platform

Congratulations -- you now have hundreds of iOS apps imported to Gamepedia! Once the import is complete, they will appear in an excluded collection. At this point you could add other metadata -- for example, editing all entries as a batch and marking the Format as "App" or Publisher as "Apple App Store" etc.
Post Reply