[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lojban] Re: The CLL project, technical directions



Instead of converting all the source files to reStructedText, I would consider writing a different front end for Sphinx to support the existing CLL format.

Sphinx currently parses reST into a doctree data structure (this is what I'm calling the "front end" for Sphinx) which represents the document.
This doctree object can than be given to a variety of builders to output various formats.

I had a look in the source to see how this might be done.

If my understanding of the source is correct:

- This function is key for running the front end. The Publisher object does most of the work.
  Also note the post-processing where stuff like index or gloss entries could be built.
  https://bitbucket.org/birkenfeld/sphinx/src/c0e4b2698d1e57b2ed7fa41ad82c26e80bd15926/sphinx/environment.py?at=default#cl-553

- The Publisher object this creates is in the docutils library/repository.
  http://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/docutils/core.py

- The doctree datastructure is also in docutils. These nodes could be extended if necessary.
  http://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/docutils/nodes.py

- The reStructuredText parser is part of docutils
  http://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/docutils/parsers/rst/

This reStructuredText parser is the part we would need to swap out for a whateverXMLFormatCLLSourceFilesAreIn (docbook?) parser.

I suspect this might be less work than converting all of the CLL source to reST, and I don't think reST is a good format/syntax for this.
The simplicity of reST is excellent for a basic document with headings and text - very productive, but [imo] not so good when we have so much metadata (cross-references, languages, phonetics, examples, etc.) in the markup.
(Yes, you can add directives to reST to do more; but I still don't think the syntax scales well to complicated stuff.)



On Sunday, September 14, 2014 11:30:18 PM UTC+10, Robin Powell wrote:
On Fri, Sep 12, 2014 at 11:27:35AM -0700, TR NS wrote:
>
>
> On Friday, September 12, 2014 2:11:07 PM UTC-4, Robin Powell wrote:
> >
> > On Wed, Sep 10, 2014 at 11:04:49PM -0700, TR NS wrote:
> > >
> > >
> > > On the other hand, I have worked with the git repo enough now
> > > to think that perhaps an approach that combines (enhanced)
> > > markdown as a source format with your Ruby transforms would be
> > > a good stop-gap solution (at least until these HTML/CSS print
> > > solutions mature). The markdown can take care of basic styling
> > > needs in a format that is much easier to work with, while the
> > > xhtml it produces along with pass-thru xml can be handled via
> > > the Ruby code.
> >
> > For that, though, someone (and it won't be me) has to convert
> > the source to markdown.
> >
> >
> I'd be happy to do that. I can just work on it a bit each week.
> Estimate it will take a week or two to do each chapter.

That sounds like you're talking about doing it by hand?

If so, I think you're badly underestimating how cross-reference
heavy (i.e. index and glossary entries) this book is; that's a
staggering amount of work.

More importantly, the problem with by-hand changes is that it's hard
to demonstrate that the *content* hasn't changed.  I would
definitely consider the burden of proof that the text is all the
same to be on you in that case.

--
http://intelligence.org/ :  Our last, best hope for a fantastic future.
.i ko na cpedu lo nu stidi vau loi jbopre .i dafsku lu na go'i li'u .e
lu go'i li'u .i ji'a go'i lu na'e go'i li'u .e lu go'i na'i li'u .e
lu no'e go'i li'u .e lu to'e go'i li'u .e lu lo mamta be do cu sofybakni li'u

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