itch.io is community of indie game creators and players

Export collections to CSV

I bought a MASSIVE bundle of games a few years ago and finally got around to sorting them out into a few different collections.  My plan was to export the game list to CSV so that I could use a random number generator or similar to pick which game to play next.  But there was a problem...

Itch doesn't offer a way to export collections to csv.

I was honestly a bit surprised to see that this feature wasn't added in yet.  There is some functionality for other data to be exported, so why not this?  Well - I've got some experience with Javascript and Userscripts, as I had recently done a massive overhaul via userscript to a site at my work to make it much more functional.  I decided I could implement the functionality I needed here, too.

My script will require you to install the Tampermonkey browser plugin to work, and can be found here: https://gist.github.com/abraxas86/ad72ba46b6cdd86dc63058bba0c629c2

The code does the following:

- Adds a grey button to the bottom of the site, just above the footer
- Adds a text box beside that so that you can change the name of the file if you want.  The default name should be the name of the collection.
- Changes the text of the game names to red.  I did this for two reasons: 1) it looks cool, 2) It's a subtle indication that the script is loaded.

The script will also remove some elements when the button is clicked - namely, the prices of items and the "gif" badge that appears on some thumbnails.  It had to do this in order to clean the information that it was about to grab.  Otherwise, these were ending up in the output.  You can just refresh the page to get them back again if you need them.

 

Read comments (21)