TakaOtaku / Digimon-Card-App

Website to keep track of your Digimon Card Collection and Build Decks with it.
MIT License
29 stars 16 forks source link

Ease card data update automation #497

Closed lupoDharkael closed 1 year ago

lupoDharkael commented 1 year ago

All the BT14 D-Brigade effects that play cards with the Digipolice/D-Brigade trait show they play "Digimon" and it should specify "card" instead.

lupoDharkael commented 1 year ago

@tari101190 is the card text updating process a parsed output from https://digimoncardgame.fandom.com ? I'd love to contribute to fixing this but I don't know if the fixes should be handled in the wiki and backported here or how is this usually managed.

tari101190 commented 1 year ago

The updates need to be made manually so Ideally if possible could you correct them on both the wiki and the github separately? Unfortunately I don't think there's a way to automatically both at once.

lupoDharkael commented 1 year ago

I already have an script that parses the wiki fields in order to find errors, I could modify it to scrap the contents and format a json directly from the web so we only need to change the contents in one place.

tari101190 commented 1 year ago

Okay wow that's great. Honestly I'm not too knowledgeable in this field, but yeah if you have a way to find errors both here and on the wiki and can fix both at once then yeah go for it. Thanks.

TakaOtaku commented 1 year ago

That would be nice, I have a script in GetDataFromWiki.py which gets the images and makes a json, but some formatting is lost and it has a problem with Illustrators atm. :)

lupoDharkael commented 1 year ago

Cool, I'll check it up. My script also used BeautifulSoup intially but I changed it to use wiketextparser instead as it is way easier to get the contents, and parsing wikitext is less error prone due to frontend changes. I'm changing the tittle of the issue so it fits the actual discussion.

TakaOtaku commented 1 year ago

I improved the script quite a bit https://github.com/TakaOtaku/Digimon-Card-App/blob/main/scripts/python/Wiki%20Script/GetDataFromWiki.py. Some things are still missing:

But it is looking pretty good so far :)

TakaOtaku commented 1 year ago

The script now gets every card, and card images :)