Decisions, decisions

We had something like a meeting with Karsten and a couple of others after the FDSCo weekly meeting yesterday night. The storage format of man/info pages in the wiki has been an open question ever since I started. We made some decisions on that yesterday.

We are probably going to use DocBook XML a lot. That’s the format in which the Docs project does their work mainly. There was a GSoC project last year improving Moin’s DocBook handling but the code was never merged into mainline. If that code helps this project, I will look into merging it with my code. We’re also going to use some DocBook related tools that are already available, like doclifter that converts man source into DocBook XML.

The plan is to do “phase 1” as I call it, the publication phase, like this:

  • Take the man page sources (from CVS, repositories etc.) and run them through doclifter
  • Organize the resulting DocBook XML cleanly under separate namespaces
  • Let Moin show the XML as “normal” wiki pages to the user
  • Improve Moin’s diff feature to support diffs between different pages, not just different revisions of the same page

The same needs to be done for info page sources too, here the problem is that we would need the original Texinfo sources, not the Info sources (these are two different formats). The GNU makeinfo program already outputs DocBook XML from Texinfo, so that can be used instead of doclifter with info pages.

The plan for “phase 2” as I call it, editing and getting the edits upstream, is:

  • Switch the storage format to wiki markup, which is easy to edit
  • Generate DocBook XML from the wiki markup, probably using the code from last year’s GSoC project
  • The XML can then be transformed into “any” format that is needed (via XSLT, docbook2x etc.)

We are doing it like this because both man and info pages, but especially man pages, can be originally produced from different source formats, Perl POD and many others. So we could then write whichever translators are needed to get the wanted format out of DocBook XML. This way the solution can be extended by community members, too.

There’s one problem in this approach: how usable are the generated patches going to be? If we generate DocBook XML from wiki pages and then transform that into eg. man source, making a patch from that file against the “real” upstream man source might produce patches that also change some markup details and not only the content visible to the end user. But I guess this is a risk we’re just going to have to take. Computer generated source just may be different than that written from scratch by a human…

Comments, suggestions?


Posted

in

, ,

by

Tags:

Comments

2 responses to “Decisions, decisions”

  1. Karsten Wade avatar
    Karsten Wade

    One thought I keep forgetting to bring up is this:

    We could negotiate, through Fedora packagers, with upstream to do a one-time replace of their man/info source. We would do a patch for them that changed no content, merely passed their source through our tool and back to man source again. Like this:

    0. Upstream freezes their man/info source for a few days
    1. Obtain man/info true source from upstream
    2. Run source through our tools to generate a one-time patch so their source aligns with our tool output
    3. Submit that patch (through the package maintainer or directly) as a re-basing for future patching

    I think some upstreams are going to love the idea. Some might even want to adopt the tools to provide a Wiki editing for their own projects. This is great, because it means they *want* a re-basing, and our patching can be compatible going forward.

    Does this make sense?

  2. Ville-Pekka Vainio avatar

    It does make sense. I have even thought about maybe using DocBook as the format that users would be editing, but I took a look at yum’s man page in DocBook and I think it’s just too scary for the end user.

Leave a Reply

Your email address will not be published. Required fields are marked *