This repository contains tools that are designed to allow Python developers to easily load and validate Custom Street board bundles.
- Summary
- Table of Contents
- Prerequisites
- Installation
- Usage as a Library
- Usage from the Terminal
- Further Reading
cs-board-tools
requires Python 3.10 or higher.
cs-board-tools
can be installed via pip for use in the terminal:
pip install git+https://github.com/FortuneStreetModding/cs-board-tools
...or it can be specified in your project's pyproject.toml
or requirements.txt
file if you are building a project that will use cs-board-tools
as a library.
dependencies = [
'cs-board-tools @ git+https://github.com/FortuneStreetModding/cs-board-tools.git'
]
cs-board-tools @ git+https://github.com/FortuneStreetModding/cs-board-tools@main
In its simplest form, loading a board bundle is as easy as passing a filename into a Python function.
from cs_board_tools.io import read_zip
def load_zip_bundle():
filename="WiiU.zip"
bundles = read_zip(filename)
board_bundle = bundles[0]
Then, with that board_bundle object from the previous step, all you have to do is pass it into the validate_board_bundle
function to validate it. What you will get in return is a ValidationResultBundle object, containing all of the results of the tests.
results = validate_board_bundle(board_bundle)
percent = results.success_count / results.total_count
print(
f"{results.success_count} out of {results.total_count} "
f"({percent}%) tests were successful."
)
cs-board-tools
can be used from the terminal to display information about Fortune Avenue-compatible .frb
files, Map Descriptor .yaml
files, or Board Bundles either via .zip
archive files, or by reading in files from a directory. It has two main commands: display
and validate
, and they work the same regardless of the type of input file you are passing in.
cs-board-tools display -d .
cs-board-tools validate -f SomeAwesomeBundle.zip
These work vice-versa as well: you can validate bundles from directory, just as you can display bundles from file.
cs-board-tools
has a rich set of documentation, including detailed installation and usage instructions, and a full, traditional API reference. You can find the docs here: 📚 cs-board-tools documentation.