About

Welcome to Panela, Matt Harrison's take on mostly Open Source, Linux, Python, innovation in those areas, other buzzwords and Dick Proenneke. It comes complete with the illustrations as needed. Note the opinions expressed here are merely my opinions and not the opinions of my employer.

about Matt

Calendar

««Jul 2009»»
SMTWTFS
    1234
567891011
12131415161718
19202122232425
262728293031

Mailing List

My RSS Feeds








rst2odp on PYPI

posted 2008.12.08 Mon

Development on rst2odp is continuing in the Docutils sandbox. Styling/incremental support have been added. For those who don't want to mess with checking out sandbox, there's a version on pypi. For those who aren't interested in rst, but are interested in Odp/Impress and Python, included in the tarball is odplib. It is a standalone python library for generating odp content. (rst2odp is a wrapper around it).

As always, feedback is welcome. Cheers!

tags:            

links: digg this    del.icio.us    reddit




1. Pekka Klärck left...
2008.12.16 Tue 6:09 pm

This looks really interesting. Do you have documentation or examples available somewhere? I searched from version control but could find much.

http://svn.berlios.de/viewcvs/docutils/trunk/sandbox/rst2odp/


2. Matt left...
2008.12.16 Tue 10:56 pm

Pekka- Sorry for the lack of documentation. I'll try and fix that. In the meantime, most of what works for rst2s5 should work for rst2odp. (Actually if people have slides that work for s5 and not odp I'd like to know what fails)


3. Pekka Klärck left...
2008.12.17 Wed 10:45 am

Thanks for the tip on using rst2s5 docs. I installed rst2odp on my Mac only to find out that my old 2.x OOo installation doesn't work anymore. I've heard 3.0 is buggy on OSX so it's probably easier to switch to Linux. Below are few issues that I encountered during installation and when generating the first slide. How do you want issues to be reported in the future?

1) I needed to change 'import Image' in preso.py to 'from PIL import Image'. I have earlier installed PIL as explained in the link below and other apps using PIL have worked OK. Could you change the code to use 'from PIL import Image' or alternatively try both formats?

http://www.p16blog.com/p16/2008/05/appengine-installing-pil-on-os-x-1053.ht ml

2) Running 'sudo python setup.py install' failed because installation imported preso.py (through exec) which couldn't import PIL. That occurred because I have installed PIL only to me (incl. setting PYTHONPATH). Executing 'sudo env PYTHONPATH=$PYTHONPATH python setup.py install' succeeded. Is it really necessary to import application files during the installation?

3) Running 'rst2odp slides.txt slides.opd' didn't work. This usage was mentioned on rst2s5 docs and I tested that it also works with rst2s5. Running 'rst2odp slides.txt > slides.opd' succeeded without errors, but as I wrote I couldn't get OOo open to check results.


4. Matt left...
2008.12.17 Wed 10:52 am

Pekka- Thanks for your feedback. I'll fix those issues and then test on OSX for you. Try running like so 'rst2odp slides.txt slides.opd', (without redirection).


5. Pekka Klärck left...
2008.12.17 Wed 11:36 am

Got rst2odp installed on Ubuntu without problems. Here's the Subversion URL for anyone who wants to checkout it from version control: http://svn.berlios.de/svnroot/repos/docutils/trunk/sandbox/rst2odp

I was able to create simple slides but adding an image failed. Based on the original announcement (which, btw, doesn't have rst2odp tag) they should work. I used

.. figure:: foo.png

and generating slides failed with

NODE <figure><image uri="foo.png"/></figure> figure NotImplementedError: Exiting due to error. Use "--traceback" to diagnose.


6. Matt left...
2008.12.17 Wed 12:19 pm

Pekka-

'figure' isn't currently implemented, but 'image' is.


7. Matt left...
2008.12.17 Wed 6:09 pm

Another comment from Pekka that got deleted:

Thanks, image directive works. Some further problems I noticed are listed 
below.

1) list-table directive doesn't work and using it causes following error. 
Would normal tables work?

NotImplementedError: Exiting due to error. Use "--traceback" to diagnose.

1b) It would be nice to get a bit more informative error messages than just 
NotImplementedError.

2) footer directive is ignored.

3) When I include <isonum.txt> in the beginning of the file, the 
first slide is filled with all kind of weird characters (possible from that 
included file).

In general I really like this tool and will continue playing with it. I'm 
currently creating introduction slides for Robot Framework 
(http://robotframework.org) and I can use rst2s5 as a backup. 

Pekka- I made a 0.2.1 release on PyPi. If you use --traceback you'll get more information. Tables currently aren't supported. Do you want footers on all slides or just the initial? If you email me your slides, perhaps I can see what you are trying to do and make a 0.2.2 release that has some of the functionality you want. I'm also in the process of creating an example slideshow. Stay tuned.


8. Pekka Klärck left...
2008.12.18 Thu 2:03 am

I actually use rst2odp HEAD directly from svn so I don't need to wait for releases. Easier to make patches in the future if I get deeper into this.

I'd prefer footer to be on other pages than the initial similarly as with rst2s5. I'm not sure is adding the document title there by default like rst2s5 does that good idea, though. It's not so much work to add it there manually and there should anyway be a way to remove it. OOo normally has footer divided to three pieces and it might be handy to support that too, perhaps by using e.g. '|' or '::' as a separator like

.. footer:: 2008-12-18 :: Introduction to rst2opd :: |pagenumber|

Just realized that a way to get page numbers automatically would be nice too.

Footer isn't that urgent feature, though, and especially splitting it to pieces and page numbers can be implemented in the future. A feature I really need is organizing pages so that they can have an image and bullets. I need both a layout with image on right and image on bottom. I was thinking on using list-tables for the former but would be interested to hear if there are other/better options. The latter can probably be done without any special layout support.

Btw, do you have an issue tracker somewhere or are you planning to create one?


9. Matt left...
2008.12.18 Thu 6:47 am

Footer and page numbering should be really easy, just need to add a command line switch (since I don't really like them). The odplib already supports creating footers. Re: bullets, those should 'just work'. I just added a 'doc' directory to the project and it has 'intro.rst' which shows examples of most of the current features, check it out.

Re: image alignment, yes that needs help. I'm thinking have left/right/top/bottom/center alignment, and then have some size/cropping settings.

Re: issues tracker. I guess we could use the docutils sourceforge one, I'll ask about it. The end goal is to get this included merged into the docutils trunk, so I'm not really wanting to create another project. Email (private or via docutils-dev) might be a better communication method.