Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MTR source #192

Open
lunakv opened this issue Apr 8, 2023 · 4 comments
Open

Update MTR source #192

lunakv opened this issue Apr 8, 2023 · 4 comments

Comments

@lunakv
Copy link
Contributor

lunakv commented Apr 8, 2023

The default data source for the MTR hasn't updated in over three years. MTR doesn't change all that often, but three years is still quite a long time. And while the bot doesn't serve the contents of any API route, and links to the up-to-date annotated MTR, it still produces some bad results.

For example, section 1.5 is titled DCI Number despite being renamed to Registration almost two years ago. And newer sections like 3.17 and 3.18 still return a "Not found" error even though they've existed for over a year.

Based on a quick search, it seems @AEFeinstein mostly abandoned the GathererScraper project and instead uses Mtgjson2Familiar for his rules document parsing. There are some updated HTML files inside the rules folder of that repo, but they look quite different to the file used by the bot today, so some parsing update might need to happen.

As an alternative, the Academy Ruins API just added support for plain-text parsed MTR, which could be of use.

@multimeric
Copy link
Collaborator

Okay, I'm convinced that using Academy Ruins for MTR would be useful. If you would like to provide an integration via PR I would be happy to merge.

@AEFeinstein
Copy link

I did abandon https://github.com/AEFeinstein/GathererScraper for https://github.com/AEFeinstein/Mtgjson2Familiar, and because parsed or structured MTR data which was actively maintained was so hard to find at the time. Instead, I now take the current PDF and turn it into HTML using pdftohtml, which is good enough to display in a webview without a huge PDF library. It's still not particularly machine-friendly though.

Academy Ruins is interesting, maybe I'll look into it too.

@lunakv
Copy link
Contributor Author

lunakv commented Apr 8, 2023

Oh, I didn't realize the mention would notify you, thanks for the clarification!

I actually considered using poppler tools for AR as well, but I ran into some limitations that ultimately made me go in a different direction. Being a text-based API, it naturally doesn't support some things present in the HTML (hyperlinks, images, rich text formatting, ...) but if you ever want to check it out, I'd be happy to assist.

As far as the PR for judgebot, I most likely won't have time to make it myself in the near-ish future, but if anyone else wants to work on it in the meantime, I'd be happy to help with anything related to the API.

@AEFeinstein
Copy link

I like being mentioned, it's how I learn things! At this point, most of my project time is going into non-Magic stuff, and my MTR process is working well enough. Someday it will break (I've found that no data source is good forever), and when it does, I've starred https://github.com/lunakv/academyruins-api 😄

@lunakv lunakv closed this as completed Apr 8, 2023
@lunakv lunakv reopened this Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants