[Edu-sig] Crunchy and Sphinx?
andre.roberge at gmail.com
Mon Jun 22 21:18:09 CEST 2009
On Mon, Jun 22, 2009 at 3:53 PM, Jeff Elkner<jeff at elkner.net> wrote:
> Hi André! I've spent the last month converting python educational materials
> from lore to sphinx.
> For the results, see:
This looks great!
> The only missing feature at this point (sphinx rocks!) is support for
> crunchy. Any thoughts on that? I didn't see any reference to
> reStructuredText or Sphinx on the crunchy site.
Crunchy can read either reStructuredText files (and transform them in
html files) or html files directly.
If you launch Crunchy, you can see it in action with the menu item:
Advanced Topic -> reStructuredText
Crunchy recognizes a few additional "rst directives". For example,
some cut-and-paste text from taken directly from that file:
We start by showing two simple Python code samples,
with no special directives,
one with a simulated interactive Python session,
the other without, so that Crunchy will perform
its magic based on your preferences.
>>> print "Python is great!"
Python is great!
And for the other example without a Python prompt, that
Crunchy will not know what to do with.
print "Crunchy is pretty good too!"
We now move on to using embedded directives.
The following is an example of a borg interpreter.
If you type the above text into the box, you will see
that "answer" can be defined and then printed
.. interpreter:: interpreter
>>> answer = 42
>>> print answer
If all you're using are interpreter prompts, then the Crunchy default
should work just fine, with no additional directives.
I just loaded the page
setting this site to "trusted" (from the security item on the Crunchy
menu at the top), reloaded the page, and everything worked just fine!
It looks better if you de-select the "popups" from the preferences.
I've attached a "screen capture image" so that anyone interested can
compare with the original. Note that the "style" (css) is the Crunchy
default which is different from that on the original website.
> jeff elkenr
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 49136 bytes
Desc: not available
More information about the Edu-sig