Switch Cart Submission Tool Released

Post bug reports and suggestions for the website, forums and DOM here.
Post Reply
rarenight
Datter
Posts: 705
Joined: 19 Mar 2017 09:41

Switch Cart Submission Tool Released

Post by rarenight »

I have noticed a significant variation in Switch cart submissions to the forum. Given that datting Switch carts and accommodating all of these variations is quite time-consuming, I decided to program a tool in Python that anyone can use to standardize their Switch cart submissions to No-Intro. This will significantly speed up the datting process and assist contributors with generating proper submissions so that we don't miss anything by accident.

Similar to @DarkMatterCore's NSP XML generation scripts (affectionally referred to as "The Grinder"), my script outputs XML files for XCI files (cart images) that can be easily imported into No-Intro. But because we're dealing with carts here that require manually-inputted metadata, my script presents you with step-by-step instructions in a visual interface with built-in failsafes to (hopefully) generate perfect entries every time.

You can download my tool and find instructions how to use it here.

Update: v2.7 has been added, please replace earlier versions with this version


So when creating a Switch cart submission to No-Intro, please upload the following:
  • The XML submission file that my tool outputs
  • The Initial Data metadata file, uploaded either as a file or encoded into Base64 using Cryptii
  • Any images you wish to submit as well
On the datter side of things, once the XML is imported (Upload Custom XML -> 4 6 1 4), the datter has to:
  • Renumber to latest zXXX if new entry
  • Check languages for instances where supported languages aren't listed in the parsed Control NACP metadata
  • Add the forum submission URL
  • Upload any images
User avatar
oldieboy
Dumper
Posts: 37
Joined: 10 Jun 2024 07:50

Re: Switch Cart Submission Tool Released

Post by oldieboy »

Hello, I got this after clicking "Generate Submission":

Traceback (most recent call last):
File "no-intro-switch-cart-submission-tool-v1.5.py", line 537, in generate_xml
os.startfile(output_dir)
AttributeError: module 'os' has no attribute 'startfile'

I think saved xml did look OK (I submitted it to forum).
rarenight
Datter
Posts: 705
Joined: 19 Mar 2017 09:41

Re: Switch Cart Submission Tool Released

Post by rarenight »

oldieboy wrote: 22 Jul 2024 15:33 Hello, I got this after clicking "Generate Submission":

Traceback (most recent call last):
File "no-intro-switch-cart-submission-tool-v1.5.py", line 537, in generate_xml
os.startfile(output_dir)
AttributeError: module 'os' has no attribute 'startfile'

I think saved xml did look OK (I submitted it to forum).
This is because startfile is Windows exclusive, and you're probably running the script on Linux. I added support for xdg-open too, please download v1.6 and see if the error message still persists when generating XMLs for your other entries. Thank you!
User avatar
oldieboy
Dumper
Posts: 37
Joined: 10 Jun 2024 07:50

Re: Switch Cart Submission Tool Released

Post by oldieboy »

Yes, I am using Linux (openSUSE Leap 15.5, KDE Plasma 5.x, Python 3.6.15).

Now script says: kf.service.services: KApplicationTrader: mimeType "x-scheme-handler/file" not found

Script saves the xml but does not exit after saving. It opens my default file manager (after saving the xml from the save dialog).

> Compile into a user-friendly EXE with all dependencies bundled in

Oh no! :roll:

PS: Maybe you should add "loose cart" option. Now script does not let save if one does not fill in cover serial and bar code.
rarenight
Datter
Posts: 705
Joined: 19 Mar 2017 09:41

Re: Switch Cart Submission Tool Released

Post by rarenight »

oldieboy wrote: 23 Jul 2024 05:47 Yes, I am using Linux (openSUSE Leap 15.5, KDE Plasma 5.x, Python 3.6.15).

Now script says: kf.service.services: KApplicationTrader: mimeType "x-scheme-handler/file" not found

