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.

Setup

Using uv (recommended)

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

You can quickly run the script with this command:

uvx mntm-asset-packer help

To install, use this command:

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

or using pip:

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

Using 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 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 pack all : Packs all valid asset pack folders found in the current directory into ./asset_packs/. This is the default action if no command is provided.

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.1.0.tar.gz (19.4 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.1.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mntm_asset_packer-1.1.0.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.14

File hashes

Hashes for mntm_asset_packer-1.1.0.tar.gz
Algorithm Hash digest
SHA256 5d5fef718e9a031a265d2f85d765281de33c44ca086a91794511bbeb44e3e1ae
MD5 8ea019306b100d8e613ea7aa2fbd34e6
BLAKE2b-256 a45f9a3c769e2ae6f96a5874256b35260faa503107ff3054396297518130ede3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mntm_asset_packer-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 984fb2fc9e84aff3d4992412752b27ba9b22f970339c1c7e055bfeb773fe7e1a
MD5 97d7482f55523debb05abd87068cf1ca
BLAKE2b-256 b3e78767c90664e57e80185431f818e7c4ca7b6e966f4d15f017e5cc2ea090fc

See more details on using hashes here.

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