Since my last post that described briefly some features of the new Crunchy engine, I have not had much time to work on Crunchy. Johannes too has been fairly busy so that Crunchy development pretty much stopped, until the beginning of Google Summer of Code. Two students joined the Crunchy team: Edin Salković and Bryan Psimas. Unfortunately, due to other commitments, Edin was not able to continue with his SoC project - but he did manage to write the prototype of a new plugin for Crunchy that I will describe below.
There is more. For example:
- it is now possible to style <code> elements;
- Python code sample (either inside <pre> or <code>) that contain pre-existing html markup can now be handled by Crunchy without generating an error (blank page!) as before;
- it is now possible to specify a starting number different from 1 when requesting that line numbers be added to a code sample;
- when it styles the code, Crunchy now automatically detects if a given code sample represents an interpreter session or a "normal" code sample;
- it is now possible to use input() and raw_input() with an interpreter, and the result appears inside the page displayed by the browser.
Quite a few features from the "old Crunchy" need to be implemented (e.g. menus including a way to properly quit the application, translations, update:
One of the "problems" with the old Crunchy is that it did require two things from a tutorial writer:
- That the html code written be W3C compliant (with no warning, no unclosed tags, etc.).
- That Crunchy specific markup (vlam = very little additional markup) be added to instruct Crunchy to add interactive elements.
And ... Crunchy has now been written so that it automatically inserts a Python interpreter whenever it sees a bare <pre> (i.e. with nam = no additional markup). As a result, one can now browse the official Python tutorial with Crunchy and interact with it.
This automatic insertion of an interpreter sometimes yields too many interpreter inserted on a page than really needed; it is better to hand craft a tutorial. However, it should make Crunchy a lot more useful to many more people.
For those interested in trying out the "new Crunchy", an alpha release is available. If you have never used Crunchy before, you should try version 0.8.2 first and go through the tutorial from the menu.