Discuss Scratch

liamdadude
Scratcher
500+ posts

Scratch 3.0 Technical Discussion

The pi will be an improvement since my ram for my fire is 1.5 gb

infinitytec
Scratcher
1000+ posts

Scratch 3.0 Technical Discussion

liamdadude wrote:

The pi will be an improvement since my ram for my fire is 1.5 gb
No kidding.


My PC: Ryzen 7 2700 / ASRock x470 Master SLI/AC / 16GB RAM / 250GB SSD / 2TB HDD with 120GB SSD cache / 4GB XFX Radeon RX560 / Windows 10 Pro

Wetbikeboy2500 wrote:

good old infinitytec
JorgeNachtigall
Scratcher
2 posts

Scratch 3.0 Technical Discussion

Hi,

I'm working with a real time monitoring tool for my undergraduate thesis.

Right now I'm looking for a way to get the updated XML of the “code part”. I mean: everytime I add a new block on my code, I want to get an XML file with the new information (and I'm not talking about the toolbox). I can get the json file provided by the scratch-vm, that contains the updated code, but I need the XML file.

Any thoughts about this? Is this even possible?

Cheers.
infinitytec
Scratcher
1000+ posts

Scratch 3.0 Technical Discussion

JorgeNachtigall wrote:

Hi,

I'm working with a real time monitoring tool for my undergraduate thesis.

Right now I'm looking for a way to get the updated XML of the “code part”. I mean: everytime I add a new block on my code, I want to get an XML file with the new information (and I'm not talking about the toolbox). I can get the json file provided by the scratch-vm, that contains the updated code, but I need the XML file.

Any thoughts about this? Is this even possible?

Cheers.
XML file of what? The data collected? The project code?

Either way, I don't think that it is possible. I don't think Scratch saves anything in an XML format.


My PC: Ryzen 7 2700 / ASRock x470 Master SLI/AC / 16GB RAM / 250GB SSD / 2TB HDD with 120GB SSD cache / 4GB XFX Radeon RX560 / Windows 10 Pro

Wetbikeboy2500 wrote:

good old infinitytec
SimpleScratch
Scratcher
500+ posts

Scratch 3.0 Technical Discussion

I can get the json file provided by the scratch-vm, that contains the updated code, but I need the XML file.

How about trying an online JSON to XML convertor?
raimondious
Scratch Team
19 posts

Scratch 3.0 Technical Discussion

JorgeNachtigall wrote:

Hi,

I'm working with a real time monitoring tool for my undergraduate thesis.

Right now I'm looking for a way to get the updated XML of the “code part”. I mean: everytime I add a new block on my code, I want to get an XML file with the new information (and I'm not talking about the toolbox). I can get the json file provided by the scratch-vm, that contains the updated code, but I need the XML file.

Any thoughts about this? Is this even possible?

Cheers.

You can do this by listening for workspace events, documented here: https://developers.google.com/blockly/guides/configure/web/events. If you want more help, it might be easier to communicate over an issue in https://github.com/llk/scratch-gui/.
liamdadude
Scratcher
500+ posts

Scratch 3.0 Technical Discussion

JorgeNachtigall wrote:

Hi,

I'm working with a real time monitoring tool for my undergraduate thesis.

Right now I'm looking for a way to get the updated XML of the “code part”. I mean: everytime I add a new block on my code, I want to get an XML file with the new information (and I'm not talking about the toolbox). I can get the json file provided by the scratch-vm, that contains the updated code, but I need the XML file.

Any thoughts about this? Is this even possible?

Cheers.
If Im correct, scratch is based off html, and does not use XML for any of the code

AmazingMech2418
Scratcher
500+ posts

Scratch 3.0 Technical Discussion

liamdadude wrote:

JorgeNachtigall wrote:

Hi,

I'm working with a real time monitoring tool for my undergraduate thesis.

Right now I'm looking for a way to get the updated XML of the “code part”. I mean: everytime I add a new block on my code, I want to get an XML file with the new information (and I'm not talking about the toolbox). I can get the json file provided by the scratch-vm, that contains the updated code, but I need the XML file.

Any thoughts about this? Is this even possible?

Cheers.
If Im correct, scratch is based off html, and does not use XML for any of the code
You are correct and Scratch does run on HTML5 (specifically WebGL), but this is not why it doesn't use XML. Scratch has always used JSON for data storage rather than XML, but Scratch 3.0 being based on Google's Blockly allows for a potential implementation of XML file storage. However, Scratch just stuck with JSON and decided not to switch to XML. JSON is also easier to manipulate, especially if an offline version is wanted.

set [variable v] to [true]
if <<I finally learned how to do a signature :: sensing> = <variable :: variables>> then
set [response v] to [YES!!!!!]
end
say (show::looks stack) for (stop [all v]::cap) secs

Powered by DjangoBB

Standard | Mobile