I am a research interested in studying how students learn Scratch and how that affects their learning computer science and computational thinking.
One tool we are creating would parse text from "write project summary," but I noticed (and have confirmed multiple times) that comments are not included. It's easy to see how this would happen, as comments are a different kind of object than are the other primitives.
This should be an easy fix for someone familiar with the source
I have started poking in the source code, but it's not yet making any sense to me.
Offline
What do you mean? That you can't find the "Project Comments" code?
Offline
I wrote kurt, a Python module that can parse Scratch project (.sb) files directly. You'll find comments as an attribute of a Block object. (:
It's on PyPI and Github.
A little background: the comments are stored separately in the file, with a "block ID" that represents the index in the sprite's scripts where the block is located. (It's something like an amalgamation of all the blocks in each script on the sprite, in reverse order). See my discoveries here if you're interested. I think comments have an "anchor" property in the Squeak source that points to the block. That might help you fix the Squeak code; if you use kurt, it does it all for you.
Hope that helps!
Last edited by blob8108 (2012-10-21 07:17:49)
Offline