Skip to content

About

Upload SB3s and update large projects in seconds!

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

s3uploader

s3uploader allows you to upload an sb3 to a Scratch project, but better.

It works as a bookmarklet in order to allow uploading from the project page rather than requiring opening the editor which often takes ages to load. It only updates changed assets and is therefore significantly faster than regular uploading. It does not overwrite the title, instructions or notes and credits.

This is useful for anyone who makes projects externally using tools such as TurboWarp, goboscript etc, as well as those who want to automate updates using scripts or agents.

Bookmarklet

The main tool is a bookmarklet that runs on scratch.mit.edu (and turbowarp.org, see below) and uses the account you're already signed in with, so it never asks for your password.

  1. Open index.html (or the GitHub Pages site, if enabled) and drag the Upload .sb3 button onto your bookmarks bar.
  2. Go to scratch.mit.edu and sign in.
  3. Click the bookmark, choose your .sb3, and click Upload and save.

On a project page it targets that project automatically and reloads the page once it has saved. Elsewhere on the site, enter a project ID or paste a project link.

Before uploading, it:

  • checks the file is a valid Scratch 3 project and within Scratch's size limits (5 MB for project.json, about 10 MB per asset)
  • re-hashes every costume and sound and fixes project.json to match, so hand-edited projects load properly
  • checks the project belongs to the signed-in account
  • only uploads costumes and sounds that aren't already in the saved project, six at a time, retrying if Scratch briefly errors

From TurboWarp

You can also send edits made in TurboWarp straight to the Scratch project:

  1. Open the project in TurboWarp (for example turbowarp.org/714686711), make your changes, and click the bookmark.
  2. Click Open Scratch. The Scratch project opens in a new tab.
  3. Click the bookmark again on that tab. It fetches the latest version from TurboWarp and uploads it.

The Scratch tab has to be opened from that button, because that connection is how the project is passed across. The project is handed over directly from TurboWarp, without zipping it first. If the Scratch tab doesn't respond, TurboWarp offers to download the .sb3 instead. Projects using extensions Scratch doesn't have are blocked before anything is uploaded.

It changes only the project's contents. The title, instructions, notes and credits, and thumbnail stay as they are.

Files

Path What it is
src/uploader.js Bookmarklet source
build.mjs Builds index.html (the install page) from the source
index.html Install page, generated, ready for GitHub Pages
test/test.mjs Tests for the MD5, zip reading and asset re-hashing
node test/test.mjs   # run tests
node build.mjs       # rebuild index.html after editing src/uploader.js

Windows app

desktop/ contains an earlier version as a native Windows program, written in Go with no dependencies. It signs in with a username and password or a session ID.

cd desktop
go test ./...
GOOS=windows GOARCH=amd64 go build -ldflags "-H windowsgui -s -w" -o ScratchUploader.exe .

Notes

  • This uses Scratch's unofficial internal endpoints, which can change without notice.
  • Try it on a spare project first, because the target project is overwritten.
  • If the target project is open in the editor, reload before editing again, or the editor may save the old version back over it.

About

Upload SB3s and update large projects in seconds!

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages