On 2015-02-28 10:57, Pete wrote:
> You might consider pre-processing the *.txt files to produce .rst files.
> The mapping between .txt and .rst would be your own design.
I thought about this, but I *really* don't want to go there. For one,
I'm not sure what this wouldn't be *harder* (why try to output a
properly formatter .rst file when I can just output the docutils node
tree?). For two, I don't want to have to deal with the added build
system complexity.
I really think that just supporting additional parsers is the way to
go... and fortunately, while it does require modifying sphinx, it's
actually a fairly small and straight forward change: see
https://github.com/sphinx-doc/sphinx/pull/1747. (Mind, sphinx master is
also a lot closer to supporting this than sphinx-1.1.3-9.fc20, which
lacks support for multiple file extensions.)
The great thing about this is that it would allow using e.g. Markdown
for most of the documentation while avoiding the problem of how to
create the index... you can use reST for the index that absolutely must
have full use of reST's flexibility, and MD for things that don't.
> To enable this, it may be necessary to modify the Makefile to ensure
> the pre-processing step is called.
Ugh, who uses straight-up Make? ;-) I'm using CMake. (And Ninja. No
Makefiles for me, thank you!) Proper separation of source files and
build artifacts (which, yes, I absolutely do insist upon) is one of the
reasons preprocessing is a poor solution.
@gilberto, for various reasons I'd prefer not to post samples, but
anyway that's irrelevant. While I appreciate the offer, I don't need
help on that end. I was able to write a mostly-working parser over the
weekend. (By "mostly" I just mean that it's not done yet. It's working
for the most part but there are a few things yet that need tweaking.)
--
Matthew