command line to run scribus scripts.

Previous topic - Next topic

digirew

Iv been looking at the command line page https://wiki.scribus.net/canvas/Command_line_scripts

What im trying to accomplish is, while I have a document open in Scribus (GUI), is it possible to have another program tell scribus to run a script? (instead of doing it manually from the script menu?)

a.l.e

i think it should be possible by enabling extension scripts and running a script at startup that checks for commands...

i guess i should do something fancy with it one day (and first check if it does work as i think it does)

on the other side, if somebody knows how to send commands to a multiplatform Qt application i'm  willing to look at it...

digirew

a.l.e, your comment:

Quote from: a.l.e on September 22, 2020, 08:33:37 PM
i think it should be possible by enabling extension scripts and running a script at startup that checks for commands...

Maybe im not understanding correctly, but im not sure if this would even be possible? as it looks like running any of the command lines always want to start a new instance of Scribus instead of the existing copy of Scribus already opened.



a.l.e

of course it's not the same as running a new script... but i wonder how far one could go with a polling system.

for a real solution, something like d-bus will be necessary.

digirew

The command line tool appears to be a very powerful feature that allows you to do some pretty creative things using Scribus. Being able to run scripts via. command line on the active document would definitely take it to a new level of possibilities.

dragonfly

I do this quite often on a number of GUI's.  And I'm looking at Scribus also for my workflow.
But unfortunately the solution I propose depends on your OS.

It is to use automation scripts which autodrive the Scribus GUI and allows integration with a toolchain.

That is instead of (or in addition to) using Scripter to navigate the Scribus API you run macros which navigate existing hotkeys and menus in "autopilot mode".  It isn't as daft as it sounds.

I am on Ubuntu 20.04.

a.l.e

digireview: which kind of possibilities do you have in mind?

digirew

A.l.e,

Having the ability to run additional scripts while a document is already opened, we would open the door to a lot of automation and completely offload repetitive tasks that need to be done by users.

A few basic examples would be to issue a save/pdf command from our application when a user is done with a document. Our application can then handle all the remaining tasks a user needs to do with each file. Or saving a revision history of documents being working on into our applications database.

a.l.e

from a scribus point of view, that looks to me an over engineered process.

i don't know much about your workflow, but i somehow have the feeling, that having a way to start scripts by pressing a button would be a better solution.
at the end, the user might need to press not one but two buttons, one in scribus and one in a project management application, but the reduced level of magic might also reduce the fear of making errors.

this having been said, triggering other tasks while or after producing a pdf is something that should already possible with the current feature set in the development version of scribus (and probably also in the stable version).

personally, i still would love having ways to send messages to open instances of scribus, but i really don't see how this can happen in a multi plaftorm way...
if you have ideas...

(btw, the fact that you technically can have multiple instances of scribus open at the same time -- a good feature -- even with the same active open document -- less good feature -- will not help in this endeavour...)

dragonfly

@digirew

What OS platforms are you using?

Windows/Linux/Mac

digirew