CoderDojoTrento / publish-sb3

Creates html page to easily run .sb3 projects hosted on a custom server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Publish sb3

If you have Scratch .sb3 projects hosted on a custom server and want to publish them outside official Scratch website, this python script creates a single index.html page with browsable folders and links to easily run projects, view their code and download sb3 files.

Since original Scratch can't open links from URL, links will open in turbowarp.org scratch fork.

This tool can be useful if you don't want students to create accounts on Scratch, note also Turbowarp doesn't require (nor allows) creating accounts.

Demo (English):

https://coderdojotrento.github.io/publish-sb3/demo

Demo (Italian):

https://coderdojotrento.github.io/publish-sb3/demo-it

Example usage

Reads all projects in root folder demo and creates demo/index.html, supposing the file will be hosted on https://coderdojotrento.github.io/publish-sb3/demo/ (REMEMBER trailing slash)

python3 publish_sb3.py -r demo  -s https://coderdojotrento.github.io/publish-sb3/demo/ 

Deployment

All needed js and css files are packaged in a single index.html file for deployment convenience.

Requirements

  • Python version: >= 3.6
  • Pyhton dependencies: see requirements.txt
  • Javascript dependencies (already included): JSLists
  • Hosting server needs to allow CORS calls

Credits:

David Leoni info@davidleoni.it

CoderDojo Trento coderdojotrento.it

Graphics:

  • file.svg from svgrepo (CC0 License)
  • folder.svg from svgrepo (CC0 License)

About

Creates html page to easily run .sb3 projects hosted on a custom server.

License:Apache License 2.0


Languages

Language:HTML 60.8%Language:JavaScript 15.1%Language:Python 13.4%Language:CSS 10.3%Language:Shell 0.5%