Le 03/07/2016 17:04, Florian a écrit :
> Hi everyone,
>
> is there a way to "inline" replace a directive
>
> .. package-diagram::
>    <some directive options>
>
> with
>
> .. graphviz::
>
>    digraph package_diagram{
>       <dot representation of the diagram>
>    }
>
> during the build process somehow?
>
> My actual use case is to run pylint/pyreverse on a package to generate
> the dot representation of the package diagram. I use an extension
> specific directive to trigger the pylint invokation (..
> package-diagram::). After the dot code has been generated it needs to
> be considered with the graphviz directive (.. graphviz::) instead of
> the original extension directive (.. package-diagram::).
> https://github.com/fkromer/sphinxcontrib-pylint
>
> It would be great to get some support.

Hello,

I'm not sure but I think you'll have to write a directive.
http://docutils.sourceforge.net/docs/howto/rst-directives.html
This means your directive may call the original directive with
transformed arguments.
I don't think you could make your directive generate a new directive as
Restructured dœs not work directly with the text but with an
intermediary tree representation.

Hope this helps,
Alex

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to