Skip to content

About

Utility for generating lists of Trainz KUIDs.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Kuid Lister

GitHub release (latest by date) Downloads (Latest Release) GitHub all releases

Utility for generating lists of Trainz KUIDs.

screenshot

Paste a copy from Trainz Content Manager, and the app collects every kuid mention, drops the duplicates and hands back one comma separated list, ready to paste into a Download Center search or a Content Manager kuid list filter.

Getting Started

Download the latest Windows build from the Releases tab: the zip holds the GUI (KuidLister.exe) and the command line tool (kuidlistercli.exe), and the MSI installs both for the current user, with no administrator account needed.

Building

The application is Python 3.9+ with a PyQt6 interface.

python -m pip install -e ".[gui]"            # the package plus its Qt binding
kuidlister-gui                               # run the GUI
Get-Content cm-copy.txt | kuidlister         # run the command line tool
pytest -q                                    # the unit tests
python build.py --only exe                   # Windows exes (also dmg, deb, zst)

The two entry scripts at the root of the repository do the same without installing the package: python kuidlister_gui_entry.py and python kuidlister_cli_entry.py --upto 10.

Using the command line

KUIDs are read from stdin and the filtered list is written to stdout as one line, so it fits in a pipeline:

Get-Content cm-copy.txt | kuidlistercli > kuids.txt
type cm-copy.txt | kuidlistercli.exe --upto 10 > kuids.txt

--upto <n> does what the GUI's "Generate asset versions up to" checkbox does: every kuid is replaced by its versions from 0 to n (n between 0 and 127). The exit status is 0 when something was listed, 1 when the input held no kuid and 2 when the version limit was out of range.

Settings

The GUI remembers the Append and Copy checkboxes, the "Generate asset versions" checkbox and its number, and reopens with them next time. They are stored in a small settings.json file in the per-user configuration directory:

Platform Location
Windows %APPDATA%\KuidLister\settings.json
Linux $XDG_CONFIG_HOME/KuidLister/settings.json, or ~/.config/KuidLister/settings.json if that variable is unset
macOS ~/Library/Application Support/KuidLister/settings.json

The file is written as soon as an option changes, and a missing or damaged one simply falls back to the defaults. The command line tool keeps none of its own state; pass --upto on each run.

Issues and Feature requests

For any bugs, issues or feature requests, use the Issues tab in GitHub.

Related Trainz tools

About

Utility for generating lists of Trainz KUIDs.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages