Fryyyyy / Fryatog

GoLang based IRC bot for looking up MTG Rules/Oracle
4 stars 3 forks source link

Venser's Journal going offline #193

Closed Villawhatever closed 2 years ago

Villawhatever commented 2 years ago

Someone needs to do sumn with the rules side of the bot

Fryyyyy commented 2 years ago

:o

Can you share the code with me?

Villawhatever commented 2 years ago

https://github.com/daniel-beck/VensersJournal someone forked it a while back. No idea how up to date it is.

Fryyyyy commented 2 years ago

I whipped up and deployed a quick and dirty version on GCP Cloud Functions Need to get it to recreate the Venser's Journal reply format so we can just change the API URL and it should Just Work

lunakv commented 2 years ago

I'd be happy to help with the code, lmk if you need anything.

lunakv commented 2 years ago

I managed to hunt down a version of the script generating the rules API from last year. It's for a newer version, so it's slightly differently structured, but it should be convertible to what we use without too much trouble (or we could adapt to the new structure). Also, the TXT rules files from wotc have some weird encoding, where lines are separated by just CR, except between sections, where it's CRLF. And it has a byte-order mar, because of course it does. Anyway, after some testing, running sed '1s/^\xEF\xBB\xBF//; s/\r$//; s/\r/\n/g' on the file transforms it into a normal linux-friendly output.