Hi Dave,

> I had a request to add support to Sphinx so that it can generate
> documentation in ODF .odt documents.  That sounds like a good idea
> to me.  I'm willing to do some work to make it happen.

Sounds great!

> So far, I've done the following:
>
> 1. Added options specific to the odf-odt writer in the
>   QUICKSTART_CONF string in quickstart.py.
>
> 2. Created sphinx/builders/odf_odt.py
>
> 3. Created sphinx/writers/odf_odt.py -- Subclassed the Writer and
>   Translator classes in docutils/writers/odf_odt/__init__.py.
>
> 4. Added new clauses etc to the MAKEFILE string in quickstart.py.
>
> 5. Registered the builder in sphinx/builders/__init__.py
>
> Am I on the right track?

If you want to merge your builder to Sphinx, I think it right.
And you can create it as an Sphinx extension too.

> Now, I need to learn how to implement a builder.
>
> And, I have questions:
>
> 1. What other/additional files do I need to change?

How about sphinx/config.py?
I think odf builder needs some options(e.x. template name, base filename).

If you implement as an extension, registering configuration and builder are
in setup function.

And if you want to enable others people can create extension for your builder,
you have to add your own keyword parameter to sphinx.application.add_node.
(Now, there no way to add new node for third party builder).

> 2. Does anyone have any guidance?  I've read the "Writing new
>   builders" page in the Sphinx docs, but it's not particularly
>   helpful to someone like me who does not understand Sphinx
>   internals.  Is there a list of "essentially things any Sphinx
>   builder must do"?

I and my friend are implementing builders too, but I think source code
of Sphinx and docutils is the best document.

> 3. I'm trying to reverse engineer, so to speak, what is implemented
>   in builders/html.py and builders/latex.py.  Are there any other
>   places I can look for help, info, and guidance?

Our builders are hosted on Bitbucket. I think Shimizukawa's builder is
good for you, because my builder uses existing
parts(sphinx.builder.html.HTMLTranslator).

http://bitbucket.org/shibu/kindlebuilder/
http://bitbucket.org/shimizukawa/sphinxcontrib-docxbuilder

I will meet him today, so I asked him to advice to you.

.. attension::

   Kindle builder is in alpha stage. I'm testing with Kindle for
PC/Mac but they sometime freeze.
   I can't support if your Kindle device breaks.

> Thanks for any help.
>
> - Dave
>
>
>
> --
> Dave Kuhlman
> http://www.rexx.com/~dkuhlman
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sphinx-dev" group.
> To post to this group, send email to sphinx-...@googlegroups.com.
> To unsubscribe from this group, send email to 
> sphinx-dev+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sphinx-dev?hl=en.
>
>

thanks!

-- 
#! /usr/bin/python2
def shibu(shibukawa, yoshiki):
    web = "http://www.shibu.jp";
    mail = "yosh...@shibu.jp"
    twitter = "@shibukawa"
    return "smile!"

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to