Utility to break monolithic Pokemon Showdown team backups into individual text files. Preserves teams with identical names and Formats.
Find a file
2025-11-14 13:05:13 -07:00
AUTHORS.md Initial commit 2025-10-29 05:29:36 -06:00
COPYING.md Initial commit 2025-10-29 05:29:36 -06:00
KNOWN-ISSUES.md Initial commit 2025-10-29 05:29:36 -06:00
README.md Initial commit 2025-10-29 05:29:36 -06:00
teamstract.py Initial commit 2025-10-29 05:29:36 -06:00
teamstract.tcl Fixed .tcl indentation + normalized same into tabs 2025-11-14 13:05:13 -07:00

Teamstract

On Windows, the Pokemon Showdown Electron app now stores teams as individual files inside a Games-related subfolder of your User folder. The app does not currently exist on other Operating Systems; furthermore, when that change was implemented it scrambled one's list of teams and boxes compared to the Import/Export backup. This alone is a problem for data sync purposes, however edge-casey.

More direly, teams with the same format and identical names will be and have been eaten Highlander-style, as least when the User folder storage was implemented. To this day there may be many dusty team backups sitting around for fear of data loss.

Enter Teamstract.

Usage

Teamstract was first created as a Tcl program, then ported to Python so far. The end result of both versions should be identical. The Python version should work with 3.x and 2.7 (PyPy ftw), but the hashbang line assumes 3.

First, ensure one of the above is installed on your machine, or otherwise accessible for programs.

Place Teamstract in a folder and run it to process monolithic .txt (or .tmp... long story) team backups. It will spawn matchingly-named folders containing individual team text files matching those the Showdown app would create. You can then diff/WinMerge/Meld/duplicate-find/otherwise compare those files with counterparts to guarantee parity. (Ignore whitespace for best results.)

If you should need to run it more than once:

  • Move the folders it created somewhere else, or
  • Make sure that already, successfully-processed team backup files aren't mixed in with unprocessed files.

Why? Matching-filename teams are distinguished, crudely, by a timestamp in milliseconds added to the team name based on when it was processed. This prevents team loss but means double-tapping a backup file will result in a mess of unnecessary duplicates with ungainly filenames.