Skip to main content

A command-line app for fixing the .xml files generated by the Magic Set Editor Cockatrice exporter.

Project description

mse-export-fixer

A command-line app for fixing the .xml files generated by the Magic Set Editor Cockatrice exporter. Written in Python 3.7.7.

Install using pip install mse-export-fixer and run at the command line using fixer /path/to/setfile.xml. Use the -h or --help flags to see all options, including custom output file naming, verbose running, automatic datestamping, etc.

By way of background: the current version MSE Cockatrice export template "Cockatrice Exporter ReUpdated" has many issues, some worse than others.

  1. The main issue (which I'm pretty sure causes most of the improper or missing tag issues) is that it still uses the old (v3) Cockatrice set formatting. Among other things, this makes it more likely that Cockatrice reads the .xml incorrectly.
  2. It doesn't export DFCs (double-faced cards) the way Cockatrice expects them, which is as two separate cards connected using the <related> tag, one with the tag <side>front</side> and the other with the tag <side>back</side>.
  3. It doesn't use the <related> tag to link cards that create tokens to the predefined tokens they create.
  4. It doesn't add rarity information.
  5. It adds converted mana costs (the <cmc> tag) inconsistently, if at all.
  6. Because (I think) of the use of the v3 formatting, it uses the <color> tag instead of <colors>, and consequently does not properly tag the card colors of hybrid and multicolored cards.
  7. It doesn't add color identity (the <coloridentity> tag).
  8. It doesn't add card numbering within a set (the num option within the <set ... > tag of a card).

Of these issues, the app currently fixes 1, 2, 5, and 6. Rarities and numbering are totally absent from the files that MSE generates, and parsing token names from rules text is hard. I'll work the latter out when I can actually be arsed to do it. Probably.

Note: You'll need to split the card images for the two sides of DFCs yourself, since MSE normally exports them as one file. Just be sure to name the images according to the names of the respective sides and put them in with the rest of your card images, and you should be good.

I'm writing this because I can't find the actual source code for the exporter and can't decompile the .exe. If anyone can point me to the source, I'd be happy to fix the exporter itself instead.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mse-export-fixer-1.2.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

mse_export_fixer-1.2.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file mse-export-fixer-1.2.0.tar.gz.

File metadata

  • Download URL: mse-export-fixer-1.2.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

File hashes

Hashes for mse-export-fixer-1.2.0.tar.gz
Algorithm Hash digest
SHA256 cd5414edc29c72b8dbd210390c4bf1d5579143a9a992fae63690500cb6e36844
MD5 92e93ec656566e491a0c34d33c562848
BLAKE2b-256 fcbf1c5d2b7aed728422955f28a45cac45aaede499e14d2af4dadadf5caee7d5

See more details on using hashes here.

Provenance

File details

Details for the file mse_export_fixer-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: mse_export_fixer-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

File hashes

Hashes for mse_export_fixer-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7d19f661324dc4ad72c2bbea6f883478010b7886071740ab1a0af45c5a5e301
MD5 62361b698fee3efec800fecb9658484b
BLAKE2b-256 94c2c728b1af86f0a5c6cec36660ecf6225466310dd4e72ac11234307d588c4c

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page