Skip to main content

Display information about RISC OS sprite files

Project description

riscos-dumpsprites

riscos-dumpsprites is a Python command line tool for inspecting RISC OS Sprite files.

It supports two output modes:

  • A column summary of all sprites in a sprite file.
  • A field-by-field report for a single named sprite.
  • Machine-readable JSON output for either form.
  • Validation reporting for malformed or suspicious sprite structures.

Usage

Summarise the contents of a sprite file:

./riscos-dumpsprites sprites/wavytile,ff9

Describe a single sprite:

./riscos-dumpsprites sprites/basi3p02,ff9 basi3p02

Emit JSON:

./riscos-dumpsprites --json sprites/manysprites,ff9
./riscos-dumpsprites --json sprites/basi3p02,ff9 basi3p02

Validate a file:

./riscos-dumpsprites --check sprites/wavytile,ff9

Show richer text output:

./riscos-dumpsprites --verbose sprites/manysprites,ff9

Filter the sprite list:

./riscos-dumpsprites --name 'basi4*' sprites/manysprites,ff9
./riscos-dumpsprites --type 32bpp+a --has-mask sprites/manysprites,ff9
./riscos-dumpsprites --mode 27 sprites/wavytile,ff9

Extract a single sprite into its own sprite file:

./riscos-dumpsprites sprites/wavytile,ff9 tile_1r --extract tile_1r,ff9

The parser understands both old-format sprite mode words and the newer sprite mode word format, including alpha-channel and CMYK-related sprite type handling. Detailed reports and JSON output include decoded palette entries. Text output previews the first 16 palette entries for large palettes. For documented old-format mode numbers, the tool also reports standard mode metadata such as text resolution, graphics resolution, OS units, and logical colour count. Summary output distinguishes sprites with no mask, classic 1bpp masks, and 8bpp alpha masks.

Development

Run the test suite with:

python3 -m unittest discover -s tests

Sample sprite files used for testing live in sprites/.

Publishing

To publish a new version to PyPI:

  1. Update the version in pyproject.toml.
  2. Build and publish using make:
    make publish
    
    Note: This requires twine to be configured with your PyPI credentials.

References

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

riscos_dumpsprites-0.1.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

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

riscos_dumpsprites-0.1.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file riscos_dumpsprites-0.1.0.tar.gz.

File metadata

  • Download URL: riscos_dumpsprites-0.1.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.8

File hashes

Hashes for riscos_dumpsprites-0.1.0.tar.gz
Algorithm Hash digest
SHA256 992c9de37e6cf138ba1b147ddcef092764216372bc71eff7e192f3b9f0aed9a7
MD5 e556fd7f114029994684dbdf30c5c758
BLAKE2b-256 c9caa94855a6c3740866c62cf9c00dabc696de53c0291179f96e019cf79a1a99

See more details on using hashes here.

File details

Details for the file riscos_dumpsprites-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for riscos_dumpsprites-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 411f549a7b86f9d072df658a340a2f35cb8bad5d9ffb24a5c99ba814dd320c18
MD5 2c6b18f6f32cbe9f04a7a821d20ded9c
BLAKE2b-256 19cc0c4b714c7af512e4c79526b05a5fed86addd9a1f28a023b08fc74502e5e9

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