|
4 | 4 | <img src="https://img.shields.io/github/languages/top/Secret-chest/Scratch2Python?labelColor=546e7a&color=26c6da&logo=python&logoColor=26c6da&style=flat-square"> <img alt="GitHub" src="https://img.shields.io/github/license/Secret-chest/Scratch2Python?style=flat-square&labelColor=546e7a&color=ffa000"> <img alt="GitHub issues" src="https://img.shields.io/github/issues/Secret-chest/Scratch2Python?labelColor=546e7a&color=64dd17&logo=github&logoColor=ffffff&style=flat-square"> <img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/Secret-chest/Scratch2Python?labelColor=546e7a&color=64dd17&logo=github&logoColor=ffffff&style=flat-square"> <img alt="GitHub milestones" src="https://img.shields.io/github/milestones/open/Secret-chest/Scratch2Python?labelColor=546e7a&color=64dd17&style=flat-square"><a href="https://github.com/Secret-chest/scratch2python/network"> <img alt="GitHub forks" src="https://img.shields.io/github/forks/Secret-chest/scratch2python?labelColor=546e7a&color=ffc107&logo=github&logoColor=ffffff&style=flat-square"></a> |
5 | 5 |
|
6 | 6 | # Scratch2Python |
7 | | -Scratch2Python is a Python program that converts Scratch projects to Pygame code. |
| 7 | +Scratch2Python is a Scratch project interpreter that runs Scratch projects in Python, using pygame to render your sprites. |
8 | 8 |
|
9 | | -## Requirements |
| 9 | +A GUI for accessing the Scratch website is planned. It will most probably use... Qt. I would love using GTK, but **WINDOWS...** [Or maybe not](https://www.gtk.org/docs/installations/windows). |
| 10 | + |
| 11 | +Scratch2Python may only be the temporary name, as this may get confused with [Scratch2Py](https://github.com/The-Cloud-Dev/scratch2py). See #23 for more information. |
| 12 | +## 📝 Requirements |
10 | 13 | Install from requirements.txt (Scratch2Python also needs Python 3.8 or newer). |
11 | 14 |
|
12 | 15 | On Windows, Scratch2Python needs to be installed in a non-protected folder. |
13 | | -By default the "Documents" folder is protected. Installing it anywhere else will work. |
14 | | - |
15 | | -## Docs |
16 | | -[Read the wiki here](https://github.com/Secret-chest/scratch2python/wiki). |
17 | | - |
18 | | -## Files |
19 | | -The table below lists all files in the project. |
20 | | - |
21 | | -| File | Description | |
22 | | -|--------------------|-----------------------------------------------------------------------------------------------| |
23 | | -| `main.py` | Build the project based on the data, run blocks, listen to events | |
24 | | -| `sb3Unpacker.py` | Generate a dictionary from project.json, put objects in it and set them to the correct values | |
25 | | -| `scratch.py` | Scratch emulator, runs blocks on request, contains various Scratch-related functions | |
26 | | -| `target.py` | Sprite class | |
27 | | -| `block.py` | Block class | |
28 | | -| `costume.py` | Costume class | |
29 | | -| `monitor.py` | Variable monitor class (currently unused) | |
30 | | -| `sound.py` | Sound class (currently unused) | |
31 | | -| `variable.py` | Variable class (currently unused) | |
32 | | -| `targetSprite.py` | Targets as pygame sprites | |
33 | | -| `projects/*.sb3` | Projects used for testing | |
34 | | -| `requirements.txt` | List of requirements (install from this file) | |
35 | | -| `README.md` | This | |
36 | | -| `LICENSE` | GPL-3.0 license | |
37 | | -| `config.py` | Config | |
38 | | - |
39 | | -## Naming conventions |
40 | | -Always use `mixedCase` (first letter is always lowercase) for variable, object, parameter, file, function and method names. |
41 | | -Use `CamelCase` (first letter is uppercase) for class names. |
42 | | - |
43 | | -Note: Use underscores if the name may become unclear. For example: use `sb3_unpack` instead of `sb3Unpack` |
44 | | - |
45 | | -## How to use |
46 | | -Assuming that you installed all necessary requirements, place your sb3 files somewhere accesible, or in the Scratch2Python folder. You can use an absolute or relative path. |
| 16 | +By default, the "Documents" folder is protected. Installing it anywhere else will work. |
| 17 | + |
| 18 | +## 📘 Docs |
| 19 | +[Read the wiki here](https://github.com/Secret-chest/scratch2python/wiki). Also read `CONTRIBUTING.md`. |
| 20 | + |
| 21 | +## 🔨 How to use |
| 22 | +Assuming that you installed all necessary requirements, place your sb3 files somewhere accessible, or in the Scratch2Python folder. You can use an absolute or relative path. |
47 | 23 | Then, go to `config.py` and change the projectFileName variable to your project file. |
48 | 24 | There you can also choose to use a command-line argument, or an interactive prompt. The variable option is the default as it's more useful for testing. |
49 | 25 |
|
50 | 26 | Now, just run `python3 main.py` and the project will start! |
51 | 27 |
|
52 | | -### Config |
| 28 | +### ✅ Config |
53 | 29 | The `config.py` file contains some more configuration options. |
54 | 30 |
|
55 | 31 | Each of them is nicely explained, so why not just check it out? |
| 32 | + |
| 33 | +## 🌐 Localization |
| 34 | +To translate Scratch2Python, add a new file in the `lang` directory. Copy the English file for reference, and replace the string. |
| 35 | + |
| 36 | +Then add it on the supported languages list both here and in `config.py`. |
| 37 | +Though I would not recommend translating it right now. It is still very WIP and you would have to update your language |
| 38 | +file very frequently. |
| 39 | + |
| 40 | +Currently supported languages: |
| 41 | + |
| 42 | +| Language code | Language name (English) | Language name (translated) | Flag | |
| 43 | +|---------------|-------------------------|----------------------------|------| |
| 44 | +| en | English | English | 🇬🇧 | |
| 45 | +| ro | Romanian | limba română | 🇷🇴 | |
0 commit comments