Skip to main content

Create and manipulate WPS tags from Python

Project description

python-rockbox

Create and manipulate WPS tags from Python

Currently supported:

  • All tags from Rockbox 4.0 (via Tags class)
  • Tags (Tag class)
  • Conditionals (Match class)

Example

This conditional that displays an appropriate battery bitmap:

wps = Match(
    Tags.IS_CHARGING,
    [
        Tag(Tags.DISPLAY_IMAGE, "A"),
        Match(
            Tags.BATTERY_PERCENTAGE,
            [
                Tag(Tags.DISPLAY_IMAGE, "B"),
                Tag(Tags.DISPLAY_IMAGE, "C"),
                Tag(Tags.DISPLAY_IMAGE, "D"),
                Tag(Tags.DISPLAY_IMAGE, "E"),
                Tag(Tags.DISPLAY_IMAGE, "F"),
            ],
        ),
    ],
)

Would __repr__ to:

%?bp<%xd(A)|%?bl<%xd(B)|%xd(C)|%xd(D)|%xd(E)|%xd(F)>>

Install

To install locally, make sure you have the following installed:

  • A modern version of Python 3 (I target 3.14)
  • git
  • pip

First, clone the repository:

git clone https://git.0stormy.xyz/stormy/python-rockbox.git

Next, change directories into the folder you just cloned:

cd python-rockbox

Finally, install it locally with:

pip install -e .

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

python_rockbox-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

python_rockbox-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for python_rockbox-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cdaa3535a362ae04312ad93b1a64bb19201ce0f2b17d0e96fe825f70c41ede22
MD5 c9b9099bdb0da1e3cec42fe988866e4d
BLAKE2b-256 2f4ebd5413305d66ea987327e8f9b2412091a037575f4fbe57780c601579be99

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rockbox-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for python_rockbox-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f72b0dc5be9ef3fedaefe8658ff4bf05a57f09c8332e59f38d9cdb9ee540f5b0
MD5 233e054b36e4d0f7060e9f753ba60659
BLAKE2b-256 4773c54d59240981c33fb14643321730932d407e205f66b4932ec4d13505f9ab

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