Skip to main content

An improved asset packer script to make the process of creating and packing asset packs for the Momentum firmware easier.

Project description

mntm-asset-packer

An improved asset packer script to make the process of creating asset packs for the Momentum firmware easier. This script is designed to be backwards compatible with the original packer while adding new features for a better user experience.

Features

This improved packer adds several features over the original:

  • Pack specific asset packs: No need to pack everything at once.
  • Create command: Quickly scaffold the necessary file structure for a new asset pack.
  • Automatic file conversion: Automatically convert and rename image frames for animations.
  • Asset pack recovery: Recover PNGs and metadata from compiled asset packs. (Note: Font recovery is not yet implemented).
  • Backwards compatibility: Works the same way as the original packer by default, so you can use it without changing your workflow.

Installation

With uv (recommended)

If you don't have uv installed, follow these instructions.

You can quickly run the script without installing, using this command:

uvx mntm-asset-packer help

To install, use this command:

uv tool install mntm-asset-packer
mntm-asset-packer help

With pip

To install with pip, you can use this command:

pip install mntm-asset-packer
mntm-asset-packer help

You may need to use pip3 instead of pip depending on your Python installation.

Standalone Mode

You can also copy the mntm_asset_packer.py file to your project directory and run it directly with Python. (Not recommended)

Setup venv

  1. Clone this repository and navigate into its directory.
  2. Create and activate a virtual environment:
    python3 -m venv venv
    source venv/bin/activate
    
  3. Install the required dependencies from requirements.txt:
    pip install -r requirements.txt
    

Usage

If you run the script directly, replace mntm-asset-packer with python3 mntm_asset_packer.py in the commands below.

mntm-asset-packer help : Displays a detailed help message with all available commands.

mntm-asset-packer version : Displays the version of the asset packer.

mntm-asset-packer create <Asset Pack Name> : Creates a directory with the correct file structure to start a new asset pack.

mntm-asset-packer pack <./path/to/AssetPack> : Packs a single, specified asset pack into the ./asset_packs/ directory.

mntm-asset-packer <./path/to/AssetPack> : Packs a single, specified asset pack into the ./asset_packs/ directory.

mntm-asset-packer pack all : Packs all valid asset pack folders found in the current directory into ./asset_packs/.

mntm-asset-packer : Same as mntm-asset-packer pack all,

mntm-asset-packer recover <./asset_packs/AssetPack> : Recovers a compiled asset pack back to its source form (e.g., .bmx to .png). The recovered pack is saved in ./recovered/<AssetPackName>.

mntm-asset-packer recover all : Recovers all asset packs from the ./asset_packs/ directory into the ./recovered/ directory.

mntm-asset-packer convert <./path/to/AssetPack> : Converts and renames all animation frames in an asset pack to the standard frame_N.png format.

More Information

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

mntm_asset_packer-1.2.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mntm_asset_packer-1.2.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file mntm_asset_packer-1.2.0.tar.gz.

File metadata

  • Download URL: mntm_asset_packer-1.2.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mntm_asset_packer-1.2.0.tar.gz
Algorithm Hash digest
SHA256 81da7e4fa54b449a1e309f855a55625e2bd8516543e195f63682c8a7ecc67de1
MD5 d4b17186cce53e8f7a1d7d146f8c4acb
BLAKE2b-256 a3b2358dc23cc00770112cd2066d2ab7427e951fbdd52078e7e80726e430f5c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for mntm_asset_packer-1.2.0.tar.gz:

Publisher: release.yml on notnotnescap/mntm-asset-packer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for mntm_asset_packer-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 025fd33598920c96e92f901c82cf58c6a01894f92e874d11b57a03583e503e42
MD5 1a999fc79b9cd766e9ff548a38b14420
BLAKE2b-256 d9b8fc02db24820a6c6d0e721cd34073087355c11b96aad9ee985d461fb66d53

See more details on using hashes here.

Provenance

The following attestation bundles were made for mntm_asset_packer-1.2.0-py3-none-any.whl:

Publisher: release.yml on notnotnescap/mntm-asset-packer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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