mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Heiser <markus.heiser@darmarit.de>
To: Daniel Vetter <daniel.vetter@ffwll.ch>, Jonathan Corbet <corbet@lwn.net>
Cc: Grant Likely <grant.likely@secretlab.ca>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Jani Nikula <jani.nikula@intel.com>,
	Dan Allen <dan@opendevise.io>,
	Russel Winder <russel@winder.org.uk>,
	Keith Packard <keithp@keithp.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-doc@vger.kernel.org, Hans Verkuil <hverkuil@xs4all.nl>,
	"linux-media@vger.kernel.org linux-media" 
	<linux-media@vger.kernel.org>,
	Graham Whaley <graham.whaley@linux.intel.com>
Subject: Re: Kernel docs: muddying the waters a bit
Date: Wed, 4 May 2016 11:34:08 +0200	[thread overview]
Message-ID: <54CDCFE8-45C3-41F6-9497-E02DB4184048@darmarit.de> (raw)
In-Reply-To: <CAKMK7uFPSaH7swp4F+=KhMupFa_6SSPoHMTA4tc8J7Ng1HzABQ@mail.gmail.com>

Hi all, (hi Jonathan, please take note of my offer below)

Am 03.05.2016 um 16:31 schrieb Daniel Vetter <daniel.vetter@ffwll.ch>:

> Hi all,
> 
> So sounds like moving ahead with rst/sphinx is the option that should
> allow us to address everyone's concerns eventually? Of course the
> first one won't have it all (media seems really tricky), ...

BTW: Mauro mentioned that ASCII-art tables are not diff-friendly ... 

Am 18.04.2016 um 13:16 schrieb Mauro Carvalho Chehab <mchehab@osg.samsung.com>:

> With that sense, the "List tables" format is also not good, as
> one row addition would generate several hunks (one for each column
> of the table), making harder to review the patch by just looking at
> the diff.

For this, I wrote the "flat-table" reST-directive, which adds 
missing cells automatically:

doc:    http://return42.github.io/sphkerneldoc/articles/table_concerns.html#flat-table
source: https://github.com/return42/sphkerneldoc/blob/master/doc/extensions/rstFlatTable.py

I used "flat-table" to migrate all DocBook-XML documents to reST. With this
directive, I also managed to migrate the complete media book (no more TODOs)
incl. the large tables like them from subdev-formats:

https://return42.github.io/sphkerneldoc/books/linux_tv/media/v4l/subdev-formats.html

(Rendering large tables is a general discussion which should not take place in this MT)

>  but I'd like
> to get something awesome in this area closer to mainline. I'm stalling
> on typing more fancyful gpu docs right now (with tables, pictures and
> stuff) since that would require a pile of needless work to redo when
> we switch a few times more ;-)

Are your "fancyful gpu" written from scratch, or will it be an rewrite
of the Documentation/DocBook/gpu.tmpl?

If it is the last; as starting point you can use a copy of:

https://github.com/return42/sphkerneldoc/tree/master/doc/books/gpu

but I think this will not by very helpful, as long as you miss 
a similar ".tmpl" workflow for reST documents.

I'am working on a reST directive (named: "kernel-doc") to provide a
similar ".tmpl" workflow within plain reST. The first step towards
is done with (my) modified kernel-doc script ...

* https://github.com/return42/sphkerneldoc/blob/master/scripts/kernel-doc#L1736

which produce reST from source code comments. E.g. this content is 
generated with it.

* http://return42.github.io/sphkerneldoc/linux_src_doc/index.html

> And Jani also wants to get this in, but he doesn't really want to
> spend more effort on a system that can't be merged.
> 
> So sphinx/rst y/n? Jon, is that ok with you from the doc maintainer pov?

My recommendation is to start with reST-markup if you are 
writing new docs from scratch. Workflows like the .tmpl one
can be added to the kernel build process step by step and
there is no need to drop the DocBook-XML process. Every author
should be free to decide by himself, when it is time to
migrate his DocBook sources into a reST building process.

I'am new to the kernel, my aim is to support the doc maintainer
(contact me), e.g. to migrate existing DocBooks to reST,
elaborate (build) procedures for improved reST support
within the kernel sources and to give recommendation to 
infrastructures.

@Jonathan: I know, you have no time right now. If it is OK
for you, I elaborate all these reST stuff within my POC
at github (this will take some time). Later, if you have
time, we can merge the made experience and tools to the
kernel build process .. is that okay for you?

-- Markus --


> 
> Cheers, Daniel
> 
> On Wed, Apr 27, 2016 at 4:28 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
>> On Tue, Apr 12, 2016 at 4:46 PM, Jonathan Corbet <corbet@lwn.net> wrote:
>>> On Fri, 8 Apr 2016 17:12:27 +0200
>>> Markus Heiser <markus.heiser@darmarit.de> wrote:
>>> 
>>>> motivated by this MT, I implemented a toolchain to migrate the kernel’s
>>>> DocBook XML documentation to reST markup.
>>>> 
>>>> It converts 99% of the docs well ... to gain an impression how
>>>> kernel-docs could benefit from, visit my sphkerneldoc project page
>>>> on github:
>>>> 
>>>>  http://return42.github.io/sphkerneldoc/
>>> 
>>> So I've obviously been pretty quiet on this recently.  Apologies...I've
>>> been dealing with an extended death-in-the-family experience, and there is
>>> still a fair amount of cleanup to be done.
>>> 
>>> Looking quickly at this work, it seems similar to the results I got.  But
>>> there's a lot of code there that came from somewhere?  I'd put together a
>>> fairly simple conversion using pandoc and a couple of short sed scripts;
>>> is there a reason for a more complex solution?
>>> 
>>> Thanks for looking into this, anyway; I hope to be able to focus more on
>>> it shortly.
>> 
>> Hi Jon,
>> 
>> Thanks for digging into this. FWIW, here is my $0.02. I've been
>> working on restarting the devicetree specification, and after looking
>> at both reStructuredText and Asciidoc(tor) I thought I liked the
>> Asciidoc markup better, so chose that. I then proceeded to spend weeks
>> trying to get reasonable output from the toolchain. When I got fed up
>> and gave Sphinx a try, I was up and running with reasonable PDF and
>> HTML output in a day and a half.
>> 
>> Honestly, in the end I think we could make either tool do what is
>> needed of it. However, my impression after trying to do a document
>> that needs to have nice publishable output with both tools is that
>> Sphinx is easier to work with, simpler to extend, better supported. My
>> vote is firmly behind Sphinx/reStructuredText.
>> 
>> g.
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch

  parent reply	other threads:[~2016-05-04  9:34 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-13 21:53 Jonathan Corbet
2016-02-14  0:57 ` Keith Packard
2016-02-14 12:27   ` Daniel Vetter
2016-02-14 16:27     ` Keith Packard
2016-02-17 22:14     ` Jonathan Corbet
2016-02-17 22:29       ` Daniel Vetter
2016-02-18  9:11         ` Jani Nikula
2016-02-18  9:24           ` Daniel Vetter
2016-02-18 10:26             ` Mauro Carvalho Chehab
2016-02-18 11:23               ` Jani Nikula
2016-02-18 12:04                 ` Mauro Carvalho Chehab
2016-02-18 12:07                   ` Hans Verkuil
2016-02-18 12:44                     ` Mauro Carvalho Chehab
2016-02-18 13:34                       ` Patrick Boettcher
2016-02-18 13:01             ` Jonathan Corbet
2016-02-18 14:39               ` Daniel Vetter
2016-02-16  8:25 ` Jani Nikula
2016-02-16 16:08   ` Jonathan Corbet
2016-02-16 17:11     ` Jani Nikula
2016-02-16 19:13   ` Keith Packard
2016-02-16 19:59     ` Jonathan Corbet
2016-02-17  0:01       ` Keith Packard
2016-03-03 14:03 ` Jani Nikula
2016-03-03 14:13   ` Jonathan Corbet
2016-03-03 14:34     ` One Thousand Gnomes
2016-03-03 15:17       ` Jonathan Corbet
2016-03-03 15:45         ` Daniel Vetter
2016-03-03 18:50     ` Mauro Carvalho Chehab
2016-03-03 23:23       ` Keith Packard
2016-03-04  1:19         ` Mauro Carvalho Chehab
2016-03-04  8:29           ` Jani Nikula
2016-03-04  8:59             ` Johannes Stezenbach
2016-03-04 12:59             ` Mauro Carvalho Chehab
2016-03-04 14:09               ` Johannes Stezenbach
2016-03-06  2:29                 ` Mauro Carvalho Chehab
2016-03-06 23:29                   ` Johannes Stezenbach
2016-03-07  8:48                     ` Johannes Stezenbach
2016-03-07 12:15                       ` Mauro Carvalho Chehab
2016-03-07 12:19                     ` Mauro Carvalho Chehab
2016-03-04  7:28         ` Russel Winder
2016-03-04  7:46           ` Jani Nikula
2016-03-08  4:53             ` Russel Winder
     [not found]           ` <CAKeHnO6sSV1x2xh_HgbD5ddZ8rp+SVvbdjVhczhudc9iv_-UCQ@mail.gmail.com>
2016-03-08  9:49             ` Jani Nikula
2016-03-08 11:29               ` Mauro Carvalho Chehab
     [not found]                 ` <CAKeHnO7R25knFH07+3trdi0ZotsrEE+5ZzDZXdx33+DUW=q2Ug@mail.gmail.com>
2016-03-08 13:39                   ` Mauro Carvalho Chehab
2016-03-08 15:39                     ` Mauro Carvalho Chehab
2016-03-09 21:27                       ` Mauro Carvalho Chehab
2016-03-10 10:25                         ` Jani Nikula
2016-03-10 15:21                           ` Mauro Carvalho Chehab
2016-03-13 15:33                             ` Markus Heiser
2016-04-08 15:12                               ` Markus Heiser
2016-04-12  9:18                                 ` Hans Verkuil
2016-04-12 15:46                                 ` Jonathan Corbet
2016-04-18  9:49                                   ` Markus Heiser
2016-04-27 14:28                                   ` Grant Likely
2016-05-03 14:31                                     ` Daniel Vetter
2016-05-03 15:54                                       ` Keith Packard
2016-05-04  9:34                                       ` Markus Heiser [this message]
2016-05-04  9:58                                         ` Jani Nikula
2016-05-04 12:40                                           ` Markus Heiser
2016-05-04 13:41                                             ` Jani Nikula
2016-05-04 15:09                                               ` Jonathan Corbet
2016-05-04 13:43                                             ` Daniel Vetter
2016-05-04 14:18                                               ` Daniel Vetter
2016-05-04 14:57                                                 ` Jonathan Corbet
2016-05-04 15:02                                                   ` Daniel Vetter
2016-05-04 16:32                                                     ` Daniel Vetter
2016-05-04 15:44                                                   ` Jani Nikula
2016-05-04 16:38                                                   ` Mauro Carvalho Chehab
2016-05-04 15:55                                               ` Markus Heiser
2016-05-04 16:13                                                 ` Jani Nikula
2016-05-04 16:50                                                   ` Mauro Carvalho Chehab
2016-05-04 16:59                                                     ` Jonathan Corbet
2016-05-04 17:57                                                       ` Mauro Carvalho Chehab
2016-05-05 13:02                                                         ` Jonathan Corbet
2016-05-05 13:23                                                           ` Mauro Carvalho Chehab
2016-05-06 11:23                                                   ` Markus Heiser
2016-05-06 11:44                                                     ` Markus Heiser
     [not found]                                                     ` <20160506083529.31ad2fa0@recife.lan>
     [not found]                                                       ` <BAE3C147-6C21-4242-BD3C-8989C1626E10@darmarit.de>
     [not found]                                                         ` <20160506104210.12197832@recife.lan>
2016-05-06 14:27                                                           ` Markus Heiser
2016-05-06 15:06                                                             ` Jani Nikula
2016-05-06 15:23                                                               ` Mauro Carvalho Chehab
2016-05-06 15:35                                                               ` Markus Heiser
2016-05-06 15:52                                                                 ` Jani Nikula
2016-05-06 15:14                                                             ` Mauro Carvalho Chehab
2016-05-04 16:15                                         ` Mauro Carvalho Chehab
2016-05-06 10:05                                           ` Markus Heiser
     [not found]                                             ` <20160506080304.56307066@recife.lan>
2016-05-06 16:26                                               ` Markus Heiser
2016-05-06 17:06                                                 ` Mauro Carvalho Chehab
     [not found]                                 ` <20160412105850.50e02108@recife.lan>
2016-04-18  8:10                                   ` Markus Heiser
2016-04-18 11:16                                     ` Mauro Carvalho Chehab
     [not found]               ` <CAKeHnO7_7k8Qc5Jmu_x2OzAVT4YXxW8PSe_m6QUP-8V7XxbTVw@mail.gmail.com>
2016-03-08 13:30                 ` Mauro Carvalho Chehab
2016-03-08 13:58                 ` Jani Nikula
     [not found]                   ` <CAKeHnO7e5Escm0Ndm50eFX-qUXf7Lg9n=iXvwUGjz2M4KHLMsQ@mail.gmail.com>
2016-03-09  8:57                     ` Jani Nikula
2016-03-07  3:48   ` Jonathan Corbet

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=54CDCFE8-45C3-41F6-9497-E02DB4184048@darmarit.de \
    --to=markus.heiser@darmarit.de \
    --cc=corbet@lwn.net \
    --cc=dan@opendevise.io \
    --cc=daniel.vetter@ffwll.ch \
    --cc=graham.whaley@linux.intel.com \
    --cc=grant.likely@secretlab.ca \
    --cc=hverkuil@xs4all.nl \
    --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=mchehab@osg.samsung.com \
    --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

all inboxes | Powered by JetHome®