Re: [PATCH 2/6] docs-rst: automatically convert Graphviz and SVG images

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

 



On Wed, Mar 01, 2017 at 12:56:36PM -0300, Gabriel Krisman Bertazi wrote:
> Daniel Vetter <daniel.vetter@xxxxxxxx> writes:
> 
> Hi Daniel,
> 
> > +    if dst_fname:
> > +        name = dst_fname[len(out_dir) + 1:]
> > +        # the builder needs not to copy one more time, so pop it if exists.
> > +        translator.builder.images.pop(img_node['uri'], None)
> > +        img_node['uri'] = dst_fname
> > +        img_node['candidates'] = {'*': dst_fname}
> > +
> > +        mkdir(path.dirname(dst_fname))
> > +
> > +        if in_ext == '.dot':
> > +            verbose('convert DOT to: {out}/' + name)
> > +            dot2format(src_fname, dst_fname)
> > +
> > +        elif in_ext == '.svg':
> > +            verbose('convert SVG to: {out}/' + name)
> > +            svg2pdf(src_fname, dst_fname)
> 
> Small nit, but, shouldn't you add dst_fname to img_node only if
> dot2format or svg2pdf was successful?

I kinda assumed they're always successful, since the media documentation
build already requires them.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux