Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Is there an easy way to convert scratch blocks to plain text and vice versa?
- Tronche2Cake
-
100+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
I'm trying to code a Scratch project with ChatGPT (very original, I know) but the AI is only able to write and interact in text.
So, I want to find a way to convert scratch blocks to text, which would allow ChatGPT to interact with it.
I did try to open the project as a .zip file and get into “project.json”. Although it has all the code, it's packed up in an almost unreadable way, and seems generally bothersome to work with without using an IDE of some sort.
If anyone knows of a ressource that allows conversion between scratch blocks and text, I'd be happy to hear about it.
So, I want to find a way to convert scratch blocks to text, which would allow ChatGPT to interact with it.
I did try to open the project as a .zip file and get into “project.json”. Although it has all the code, it's packed up in an almost unreadable way, and seems generally bothersome to work with without using an IDE of some sort.
If anyone knows of a ressource that allows conversion between scratch blocks and text, I'd be happy to hear about it.
- PlNG_
-
500+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
Last edited by PlNG_ (Jan. 23, 2023 17:09:05)
- lolecksdeehaha
-
1000+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
There isn't to my knowledge, but it may be a fun script to write. I'll look at the structure of project.json and see what it entails.
- ThatCoder77471
-
1000+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
I'm working on something like this
It's not finished yet, but it can convert Scratch to text, just not the other way around
It's not finished yet, but it can convert Scratch to text, just not the other way around
Last edited by ThatCoder77471 (Jan. 23, 2023 18:51:02)
- mybearworld
-
1000+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
ChatGPT wouldn't have the knowledge of any Scratch->Text tool that is now created.
Last edited by mybearworld (Jan. 23, 2023 19:01:19)
- davidtheplatform
-
500+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
It might know about (or be able to guess) the scratchblocks thing where move (x) steps becomes
- lolecksdeehaha
-
1000+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
I'm dissecting the format of the file right now, and next I'm probably going to figure out how to convert blocks to text. I'm planning to also have the “vice versa” in this script right now, too.
- Tronche2Cake
-
100+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
I already tested ChatGPT to see if it could code in Scratch, and it seems to be doing good. ChatGPT wouldn't have the knowledge of any Scratch->Text tool that is now created.

- AXEstudios
-
100+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
This is a cool idea
- mybearworld
-
1000+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
It guesses. when (ball) touches (paddle) is more of a code.org thing.
- ajskateboarder
-
1000+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
What's the point of this? This text output can't even be executed, it's just a representation.
And how is this a coding project? You are feeding a prompt to a language model trained on a lot of data.
And how is this a coding project? You are feeding a prompt to a language model trained on a lot of data.
- know0your0true0color
-
500+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
let it know its mistakeIt guesses. when (ball) touches (paddle) is more of a code.org thing.
from what ive seen 99% of the time it will correct itself

- mybearworld
-
1000+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
How would you have it correct that? What it made there is something that looks like scratchblocks syntax but isn't.let it know its mistakeIt guesses. when (ball) touches (paddle) is more of a code.org thing.
from what ive seen 99% of the time it will correct itself
- Tronche2Cake
-
100+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
I'm guessing it's gonna do better if I give it some actual scratch code in text formatHow would you have it correct that? What it made there is something that looks like scratchblocks syntax but isn't.let it know its mistakeIt guesses. when (ball) touches (paddle) is more of a code.org thing.
from what ive seen 99% of the time it will correct itself
- cookieclickerer33
-
1000+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
Tell to to make one ChatGPT wouldn't have the knowledge of any Scratch->Text tool that is now created.
It worked for me, yea I literally asked it
Code a scratchblock plugin syntax to scratch project converter in JavaScript
And it did it!
- lolecksdeehaha
-
1000+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
Does it work?Tell to to make one ChatGPT wouldn't have the knowledge of any Scratch->Text tool that is now created.
It worked for me, yea I literally asked it
Code a scratchblock plugin syntax to scratch project converter in JavaScript
And it did it!
- imfh
-
1000+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
RokCoder has a Scratch to text converter, but I don’t think it goes backwards. I’ve also written a Scratch to Python converter that you could probably use GitHub copilot with, or something similar.
Scratch to Text: https://scratch.mit.edu/discuss/topic/509008/
Scratch to Python: https://scratch.mit.edu/discuss/topic/600562/
Scratch to Text: https://scratch.mit.edu/discuss/topic/509008/
Scratch to Python: https://scratch.mit.edu/discuss/topic/600562/
Last edited by imfh (Feb. 2, 2023 22:07:40)
- denhaerynckjonathan
-
18 posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
- applejuiceproduc
-
1000+ posts
Is there an easy way to convert scratch blocks to plain text and vice versa?
I know there is some scratch-text thing that I've seen (I don't think it's any of the above), it can convert back to scratch (I think).
Maybe if it has some good documentation you could just feed chatgpt the documentation then tell it to write it in that language?
Maybe if it has some good documentation you could just feed chatgpt the documentation then tell it to write it in that language?
- iqsgottalent
-
1 post
Is there an easy way to convert scratch blocks to plain text and vice versa?
- Discussion Forums
- » Advanced Topics
-
» Is there an easy way to convert scratch blocks to plain text and vice versa?