Script saves the xml but does not exit after saving. It opens my default file manager (after saving the xml from the save dialog).
This error seems to be out of my hands. Maybe you should run 'sudo apt-get install xdg-utils'?
oldieboy wrote: 23 Jul 2024 05:47 PS: Maybe you should add "loose cart" option. Now script does not let save if one does not fill in cover serial and bar code.
Great idea! I'll add this to my to-do list. Thanks for the feedback and I'm looking forward to the XMLs you generate! :D
User avatar
oldieboy
Dumper
Posts: 37
Joined: 10 Jun 2024 07:50

Re: Switch Cart Submission Tool Released

Post by oldieboy »

Those xdg-utils are installed. MIME error message goes away by adding that MIME type but file manager will still be opened. That seems to be some old KDE bug/feature.
rarenight
Datter
Posts: 705
Joined: 19 Mar 2017 09:41

Re: Switch Cart Submission Tool Released

Post by rarenight »

v1.7 is now out!
- Added a dropdown for regions
- Fixed GameID2 four-digit bug
- Add revision auto-fill
- Added loose cart toggle
rarenight
Datter
Posts: 705
Joined: 19 Mar 2017 09:41

Re: Switch Cart Submission Tool Released

Post by rarenight »

v1.8 is now out!

- Embedded nxgameinfo_cli as a dependency
- Added a "Truncate FullXCI File" button that reverts a Full XCI back to a Default XCI and an Initial Area
- Added additional failsafes to prevent Default XCIs / Full XCIs from being mistakenly processed

My ultimate goal is to replicate NX Game Info's functionality and extract metadata natively within Python, but my initial experiments yesterday were not successful, so in goes the EXE for now. This is a good solution in the meantime, as now you can directly drag and drop an XCI file onto the window and it will parse all of the metadata automatically without having to import CSV data or copy and paste output from elsewhere.
rarenight
Datter
Posts: 705
Joined: 19 Mar 2017 09:41

Re: Switch Cart Submission Tool Released

Post by rarenight »

v2.0 is now out!

- Added scene cart mode
- Now processes files in 4 MB chunks to minimize crashing on low-end machines
- Added processing percentage completed in terminal
rarenight
Datter
Posts: 705
Joined: 19 Mar 2017 09:41

Re: Switch Cart Submission Tool Released

Post by rarenight »

v2.2 is now out!

- Further testing and performance optimizations to minimize out-of-memory crashes
- Reintroduced manual import option for users who can't get the EXE dependency to work
- Fixed Exclude Initial Area bug
- Fixed a few regressions from v2.0
User avatar
oldieboy
Dumper
Posts: 37
Joined: 10 Jun 2024 07:50

Re: Switch Cart Submission Tool Released

Post by oldieboy »

v2.2

while chunk := f.read(4096):
^
SyntaxError: invalid syntax
rarenight
Datter
Posts: 705
Joined: 19 Mar 2017 09:41

Re: Switch Cart Submission Tool Released

Post by rarenight »

oldieboy wrote: 13 Aug 2024 17:45 v2.2

while chunk := f.read(4096):
^
SyntaxError: invalid syntax
You should upgrade to the latest version of Python 3!
User avatar
oldieboy
Dumper
Posts: 37
Joined: 10 Jun 2024 07:50

Re: Switch Cart Submission Tool Released

Post by oldieboy »

Can they really change basic syntax without a new major version (like 4.x)? Now I am running Python 3.6.15.
User avatar
oldieboy
Dumper
Posts: 37
Joined: 10 Jun 2024 07:50

Re: Switch Cart Submission Tool Released

Post by oldieboy »

OK, there is Python 3.11.9 in official repo. New problem with that.

line 2, in <module>
from PyQt5.QtWidgets import (
ModuleNotFoundError: No module named 'PyQt5'
User avatar
oldieboy
Dumper
Posts: 37
Joined: 10 Jun 2024 07:50

Re: Switch Cart Submission Tool Released

Post by oldieboy »

python3-qt5 - Python bindings for Qt 5
Installed Version 5.15.7-150500.1.3
...
Requires:
...
python(abi) = 3.6
...

It seems openSUSE python3-qt5 does not work with Python 3.11.9.
Post Reply