diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2026-02-11 12:12:58 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2026-02-11 12:12:58 +0100 |
| commit | 0bf175dab2ba03cc0f3876a46e3e943e5e146948 (patch) | |
| tree | 7fff0a712caf3e4a4c02e129dc17825a5bf4a8f5 | |
| parent | 98671c933d4877465fa343855e095e3e8e126dea (diff) | |
| download | scratch-gallery-0bf175dab2ba03cc0f3876a46e3e943e5e146948.tar.gz scratch-gallery-0bf175dab2ba03cc0f3876a46e3e943e5e146948.zip | |
improve README.md
| -rw-r--r-- | README.md | 33 | ||||
| -rwxr-xr-x | generate-gallery.py | 5 |
2 files changed, 32 insertions, 6 deletions
@@ -3,6 +3,8 @@ Die *Scratch HTML Galerie* erlaubt es eine einfach HTML basierte Gallery mehrerer Scratch Projekte zu erstellen. +Um Scratch-Projekte im Browser zu verwenden, wird der [TurboWarp Packager](https://github.com/TurboWarp/packager) genutzt. + ## Vorraussetzungen * Python >= 3.10 @@ -10,7 +12,7 @@ mehrerer Scratch Projekte zu erstellen. ## Verzeichnisstruktur -Das Spiel erwartet, dass das Spieleverzeichnis (`projects`) nach folgendem Muster angelegt ist: +Das Programm erwartet, dass das Projektverzeichnis (`projects`) nach folgendem Muster angelegt ist: ``` projects @@ -18,10 +20,35 @@ projects └── Klasse └── Project ├── meta.toml -- Meta Informationen zum Project - ├── Scratch Project.html -- Zu HTML exportierte Scratch Project Datei - └── Scratch Project.s3b -- oder Scratch Project Datei + ├── <Scratch Project>.html -- Zu HTML exportierte Scratch Project Datei + └── <Scratch Project>.s3b -- oder Scratch Project Datei 3 directories, 2 files ``` ## Benutzung + +Um die fertige HTML Gallery zu in einem `build` Verzeichnis zu erzeugen reicht es aus, +das `generate-gallery.py` Skript mit `python` auszuführen. + +``` +$ python3 generate-gallery.py +``` + +### Optionen + +``` +usage: generate-gallery.py [-h] [--author AUTHOR] [--title TITLE] + [--projects-dir PROJECTS_DIR] [--no-packaging] + [--output-dir OUTPUT_DIR] + +options: + -h, --help show this help message and exit + --author AUTHOR author mentioned in the HTML + --title TITLE title of the web page + --projects-dir PROJECTS_DIR + location of the projects + --no-packaging do not package all encountered scratch projects + --output-dir OUTPUT_DIR + output location of the generated HTML code +``` diff --git a/generate-gallery.py b/generate-gallery.py index 773261f..e5e25d0 100755 --- a/generate-gallery.py +++ b/generate-gallery.py @@ -136,9 +136,8 @@ def package_projects(_indir: str, _outdir: str, all_projects: dict): def main(): """Main entry point to generate a HTML Gallery""" parser = argparse.ArgumentParser() - parser.add_argument('--author', default='Florian Fischer') - parser.add_argument('--title', default='Scratch Galerie') - parser.add_argument('--no-license', action='store_true') + parser.add_argument('--author', default='Florian Fischer', help='author mentioned in the HTML') + parser.add_argument('--title', default='Scratch Galerie', help='title of the web page') parser.add_argument('--projects-dir', default='projects', help='location of the projects') parser.add_argument('--no-packaging', action='store_true', |
