I have some documentation for a certain project. I am currently using
sphinx to generate HTML from the marked up documentation, as it seems
like a good fit; reST is a flexible markup format, sphinx lets me link
across documents, and it's very easy to add custom processing (for
example, I've tweaked it¹ into doing inter-document resolution of
`links`_), custom roles, etc.

Now I have a problem. One chunk of the documentation has been written in
reST. Another (very large) chunk cannot feasibly be written in reST, but
is written in a project-specific format. I can generate the
documentation from the reST files just fine, but I am stuck trying to
figure out how to also process the non-reST files.

It's my understanding that this should be possible with a custom class
to translate the input file into a docutils node tree. I'm not *too*
worried about that (from writing custom directives / roles, I feel like
I have a reasonable idea how to build a node tree, and I'm similarly not
too worried about the lexical processing of the file itself... at least
I'm not (currently) asking for help with any of that). What I can't
figure out however is how to tell sphinx about this class, and how to
get it to process the files.

Can anyone shed some light on this? (Bonus points for a complete example
that causes sphinx to also process all *.txt files by turning each line
of the file into a text node.)

(¹ Not just for the convenience, either; in some places, I *really* want
to use inter-documentation links in field names, which allow `links`_
but not :roles:``.)


-- 
Matthew

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to