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

DSK/DSC Tokens #283

Merged
merged 6 commits into from
Sep 25, 2024
Merged

DSK/DSC Tokens #283

merged 6 commits into from
Sep 25, 2024

Conversation

celo0
Copy link
Contributor

@celo0 celo0 commented Sep 24, 2024

No description provided.

tokens.xml Outdated
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version='1.0' encoding='UTF-8'?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this change for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was my lxml lib version when i runned the script to grab the new tokens

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For whatever reason, lxml defaults to single quotes in the header (probably because Python makes no distinction between single and double quotes) and I can't figure out a way to change it. It messes around the order of attributes in <cockatrice_carddatabase> too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next time I will revert it back to double quotes and the correct order of the attributes as well

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I always have to make sure and check the diff before I submit the PR; a little annoying but preferable to making token entries manually. Thanks for doing this btw, hope the script wasn't too hard to use.

Apparently the single quotes are hardcoded in lxml so pretty much can't change that.

The attribute order is due to lxml storing the attributes in a Python dictionary (which is no longer inherently unordered, but it still isn't guaranteed to preserve order) when it reads the xml in, so there might be some way to manually reorder them when putting them back into xml format, but if so, I haven't found it yet.

Copy link
Member

@ebbit1q ebbit1q left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for your help!

@ebbit1q ebbit1q merged commit 86940b0 into Cockatrice:master Sep 25, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants