add inkscape:page to element migrator

This commit is contained in:
Mario Voigt 2023-10-20 00:40:31 +02:00
parent 04f3a14413
commit 37e0135daa
2 changed files with 3 additions and 0 deletions

View File

@ -50,6 +50,7 @@
<param name="mask" type="bool" gui-text="mask">true</param> <param name="mask" type="bool" gui-text="mask">true</param>
<param name="marker" type="bool" gui-text="marker">true</param> <param name="marker" type="bool" gui-text="marker">true</param>
<param name="metadata" type="bool" gui-text="metadata">true</param> <param name="metadata" type="bool" gui-text="metadata">true</param>
<param name="page" type="bool" gui-text="inkscape:page">true</param>
</vbox> </vbox>
<spacer/> <spacer/>
<vbox> <vbox>

View File

@ -73,6 +73,7 @@ class UngrouperAndElementMigratorFilter(inkex.EffectExtension):
pars.add_argument("--pattern", type=inkex.Boolean, default=True) pars.add_argument("--pattern", type=inkex.Boolean, default=True)
pars.add_argument("--rdfRDF", type=inkex.Boolean, default=True) pars.add_argument("--rdfRDF", type=inkex.Boolean, default=True)
pars.add_argument("--ccWork", type=inkex.Boolean, default=True) pars.add_argument("--ccWork", type=inkex.Boolean, default=True)
pars.add_argument("--page", type=inkex.Boolean, default=True)
def effect(self): def effect(self):
@ -110,6 +111,7 @@ class UngrouperAndElementMigratorFilter(inkex.EffectExtension):
namespace.append("{http://www.w3.org/2000/svg}flowPara") if self.options.flowPara else "" namespace.append("{http://www.w3.org/2000/svg}flowPara") if self.options.flowPara else ""
namespace.append("{http://www.w3.org/2000/svg}marker") if self.options.marker else "" namespace.append("{http://www.w3.org/2000/svg}marker") if self.options.marker else ""
namespace.append("{http://www.w3.org/2000/svg}pattern") if self.options.pattern else "" namespace.append("{http://www.w3.org/2000/svg}pattern") if self.options.pattern else ""
namespace.append("{http://www.inkscape.org/namespaces/inkscape}page") if self.options.page else ""
namespace.append("{http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd}guide") if self.options.guide else "" namespace.append("{http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd}guide") if self.options.guide else ""
namespace.append("{http://www.w3.org/1999/02/22-rdf-syntax-ns#}RDF") if self.options.rdfRDF else "" namespace.append("{http://www.w3.org/1999/02/22-rdf-syntax-ns#}RDF") if self.options.rdfRDF else ""
namespace.append("{http://creativecommons.org/ns#}Work") if self.options.ccWork else "" namespace.append("{http://creativecommons.org/ns#}Work") if self.options.ccWork else ""