Re: [PATCH] [PATCH v6] docs-rst: automatically convert Graphviz and SVG images

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

 



Em Tue, 7 Mar 2017 15:19:45 +0100
Daniel Vetter <daniel@xxxxxxxx> escreveu:

> On Mon, Mar 06, 2017 at 02:09:27PM +0100, Markus Heiser wrote:
> > This patch brings scalable figure, image handling and a concept to
> > embed *render* markups:
> > 
> > * DOT (http://www.graphviz.org)
> > * SVG
> > 
> > For image handling use the 'image' replacement::
> > 
> >     .. kernel-image::  svg_image.svg
> >        :alt:    simple SVG image
> > 
> > For figure handling use the 'figure' replacement::
> > 
> >     .. kernel-figure::  svg_image.svg
> >        :alt:    simple SVG image
> > 
> >        SVG image example
> > 
> > Embed *render* markups (or languages) like Graphviz's **DOT** is
> > provided by the *render* directive.::
> > 
> >   .. kernel-render:: DOT
> >      :alt: foobar digraph
> >      :caption: Embedded **DOT** (Graphviz) code.
> > 
> >      digraph foo {
> >       "bar" -> "baz";
> >      }
> > 
> > The *render* directive is a concept to integrate *render* markups and
> > languages, yet supported markups:
> > 
> > * DOT: render embedded Graphviz's **DOT**
> > * SVG: render embedded Scalable Vector Graphics (**SVG**)
> > 
> > v2: s/DOC/DOT/ in a few places (by Daniel).
> > 
> > v3: Simplify stuff a bit (by Daniel):
> > 
> > - Remove path detection and setup/check code for that. In
> >   Documentation/media/Makefile we already simply use these tools,
> >   better to have one consolidated check if we want/need one. Also
> >   remove the convertsvg support, we require ImageMagick's convert
> >   already in the doc build, no need for a 2nd fallback.
> > 
> > - Use sphinx for depency tracking, remove hand-rolled version.
> > 
> > - Forward stderr from dot and convert, otherwise debugging issues with
> >   the diagrams is impossible.
> > 
> > v4: Only sphinx 1.4 (released in Mar 2016) has patches.Figure.
> > Implement Markus suggestion for backwards compatability with earlier
> > releases. Laurent reported this, running sphinx 1.3. Solution entirely
> > untested.
> > 
> > v5: Use an explicit version check (suggested by Laurent).
> > 
> > v6: bugfixes & code review
> > * restored some stuff which has been accidentally drop in v3
> > * simplified forwarding of stderr and using application warnings to report
> > * use relative URIs in HTML <img> (reported by Mauro [1])
> > * fixed 'WARNING: undefined label' (reported by Mauro [2])
> > 
> > [1] https://www.mail-archive.com/linux-doc@xxxxxxxxxxxxxxx/msg09828.html
> > [2] https://www.mail-archive.com/linux-doc@xxxxxxxxxxxxxxx/msg09821.html
> > 
> > Cc: Jonathan Corbet <corbet@xxxxxxx>
> > Cc: linux-doc@xxxxxxxxxxxxxxx
> > Cc: Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>
> > Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx>
> > Cc: Markus Heiser <markus.heiser@xxxxxxxxxxx>
> > Cc: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> > 
> > Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx> (v2 - v5)
> > Signed-off-by: Markus Heiser <markus.heiser@xxxxxxxxxxx> (v1, v6)  
> 
> I've thrown this version at my patch series for drm docs, and it seems to
> work. Since I've clearly demonstrated that I shouldn't touch nor review
> python code, I'm not going to emberass myself with a review attempt :-)
> 
> But it seems to work, and I want it:
> 
> Tested-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> Acked-by: Daniel Vetter <daniel.vetter@xxxxxxxx>

Checked building both HTML and PDF documentation from the media
books, with Sphinx 1.4.9, after applying my patch:
	docs-rst: Don't use explicit Makefile rules to build SVG and DOT files
	https://patchwork.linuxtv.org/patch/39723/

and all looked sane to me. I won't review the Python source code, as
there people out there a way more capable than me to review such code.

So,

Tested-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx>
Acked-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx>

Jon,

When you apply it on your tree, could you please also pick this
one:
	https://patchwork.linuxtv.org/patch/39723/

As it is a pure Makefile patch, it should not affect any other
patch at the media tree. So, IMHO, it is better to have both patches
flowing together via the same tree.


Thanks,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux