linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Russel Winder <russel@winder.org.uk>
Cc: Jonathan Corbet <corbet@lwn.net>,
	linux-media@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	linux-doc@vger.kernel.org, Daniel Vetter <daniel.vetter@ffwll.ch>,
	Jani Nikula <jani.nikula@intel.com>,
	Keith Packard <keithp@keithp.com>,
	Graham Whaley <graham.whaley@linux.intel.com>
Subject: Re: V4L docs and docbook
Date: Thu, 18 Feb 2016 07:28:06 -0200	[thread overview]
Message-ID: <20160218072806.04484884@recife.lan> (raw)
In-Reply-To: <20160218071014.61fb3d18@recife.lan>

Em Thu, 18 Feb 2016 07:10:14 -0200
Mauro Carvalho Chehab <mchehab@infradead.org> escreveu:

> Em Thu, 18 Feb 2016 06:31:14 -0200
> Mauro Carvalho Chehab <mchehab@infradead.org> escreveu:
> 
> > Em Thu, 18 Feb 2016 08:17:00 +0000
> > Russel Winder <russel@winder.org.uk> escreveu:
> >   
> > > On Wed, 2016-02-17 at 21:51 -0200, Mauro Carvalho Chehab wrote:    
> > > > […]
> > > > 
> > > > We have 2 types of documentation for the Kernel part of the
> > > > subsystem,
> > > > Both using DocBook:
> > > > - The uAPI documentation:
> > > > 	https://linuxtv.org/downloads/v4l-dvb-apis
> > > > - The kAPI documentation:
> > > > 	https://linuxtv.org/downloads/v4l-dvb-internals/device-drivers/
> > > > mediadev.html      
> > > […]
> > > 
> > > I may not be introducing new data here but…
> > > 
> > > Whilst ReStructuredText and Markdown are fairly popular text markup
> > > languages, they are not related to the DocBook/XML toolchain.
> > > 
> > > Many people, especially authors of books etc. are not really willing to
> > > write in DocBook/XML even though it is the re-purposable representation
> > > of choice for most of the major publishers. This led to ASCIIDoc.
> > > 
> > > ASCIIDoc is a plain text markup language in the same way
> > > ReStructuredText and Markdown are, but it's intention was always to be
> > > a lightweight front end to DocBook/XML so as to allow authors to write
> > > in a nice markup language but work with the DocBook/XML toolchain.
> > > 
> > > ASCIIDoc has gained quite a strong following. So much so that it now
> > > has a life of its own separate from the DocBook/XML tool chain. There
> > > is ASCIIDoctor which generates PDF, HTML,… from the source without
> > > using DocBook/XML, yet the source can quite happily go through a
> > > DocBook/XML toolchain as well.
> > > 
> > > Many of the open source projects I am involved with are now using
> > > ASCIIDoctor as the documentation form. This has increased the number of
> > > non-main-contributor contributions via pull requests. It is so much
> > > easier to work with ASCIIDoc(tor) source than DocBook/XML source.     
> > 
> > Are there any tools that would convert from DocBook to ASCIIDoc?  
> 
> Answering myself:
> 
> I found one tool at:
> 	https://github.com/oreillymedia/docbook2asciidoc
> 
> That seemed to work. I ran it with:
> 	$ make DOCBOOKS=media_api.xml htmldocs 2>&1 | grep -v "element.*: validity error : ID .* already defined"
> 	$ xmllint --noent --postvalid "$PWD/Documentation/DocBook/media_api.xml" >/tmp/x.xml 2>/dev/null
> 	$ java -jar saxon9he.jar -s /tmp/x.xml -o book.asciidoc d2a_docbook.xsl chunk-output=true
> 
> And it produced a series of documents, that I stored at:
> 	https://mchehab.fedorapeople.org/media-kabi-docs-test/
> 
> I noticed, however, that it kept some things using DocBook xml. Perhaps
> because some things cannot be translated to markup (see appa.asciidoc)?
> 
> Also, converting them to HTML produced me some errors, but perhaps because
> I don't know what I'm doing ;)
> 
> What I did was:
> 	for i in book-docinfo.xml *.asciidoc; do asciidoc $i; done
> 
> errors enclosed.

Stupid me: it should be just:
	asciidoc book.asciidoc

Still, there are lots of broken things there, and lots of errors when
building it:
	https://mchehab.fedorapeople.org/media-kabi-docs-test/book.html

Ok, I would expect the need to handling some things manually, but
it worries that it broke the tables. For example, see
"Table 1. Control IDs" at https://mchehab.fedorapeople.org/media-kabi-docs-test/book.html

It was mapped as a 3 cols table, but this is how it should be,
instead:
	https://linuxtv.org/downloads/v4l-dvb-apis/control.html
	
As this table has actually 5 cols, because some controls have a list
of multiple values (see V4L2_CID_COLORFX for example).
-- 
Thanks,
Mauro

  reply	other threads:[~2016-02-18  9:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17 21:52 V4L docs and docbook Jonathan Corbet
2016-02-17 23:51 ` Mauro Carvalho Chehab
2016-02-18  8:17   ` Russel Winder
2016-02-18  8:31     ` Mauro Carvalho Chehab
2016-02-18  9:10       ` Mauro Carvalho Chehab
2016-02-18  9:28         ` Mauro Carvalho Chehab [this message]
2016-02-19  8:28           ` Russel Winder
2016-02-19 12:34             ` Mauro Carvalho Chehab
2016-02-18  9:37       ` Jani Nikula
2016-02-18 10:03         ` Mauro Carvalho Chehab
2016-02-18  9:33     ` Jani Nikula
2016-02-18  6:53 ` Hans Verkuil
2016-02-18 10:19   ` Jani Nikula
2016-02-18 10:51     ` Hans Verkuil
2016-02-19  5:00       ` Keith Packard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160218072806.04484884@recife.lan \
    --to=mchehab@osg.samsung.com \
    --cc=corbet@lwn.net \
    --cc=daniel.vetter@ffwll.ch \
    --cc=graham.whaley@linux.intel.com \
    --cc=jani.nikula@intel.com \
    --cc=keithp@keithp.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=russel@winder.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).