aboutsummaryrefslogtreecommitdiff

Scratch HTML Galerie

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 genutzt.

Vorraussetzungen

  • Python >= 3.10
  • (npm) um Scratch Projekte lokal zu HTML zu konvertieren

Verzeichnisstruktur

Das Programm erwartet, dass das Projektverzeichnis (projects) nach folgendem Muster angelegt ist:

projects
└── Jahrgang
    └── Klasse
        └── Project
            ├── meta.toml -- Meta Informationen zum Project
            ├── <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