Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

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.

 

Support this post

Did you like this post? Tell us

Leave a comment

Log in with your itch.io account to leave a comment.

So I see how you have to start at the Purchases page and can scroll down to get a list to export.

What about bundles? I picked one of my purchased bundles and scrolled through 22 pages = no grey button anywhere.

It's the same for bundles.  It was the "Racial Justice and Equality" bundle that dove me to make this thing in the first place.  You should find the button once you reach the true bottom of the page.  It might not hurt to scroll all the way up (with the scroll bar) and then all the way back down to the bottom (with the scroll bar) again just to make sure it's all loaded in and ready to export.

I had to make it with the button at the bottom to make sure that the full collection was loaded.  Because it uses "lazy loading" to pull in the contents, anything that hasn't been pulled through to the browser won't be exported in the CSV.

If Itch ever offers this feature natively, they'd have the back-end access to actually export them without having to load the full set into memory first.

(+1)

Thank you for this script. I recently lost my database containing all my different libraries, and am in the painstaking process of recreating it. Being able to export itch.io instead of adding a miles-long list one item at a time is fantastic.


Though I do have one question; I don't know about the complexity of it, but is there a simple way to include a field defining the content type? Soundtrack, Game, Book, etc. That would be glorious. Thank you again!

(+1)

Glad I was able to help you get your database back in action.  I made it because I'd added so many cool looking games and had no idea how to pick one to play next...  so I figured adding it to a database was the way to go.  I was (and still am) surprised that Itch doesn't have any way to export collections.

As for separating by type, it may be a bit tricky if it isn't explicitly defined in the code.  Games would be fairly easy to pull out as long as they have a "game_genre" set.  But the rest might be a bit trickier.  If you can give me a few of each type to put into a library of my own, I can see what I can do.

(+1)

Thank you for the prompt reply. I appreciate your still being interested in keeping tabs on this instead of abandoning it like so many folks do. That makes perfect sense. Staring at a (poorly designed) library interface can be mind-numbing, then you wind up spending more time looking through it instead of playing something. You have a point; for something that's been requested over and over for years, you'd think it would have been implemented to some degree by now.

Ah, that makes sense. Hopefully it doesn't look like a huge amount of effort.  So far as samples, here's a couple from each category:


Games:

REQUIEM

A.O.O.F.A.D.: All of Our Friends Are Dead


Books:

The NPC with a Thousand Faces

The Corrupted Kingdom


Physical Games:

Cards: The Attackening!™

Poison for Beginners


Tools:

SuperShot: Screenshot Tool

PQ93


Game Assets:

Urban Nightscape

Outdoor Adventurer Tileset


Comics:

Philip K. Dick's Tony and the Beetles

Apple Quest Monsters DX


Soundtracks:

"CHILL VIBES" #1-10 Videogame Instrumentals Pack

SNES Original Soundtrack Small Collection

(+1)

Ah, a fellow "Equality Bundle" owner.  The very collection that led me to making that script in the first place 馃ぃ

I'll get a test library going now and see what I can find.

(+1)

I don't think there's really any way I can separate by type like that.  There's no unique identifier in the code that separates one type from the next :(  The only thing I can think of is adding it to the blurb.  I can add that to the "blurb" to the export.

(+1)

I couldn't find any way to automate the ability to export the "type" of each item.  There's nothing in the data that seems to differentiate one thing from another.

The best I could do was export the "blurb" part of the code... it would mean manually updating the blurb for each item, which I get sucks, but on the plus side if you accidentally wipe your database again, the manually-entered blurbs should still be in tact on the site so you can just export and run with it again.


Version 3.5 should be the version on the Gist page now.  I did some testing and it seemed to work consistently.  Let me know  if it works okay for what you need if you use it.

(+1)

I downloaded 3.5, and the test run did work as expected. Adding blurbs to every item on the itch.io side may take a little while, but it will still save me a mountain of time instead of tailoring each entry on the other end, since the interface for the database software I use is kind of annoying, if I'm being honest.

And as you mentioned, if something happens to my database again (which it better not, I'm backing that thing up on two extra drives now), having all that information pre-set will expedite the process in the future. I think this was a good and dynamic solution.

Thank you for investigating, and for modifying your script to accommodate this request.

No problem!  It's kind of interesting that the "tags" don't seem to be publicly facing.  They clearly exist because we can search for things like "music" and get relevant results back, but those tags don't seem to exist in any public-facing place.

I wish Itch put some effort into better ways for us to export and manage our library data.

You're welcome for the update, and thank you for putting my script to use and for the great suggestion!

(+1)

Dear God, THANK YOU, I might finally know what the hell I own in here lmao

LOL no worries!  It's funny how many people have found this recently.  I'm glad it's been helpful for so many people.

(+1)

This is really great, together with a script that adds all games from a bundle to my library I was finally able to merge my itch games to my spreadsheet where I catalog my collection on every other platform. Thank you!

You're welcome!  I'm so glad people are finding this script, and it's helping.  I'm honestly really surprised that it isn't a feature that's natively built into the site.   I need to remember to get around to updating it a bit so you can export your "Items Owned" collection.

(+1)

Hey, thank you so much for this! I'm creating a complete collection of my games, and this was a lifesaver. It worked perfectly for me. I installed Tampermonkey, added your script, and spent a couple of minutes scrolling to the bottom of my library—there was your handy little button!

(+1)

yay!  I'm so glad people found this and it's been useful.  I'm honestly surprised that it isn't something that's just built into the site.  I was also kinda surprised that nobody else had made it yet lol.  But yeah, thanks for checking it out and I'm glad it saved you time and made your project even just a bit easier to tackle!

(+1)

Thanks a LOT ! Saved me a lot of time.

(+1)

Glad to have helped!  It still blows my mind that this isn't something natively baked into Itch.  Was it able to get everything you needed?

Yes, thank you! To be fair I don't think it's a common usage ^^

(+1)

haha, probably not - but there were a few people asking if the feature existed when I tried to google it.

hi i cant seem to get this to work i added the script to Tampermonkey but nothing seems to happen any ideas?

(1 edit)

I have it set up specifically for collections - make sure you go to your collection and then scroll all the way down to the bottom.  Because the collection content loads dynamically, the script needs you to reach the very end of your collection to make sure it's able to grab all the games.

You should see a button like this at the very bottom:


Did you ever get the script working?  I did a huge update to it last week.  Maybe the updated script will work better for you?