I wrote (most of) a library for generating reST files a while back, and while I wouldn't say it's "finished" by any means, you might be able to get some use out of it.
It's on bitbucket here: https://bitbucket.org/khorn/rstgen On Sat, Feb 28, 2015 at 3:17 PM, gilberto dos santos alves <[email protected] > wrote: > +1 from me to [email protected] solution. > > Matthew could you post some examples for all we understand if exists some > kind of syntax on your txt files or what kind of txt files we are try to > catch. > > regards. > > 2015-02-28 12:57 GMT-03:00 Pete <[email protected]>: > > You might consider pre-processing the *.txt files to produce .rst files. >> The mapping between .txt and .rst would be your own design. >> For example, Python script can parse the .txt and output .rst files into >> the Sphinx document tree. To enable this, it may be necessary to >> modify the Makefile to ensure the pre-processing step is called. >> >> This method has been successful for documentation of the NeXus scientific >> data format, converting documentation embedded in XML files. >> >> Pete >> >> >> >> On Friday, February 27, 2015 at 1:37:59 PM UTC-6, Matthew Woehlke wrote: >>> >>> 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. >> > > > > -- > gilberto dos santos alves > +55(11)9-8646-5049 > sao paulo - sp - brasil > > > > > -- > 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. > -- -- Kevin Horn -- 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.
