The (re)making of a Pokemon TCG Database and why it was surprisingly fun

TL;DR

Kibbi tries Javascript, hates both it and herself for using it, but it works out for the best.

To preface, I want to formally apologize for giving into liberal agenda and using Javascript. I know. It's horrible. It killed your grandma. But it made a cool table, sooo...

Maybe you remember my previous blog post on how I created the original PokeTCG database. Well it probably comes as no surprise to say that it became completely unmanagable. So many mistakes, broken images, duplicate cards, thousands of lines of code... I just couldn't look at it anymore. Especially when making my new layout for the site, I dreaded the idea of redoing like 40 files of the Same Shit (it also had a separate stylesheet). So I looked for an automated solution.

Google Sheets.

Yeah. I was desperate. From my previous experimentation I thought it was the best way. And someone I know told me it's "pretty simple". And like, sure, it's simple in concept. But the horrors.

I didn't like the idea of having it up on Google Sheets mainly because it's hosted offsite and also I just don't like using Google services. But there was some positives - I already had a ready spreadsheet and Google has their own Sheets API.

I'm sorry, but have you ever TRIED using the Sheets API?! I don't know what I did wrong Genuinely but after getting THREE DIFFERENT PEOPLE to help me I gave up. Every solution caused 10 more new problems I hated it I wanted to cry. I mainly had problems with OAuth, which blocked outside access to the sheet completely even though it was set to be accessed by anyone with a link. I didn't feel like figuring out OAuth permissions or whatever, it requires you to submit like an appeal and for a Pokemon Card Database I genuinely do not care that much.

So I looked at the predecessor of Google Sheets and decided to work with that.

MICROSOFT EXCEL.

(and SheetJS)

This actually resolved my main gripe with Google Sheets - it allowed me to host the file on my website! Using the =HTML function I imported all of the tables I had made in code and copied them over to a spreadsheet. Now I just need to upload it to Neocities and-

FUCK!!!!!!!!!

After moving site hosts to Nekoweb I could FINALLY start my project. It was smooth sailing, except for the fact I don't know JavaScript. But with the SheetJS documentation and help of some more knowledgeable people, I got it to read the spreadsheet!

So I now have a little spreadsheet I can just edit and upload to the site without writing 100s of lines of code! Only drawback of this is that now the cards don't have images, if I remember correctly that's a PRO feature and also in general importing images to spreadsheets is a little borked, so I might have to figure out a different way to do that. I also want to make a little filter system but I'll need to learn a little more JS for that.

Not a very interesting blog, but I think the struggle was worth it.

Back to blog index