Skip to main content

Python tool for creating, editing and inspecting Penguinmod(.pmp) and Scratch(.sb3) files.

Project description

๐Ÿง py-pmp-manip

A modular python tool for creating, editing and inspecting Penguinmod(.pmp) and Scratch(.sb3) project files.


๐Ÿš€ Features

  • Loading and Creating Projects
  • Editing Projects
  • Inspecting Projects

For a documentation overview and a broader usage tutorial, see docs/index.md


๐Ÿ“ฆ Installation

pip install py-pmp-manip

Or clone directly. Do not forget to include submodules:

git clone --recurse-submodules https://github.com/GermanCodeEngineer/py-pmp-manip.git
cd py-pmp-manip
pip install -e .

Then install Node.js >=18:

# Using winget (installs latest LTS)
winget install OpenJS.NodeJS.LTS

# Or using Chocolatey
choco install nodejs-lts

# Verify version
node --version

Or install manually from nodejs.org (choose LTS version).

Finally, install npm dependencies (this project uses JavaScript for some tasks):

npm install

๐Ÿงฐ Basic Usage

Before using most parts of pmp_manip, you must initialize the configuration once:

from pmp_manip import init_config, get_default_config

# Start from defaults and override what you need
cfg = get_default_config()
cfg.ext_info_gen.gen_opcode_info_dir = "output/gen_opcode_info"
init_config(cfg)

References


๐Ÿ“ Project Structure

py-pmp-manip/
โ”œโ”€โ”€ pmp_manip/              # Source Code
โ”‚   โ”œโ”€โ”€ config/             # Configuration schema and lifecycle
โ”‚   โ”œโ”€โ”€ core/               # Core functionality
โ”‚   โ”œโ”€โ”€ ext_info_gen/       # Information generator for custom extensions
โ”‚   โ”œโ”€โ”€ important_consts.py # Common important constants
โ”‚   โ”œโ”€โ”€ opcode_info/        # Contains an API for and the information about all the blocks
โ”‚   โ”‚   โ”œโ”€โ”€ api/                 # Theoretical structure of the API
โ”‚   โ”‚   โ”œโ”€โ”€ data/                # Actual data for the API
โ”‚   โ”‚   โ””โ”€โ”€ doc_api/             # A seperate API, which gives information about blocks and monitors in a human-readable way 
โ”‚   โ”œโ”€โ”€ builtin_extension_source/ # Resource Submodule: Adapted Built-in PenguinMod Extensions
โ”‚   โ””โ”€โ”€ utility/            # Utilities for other modules
โ”œโ”€โ”€ docs/              # Documentation
โ”œโ”€โ”€ scripts/           # Independent project-related scripts for developers
โ”‚   โ”œโ”€โ”€ check_dependency_updates.py # Checks for updates of dependencies
โ”‚   โ”œโ”€โ”€ check_source_updates.py        # Checks for updates in foreign code files, from which e.g. constants are derived
โ”‚   โ”œโ”€โ”€ make_uml.py                 # Generates a UML-Diagram for Second Representation
โ”‚   โ””โ”€โ”€ review_pyproject_toml.py    # Reviews pyproject.toml with version and dependencies
โ””โ”€โ”€ tests/             # Unit tests

๐Ÿงช Running Tests

Just run:

pytest tests/

๐Ÿ“„ License

GPLv3


๐Ÿค Contributing

Pull requests, issues, and feedback are welcome! Please read the CONTRIBUTING.md guide before submitting code.


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

py_pmp_manip-1.2.2.tar.gz (295.8 kB view details)

Uploaded Source

Built Distribution

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

py_pmp_manip-1.2.2-py3-none-any.whl (370.6 kB view details)

Uploaded Python 3

File details

Details for the file py_pmp_manip-1.2.2.tar.gz.

File metadata

  • Download URL: py_pmp_manip-1.2.2.tar.gz
  • Upload date:
  • Size: 295.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for py_pmp_manip-1.2.2.tar.gz
Algorithm Hash digest
SHA256 aabc85cd22edc360177cea9e27f7e0cef962000d95c82e55e0731309223403ac
MD5 6028c30ee716c1efb42e3f1f9a00f6a3
BLAKE2b-256 d960d01d9e39d67c70776119b47e1de88909f26a769e6d7f3d0398837fdb988e

See more details on using hashes here.

File details

Details for the file py_pmp_manip-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: py_pmp_manip-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 370.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for py_pmp_manip-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 16d77a05e6bc46ed707fb32e7c80d0bcce43242249badc08e995420ee9832c8f
MD5 58be4d0213829bc898958c1f3d9ac498
BLAKE2b-256 a20f72b86bf8cc55c4dbbc298a430731ac40a295f8e55debc61b73af8245022c

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