This capability may already be available, but if it is, I haven't found it. If so, just tell me.
It would be very good for authors like myself if there were a way to produce a text output of a Scratch project. See for example, the Alice source code listings at the following URL where a single HTML file contains almost everything that is required to understand an entire project:
http://www.dickbaldwin.com/alice/Alice0175.htm#Complete%20Program%20Listings
While they are not perfect, they are much more practical than screen shot images such as
http://www.dickbaldwin.com/homeschool/Hs00114.htm#The_program_named_RepeatUntil01
I can give several reasons why this capability would be useful:
1. Producing the kinds of images referred to above is very time consuming.
2. Screen shots of many different screens are required to document an entire project.
3. Long scripts can't be included in a single image due to restrictions on the height of the screen and the height of the Scripts tab. Multiple scrolled images are required.
4. Google searches are not possible on code that is only displayed in an image.
5. The inclusion of a large number of images in a document increases download bandwidth requirements as well as server space requirements.
6. Occasionally, (but fortunately not too often), a script containing complex code is too wide to fit in the fixed-width Scripts tab even when the user interface has been maximized. Therefore, horizontal scrolling is required to view and reproduce an image of the script. (I understand that Chirps has provided a patch that can be used to increase the width of the Scripts tab but I haven't tried it yet because this is not the worst of the problems.)
I could provide many other reasons as well, but hopefully the short list given above will get someone's attention and entice them to provide this capability.
Thanks,
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free Scratch tutorials: http://www.dickbaldwin.com/tocHomeSchool.htm
Free Java/C#, etc. tutorials: http://www.dickbaldwin.com/toc.htm
Last edited by dbal (2008-05-15 12:46:22)
Offline
dbal,
There is a (somewhat hidden) feature which might just offer what you need:
If you press and hold the shift key and left-click on the "Extras" Menu-button you will be presented with an option to "write project summary". Selecting this menu-entry will output a text-file to the Scratch directory containing, err, a summary, stats and all scripts of the current Scratch project in a pseudo-code like format. The only drawback is that you cannnot file these pseudo-code like scripts back into Scratch. But they should serve well for documentation purposes.
Another way to output scripts to text is to use my Chirp-plugin, which lets you export scripts to external text files in an XML-format, which can be edited and re-imported into any other Scratch project.
Does that help you any further?
PS: great tutorials, btw!
Offline
Another thing:
dbal wrote:
Producing the kinds of images referred to above is very time consuming.
Did you know that you can right-click on the background of the scripts-pane and select "save picture of scripts" from the context menu? This should make it a lot easier to export screenshots (besides, it also works for scripts wich are wider / longer than the pane).
Offline
Jens wrote:
Another thing:
dbal wrote:
Producing the kinds of images referred to above is very time consuming.
Did you know that you can right-click on the background of the scripts-pane and select "save picture of scripts" from the context menu? This should make it a lot easier to export screenshots (besides, it also works for scripts wich are wider / longer than the pane).
I did not know this, and yes it will make it much easier to export screen shots.
Although there are a lot of nice videos that describe the flashy features of scratch (music, image effects, etc.), and some PDF documents that explain Scratch features at a fairly high level, I haven't found written documentation that gets down to this level. Where can I find documentation that describes features such as this one?
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free Scratch tutorials: http://www.dickbaldwin.com/tocHomeSchool.htm
Free Java/C#, etc. tutorials: http://www.dickbaldwin.com/toc.htm
Last edited by dbal (2008-05-16 09:57:01)
Offline
Jens wrote:
dbal,
There is a (somewhat hidden) feature which might just offer what you need:
If you press and hold the shift key and left-click on the "Extras" Menu-button you will be presented with an option to "write project summary". Selecting this menu-entry will output a text-file to the Scratch directory containing, err, a summary, stats and all scripts of the current Scratch project in a pseudo-code like format. The only drawback is that you cannnot file these pseudo-code like scripts back into Scratch. But they should serve well for documentation purposes.
Another way to output scripts to text is to use my Chirp-plugin, which lets you export scripts to external text files in an XML-format, which can be edited and re-imported into any other Scratch project.
Does that help you any further?
PS: great tutorials, btw!
I was not aware of the extra-extras available by holding down the shift key and pressing the Extras button.
I am running v1.2.1 under WinXP. When I do that and select either of the project summary items on the popup menu, nothing seems to happen. There is no opportunity to specify a disk file and I don't hear any disk activity to indicate that the summary is being written in a default file.
Any suggestions as to what I might be doing wrong?
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free Scratch tutorials: http://www.dickbaldwin.com/tocHomeSchool.htm
Free Java/C#, etc. tutorials: http://www.dickbaldwin.com/toc.htm
Offline
Jens wrote:
dbal,
There is a (somewhat hidden) feature which might just offer what you need:
If you press and hold the shift key and left-click on the "Extras" Menu-button you will be presented with an option to "write project summary". Selecting this menu-entry will output a text-file to the Scratch directory containing, err, a summary, stats and all scripts of the current Scratch project in a pseudo-code like format. The only drawback is that you cannnot file these pseudo-code like scripts back into Scratch. But they should serve well for documentation purposes.
Another way to output scripts to text is to use my Chirp-plugin, which lets you export scripts to external text files in an XML-format, which can be edited and re-imported into any other Scratch project.
Does that help you any further?
PS: great tutorials, btw!
I haven't installed your Chirp plugin yet because I didn't want to make my installation different from the installations of those reading the tutorials. I wasn't sure if I would be able to tell which features are standard and which features derive from Chirp.
Can I have your permission to dedicate a tutorial to Chirp, giving you full credit of course? That way my readers can also install Chirp and we will have compatible systems.
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free Scratch tutorials: http://www.dickbaldwin.com/tocHomeSchool.htm
Free Java/C#, etc. tutorials: http://www.dickbaldwin.com/toc.htm
Offline
Jens wrote:
dbal,
There is a (somewhat hidden) feature which might just offer what you need:
If you press and hold the shift key and left-click on the "Extras" Menu-button you will be presented with an option to "write project summary". Selecting this menu-entry will output a text-file to the Scratch directory containing, err, a summary, stats and all scripts of the current Scratch project in a pseudo-code like format. The only drawback is that you cannnot file these pseudo-code like scripts back into Scratch. But they should serve well for documentation purposes.
Another way to output scripts to text is to use my Chirp-plugin, which lets you export scripts to external text files in an XML-format, which can be edited and re-imported into any other Scratch project.
Does that help you any further?
PS: great tutorials, btw!
I am intrigued by the idea of an XML version of each project. Just think how great it would be if every project that has been shared on the Scratch site was accompanied by an XML version. Then a Google search for a particular set of keywords describing a Scratch block would expose hundreds and possibly thousands of sample programs that successfully use that block. Also, that would make it possible for someone to develop a specialized search engine to search those projects that takes advantage of the organization of XML documents.
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free Scratch tutorials: http://www.dickbaldwin.com/tocHomeSchool.htm
Free Java/C#, etc. tutorials: http://www.dickbaldwin.com/toc.htm
Offline
Let me try to come up with some answers:
1. Exporting project summaries
I believe you have to shift-click on the Extras button to bring up the "special menu". Then you have to release the shift-key before selecting the menu item. you cannot specify a filename, the summary will be written into the directory the Scratch VM is in.
2. Where to find such "secrets"
There is a thread named "Scratch Secrets" by Scratch Team member natalie in the "Advanced Topics" forum section: http://scratch.mit.edu/forums/viewtopic.php?id=759 which reveals some pretty cool features.
3. About Chirp
Chirp is really nothing special, I just took the Scratch Source Code and added a couple of UI-features and the XML interface, so I can brag about it in the forums . Feel free to use it and share it with others. If you'd like to write a tutorial about it, you're welcome to go ahead, but I honestly don't feel there's any need for this, because its changes are only minimal to Scratch.
Installing Chirp will not harm your Scratch installation in any way (besides there's an uninstaller provided as well): I designed Chirp to be a (sort of) plugin for Scratch, i.e. the Windows-installation routine checks for Scratch to be installed, adds another Squeak image file (Chirp.remix) to the Scratch folder and some more options to the Windows shell (nothing fancy, just context menu entries). I changed the logo and the background texture of the scripts pane in Chirp, so you alway know when you're using Chirp instead of Scratch.
4. XML
My XML DOM/Parser for Scratch is currently set up to only convert single Scratch Scripts to XML-files. It's also still incomplete as far as local/global variables are concerned. I'm planning to complete it with the next release of Scratch, or whenever I'm going to incorporate my Lists/Files prototype http://www.chirp.scratchr.org/blog/?p=16 into Chirp. Converting whole Scratch projects to XML is certainly possible, but I'm currently not fascinated enough by this idea to pursue it (there are other things like lists, files, libraries etc.).
Offline
dbal wrote:
Jens wrote:
Another thing:
dbal wrote:
Producing the kinds of images referred to above is very time consuming.
Did you know that you can right-click on the background of the scripts-pane and select "save picture of scripts" from the context menu? This should make it a lot easier to export screenshots (besides, it also works for scripts wich are wider / longer than the pane).
I did not know this, and yes it will make it much easier to export screen shots.
Although there are a lot of nice videos that describe the flashy features of scratch (music, image effects, etc.), and some PDF documents that explain Scratch features at a fairly high level, I haven't found written documentation that gets down to this level. Where can I find documentation that describes features such as this one?
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free Scratch tutorials: http://www.dickbaldwin.com/tocHomeSchool.htm
Free Java/C#, etc. tutorials: http://www.dickbaldwin.com/toc.htm
Thanks for the tip on this. Once I knew what to look for, I found it in the file named ScratchReference.pdf
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free Scratch tutorials: http://www.dickbaldwin.com/tocHomeSchool.htm
Free Java/C#, etc. tutorials: http://www.dickbaldwin.com/toc.htm
Offline
Jens wrote:
Let me try to come up with some answers:
1. Exporting project summaries
I believe you have to shift-click on the Extras button to bring up the "special menu". Then you have to release the shift-key before selecting the menu item. you cannot specify a filename, the summary will be written into the directory the Scratch VM is in.
2. Where to find such "secrets"
There is a thread named "Scratch Secrets" by Scratch Team member natalie in the "Advanced Topics" forum section: http://scratch.mit.edu/forums/viewtopic.php?id=759 which reveals some pretty cool features.
3. About Chirp
Chirp is really nothing special, I just took the Scratch Source Code and added a couple of UI-features and the XML interface, so I can brag about it in the forums . Feel free to use it and share it with others. If you'd like to write a tutorial about it, you're welcome to go ahead, but I honestly don't feel there's any need for this, because its changes are only minimal to Scratch.
Installing Chirp will not harm your Scratch installation in any way (besides there's an uninstaller provided as well): I designed Chirp to be a (sort of) plugin for Scratch, i.e. the Windows-installation routine checks for Scratch to be installed, adds another Squeak image file (Chirp.remix) to the Scratch folder and some more options to the Windows shell (nothing fancy, just context menu entries). I changed the logo and the background texture of the scripts pane in Chirp, so you alway know when you're using Chirp instead of Scratch.
4. XML
My XML DOM/Parser for Scratch is currently set up to only convert single Scratch Scripts to XML-files. It's also still incomplete as far as local/global variables are concerned. I'm planning to complete it with the next release of Scratch, or whenever I'm going to incorporate my Lists/Files prototype http://www.chirp.scratchr.org/blog/?p=16 into Chirp. Converting whole Scratch projects to XML is certainly possible, but I'm currently not fascinated enough by this idea to pursue it (there are other things like lists, files, libraries etc.).
Re Summaries:
You are correct. The summary file is written in the directory where Scratch is installed. I will take a look at them. They may be useful for my purposes if I write a short program to clean up the format and put them into a format that is more akin to what text-based programmers are accustomed to seeing (line breaks, indentation, etc.)
Re Secrets:
Thanks for the URL. I will take a look at it.
Re Chirp:
Thanks. I am going to take a look at it. Among other things, I am interested in seeing what a Scratch project looks like in an XML format. However, I can't quarrel with your priorities.
Google searches
As an alternative to publishing complete XML project files on the Scratch site, having a project summary file (preferably without the history section) stored alongside along each of the shared projects would make them searchable using Google. That would also open up a vast resource of sample code to automatic search and retrieval.
Thanks again for the information,
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free Scratch tutorials: http://www.dickbaldwin.com/tocHomeSchool.htm
Free Java/C#, etc. tutorials: http://www.dickbaldwin.com/toc.htm
Offline