View Issue Details

IDProjectCategoryView StatusLast Update
0017548ScribusScripterpublic2025-05-31 15:45
Reporterale Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status newResolutionopen 
Product Version1.7.1.svn 
Summary0017548: Allow a plugin to send arbitrary arguments to another plugin
DescriptionThe Epub exporter is being implemented as a plugin (since it's an exporter...).

For testing purposes I've already added a command to the scripter that generates an Epub from the current document.

According to Jean's instructions (thanks for the help!), I need to one of the two run() commands defined in ScActionPlugin, which accepts a string argument that is mostly a file name (in my case the file name for the target Epub).

That's ok for now.
And I can currently generate a minimal Epub from the scripter.

But in the long term, we need to expand the scripter command to have more parameters.

The similar issue will also happen, with the "planned" scripter command for exporting to SVG.

According to my research (and the discussion with Jean), the only plugin that has a scripter command is the export to pdf and, for that case, an ad hoc method in the main Scribus code, that acts as a bridge between the two plugins.

So, in the worst case, we know how to solve the issue... but, maybe, we can find a better solution that does not rely on such a central node.
TagsNo tags attached.
PatchNo

Activities

ale

2025-05-31 15:45

manager   ~0052691

currently i'm using:

    const auto& instance = PluginManager::instance();
    ScPlugin* plugin = instance.getPlugin("epubexportplugin", false);
    if (plugin == nullptr)
    {
        Py_RETURN_NONE;
    }
    auto scActionPlugin = dynamic_cast<ScActionPlugin*>(plugin);
    scActionPlugin->run(ScCore->primaryMainWindow()->doc, QString::fromUtf8(filenaname.c_str()));


which, as written above, works ok.

if i try

    const auto& instance = PluginManager::instance();
    ScPlugin* plugin = instance.getPlugin("epubexportplugin", false);
    if (plugin == nullptr)
    {
        Py_RETURN_NONE;
    }
    auto scActionPlugin = dynamic_cast<EpubExportPlugin*>(plugin);
    scActionPlugin->run(ScCore->primaryMainWindow()->doc, QString::fromUtf8(filenaname.c_str()));


it compiles and links.

and it seems also to work correctly, even if i get the runtime error:

/home/ale/bin/scribus-gitlab/lib/scribus/plugins//libscriptplugin.so: undefined symbol: _ZTI16EpubExportPlugin

it's a bit as if it would use some old code somewhere...

needs more investigations...

Issue History

Date Modified Username Field Change
2025-05-31 15:30 ale New Issue
2025-05-31 15:45 ale Note Added: 0052691