Discuss Scratch

Sasha--seals
Scratcher
31 posts

Converting project.json into something like: move (10) steps, change size by (10) %...

Does anybody know how to convert project.json from an sb3 file into something like:
move (10) steps
change size by (10)
repeat (10):
turn clockwise (15) degrees
if (my var) = (0):
say (my var is 0) for (5) seconds

Last edited by Sasha--seals (Nov. 10, 2023 20:16:19)

bugsyk2009
Scratcher
500+ posts

Converting project.json into something like: move (10) steps, change size by (10) %...

I don't believe this has been implemented by anyone before. In order to do this, you would probably need to

  1. Parse the JSON file to separate the code from everything else
  2. Separate the code of each sprite
  3. Convert the JSON code into readable “Scratch-like” text, indicating what sprite it comes from

I'm not at all experienced with JSON, but I'm sure someone else in the ATs can probably throw a rudimentary version of this together.
Flowermanvista
Scratcher
1000+ posts

Converting project.json into something like: move (10) steps, change size by (10) %...

@RokCoder already made this, and implemented it as part of a toolchain that allows you to use GitHub as a version control system for your Scratch projects: https://scratch.mit.edu/discuss/topic/515487/
god286
Scratcher
1000+ posts

Converting project.json into something like: move (10) steps, change size by (10) %...

Flowermanvista wrote:

@RokCoder already made this, and implemented it as part of a toolchain that allows you to use GitHub as a version control system for your Scratch projects: https://scratch.mit.edu/discuss/topic/515487/
https://www.rokcoder.com/sb3-to-txt/
ajskateboarder
Scratcher
1000+ posts

Converting project.json into something like: move (10) steps, change size by (10) %...

You can use parse-sb3-blocks (JavaScript)

Powered by DjangoBB