<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 6: What is the proper way to register transform settings?</title><link href="https://sourceforge.net/p/docutils/support-requests/6/" rel="alternate"/><link href="https://sourceforge.net/p/docutils/support-requests/6/feed.atom" rel="self"/><id>https://sourceforge.net/p/docutils/support-requests/6/</id><updated>2023-04-18T20:43:25.037000Z</updated><subtitle>Recent changes to 6: What is the proper way to register transform settings?</subtitle><entry><title>#6 What is the proper way to register transform settings?</title><link href="https://sourceforge.net/p/docutils/support-requests/6/?limit=25#13ba" rel="alternate"/><published>2023-04-18T20:43:25.037000Z</published><updated>2023-04-18T20:43:25.037000Z</updated><author><name>Günter Milde</name><uri>https://sourceforge.net/u/milde/</uri></author><id>https://sourceforge.net56f92ff76b8312283bdfce350f685525b8c1bf29</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The "clean" way would be a custom parser component.&lt;br/&gt;
Sub-classing &lt;code&gt;docutils.parsers.rst.Parser&lt;/code&gt; is easy, &lt;br/&gt;
specifying the custom parser to the generic &lt;code&gt;docutils&lt;/code&gt; CLI is easy, too,&lt;br/&gt;
the tricky part may be to convince Sphinx, Pelican, Nikola, etc. to use it.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>What is the proper way to register transform settings?</title><link href="https://sourceforge.net/p/docutils/support-requests/6/" rel="alternate"/><published>2021-08-23T21:27:31.621000Z</published><updated>2021-08-23T21:27:31.621000Z</updated><author><name>Clément Pit-Claudel</name><uri>https://sourceforge.net/u/createsoftware/</uri></author><id>https://sourceforge.net1e399da3fcab27d55a1e571e1d4d1f65dd599022</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have a Python package that defines custom Docutils directives and roles.  It does not need a custom reader, writer, or parser: it just uses &lt;code&gt;directives.register_directive&lt;/code&gt; or &lt;code&gt;roles.register_canonical_role&lt;/code&gt;.  Then, it runs transforms registered using &lt;code&gt;nodes.pending&lt;/code&gt; nodes.&lt;/p&gt;
&lt;p&gt;These transforms take settings.  What is the proper way to register them?  One issue I'm running into is that although custom components can declare a &lt;code&gt;settings_spec&lt;/code&gt;, transforms cannot.&lt;/p&gt;
&lt;p&gt;When I'm calling docutils myself, it's easy to use the &lt;code&gt;settings_spec&lt;/code&gt; provided by &lt;code&gt;docutils.core.publish_*&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;But when I'm calling docutils through Sphinx, Pelican, Nikola, etc, I don't have control on that parameter.  So, what is the recommended way to tell Docutils about these additional settings?  Should I override the &lt;code&gt;settings_spec&lt;/code&gt; of the default &lt;code&gt;OptionsParser&lt;/code&gt;?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>