Thank you for taking the time. I've updated the code based on your points.
Michael On Tue, Mar 24, 2009 at 9:44 AM, Georg Brandl <[email protected]> wrote: > > Michael Jones schrieb: >> Hi, >> >> I've created a Sphinx extension for adding annotations to images. It >> allows you to associate text with areas of an image. When you mouse >> over the region of the image, the corresponding text below the image >> is highlighted. It also supports name tags directly on the regions. >> >> I setup a basic example to show the syntax and results: >> >> http://michaeljones.github.com/anode/ >> >> It should be noted: >> - It's my first extension so bear with me >> - The javascript and css is all inline which I don't like but I'm not >> sure how to make the extension include extra files for that. >> - I've only tested the results in Firefox. >> >> I've also created a webpage to help create the syntax, it's fairly >> ugly but it helps. >> >> The code is hosted on github at: >> http://github.com/michaeljones/anode >> >> I'm not sure how useful it is but it was a good learning experience. >> Any feedback or advice would be much appreciated, > > Hi Michael, > > this are my suggestions after looking at the code: > > * you could inherit the directives from sphinx.util.compat.Directive > (0.6+), so that docutils 0.4-users will be able to use them > > * instead of setting node attributes as attributes of the instance, > you should probably use the dict-style interface which I think is > the way docutils do it > > * try-except in AnnotationDirective.run: could use options.get("name") instead > > Otherwise, it looks fine. > > I have not yet thought up a way for extensions to include custom CSS/JS, > that will have to wait until another release. ;) > > Georg > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en -~----------~----~----~----~------~----~------~--~---
