Gobomatic is a Python library to generate Scratch (3>) projects from Object-Oriented representation of Scratch projects in Python code.
Project description
Gobomatic
Gobomatic is a Python library to generate Scratch (3>) projects from Object-Oriented representation of Scratch projects in Python code.
Example
A build.py file is used to build the Scratch project. It also defines the Stage sprite.
build.py
from gobomatic import *
from main import Self as main
stage = Sprite(
"Stage",
costumes = [
"assets/blank.svg"
]
)
Self = Project(
sprites = [
stage,
main
]
)
Self.export("project.sb3", debug=True)
Each sprite is defined in its own Python file.
main.py
from gobomatic import *
Self = Sprite(
name=__name__,
costumes = [
"assets/scratchcat.svg"
]
)
Self.WhenFlagClicked(
Goto(-100, 0),
Glide(0, 0, 0.5),
Say("Hello, World!"),
)
Resulting project code
Documentation
Contributing
You can help with the development of gobomatic by testing or writing documentation.
Installation from source
clone the repository (You should fork the repository first!)
cd ~/Projects
git clone https://github.com/aspizu/gobomatic gobomatic-git
install the module in edit mode
cd gobomatic-git
pip install -e .
Testing
Use ~/examples/testing to test various Scratch code.
building the project
cd examples/testing
python build.py
open testing.sb3 in the Scratch editor to examine the result.
Mentions
Thanks to @DavidBuchanan314, They too are working on a similar project but with different goals boiga which was the inspiration for this project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gobomatic-2.0.1.tar.gz
.
File metadata
- Download URL: gobomatic-2.0.1.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e9867c6d6222b20cfd94905e85344b9dc97203ad580d6eaba75fc84719a9de8 |
|
MD5 | fe80613a839eabfc58373351928c6fbf |
|
BLAKE2b-256 | 6074114d89c2e61d80b3ddf246f554211d58fc0ab3afbeb1683eb925709c4d66 |
File details
Details for the file gobomatic-2.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: gobomatic-2.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c19399b2937d05431dbb5875c572e78ca51be220b4baf437bb8f97d1ad73d67 |
|
MD5 | c4f05efcc1b71cd5ebc0e4af7155aa84 |
|
BLAKE2b-256 | 4295094b5a7d697274fcf29cc722b36797ef4308475bf3801d35c0252792af70 |