Richard Jones' Log: Bruce ReST progress

Sat, 17 May 2008

Bruce, the Presentation Tool is getting incrementally better. It's a nice little hobby project because there's always just a little more that could be done, and never a huge task at any given step. Thus I can do a little each time when I'm on the train (30 minutes of hacking on my EEE PC).

ReStructuredText is now the only input format - the old "Socrates"-based implementation is gone. Everything that it could do in terms of formatting may now be done in ReST - and more.

Some of the stuff I mentioned in my last post has been resolved - though it's not final I'm definitely leaning towards staying with directives as they give me more, and Bruce will be able to be more intelligent at producing HTML than the generic html4css2 writer (when dealing with Bruce presentations). Title-less pages are there, so are video pages. Titles are incorporated into the page decoration, allowing some nice tricks. Enumerated list generation handles more styles.

Next up I'll be looking at reintroducing the python interpreter and python code page types - but in the New Bruce they're actually just page elements that may form part of any page.

ps. for the people who asked to see it in action - grab the SVN and run something like "python -m bruce examples/example.rst" or any of the .rst in the examples directory. Bruce is being developed against the pyglet SVN HEAD though (it might work against 1.1, I'm not sure)

Comment by Doug Napoleone on Sat, 17 May 2008

python -m bruce examples/example.rst
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/", line 95, in run_module
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/", line 52, in _run_module_code
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/", line 32, in _run_code
  File "/Users/pyconuser/bruce-tpt/bruce/", line 10, in 
    from bruce import rst_parser
  File "bruce/", line 10, in 
    from bruce import rst_parser
  File "bruce/", line 9, in 
    from pyglet.text.formats import structured
ImportError: No module named text.formats

Comment by Richard on Sun, 18 May 2008

Ah. Bruce is currently being developed against pyglet SVN - it might work against the latest 1.1 release, but I've not tested that.