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

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

 



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?

Thanks,

-- 
Gabriel Krisman Bertazi
--
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