[scribus] Using scribus to create PDFs from the commandline

Juraj Fedel wtxnh-scribus at yahoo.com.au
Thu Jul 31 11:56:14 UTC 2014


On Wed, Jul 30, 2014 at 01:02:38PM +0200, a.l.e wrote:
> i've browsed through your patch and i have a few comments:
> 
> - first a very simple one: don't mark your comments with a two
> letters code... while this is fine for AV, CB or other team mebers,
> in a few months nobody will know who JF is :-). (except if you plan
> to be a regular contributor: then you're welcome in the club!)
>   as a general rule, i would suggest to sign with your first name if
> it's unique for scribus and is listed in the about dialog.
>   otherwise, you should provide your firstname and name (and
> eventually email address...) or a handle wich can be tracked to you
> (as an example, kunda could use that nichkname even if it is not his
> real name!)

Understood. I could go without puting my initials there at all (I guess
it was mainly for my ego boosting anyway :)

> - staying with the "ugly hack": what should be changed in scribus to
> avoid it? how much effort is it, to make a patch to get scribus to
> currectly test if it should run (and not test for the GUI as a proxy
> for it...).

The reason I said it is _ugly_ hack becuse it need to be placed in condition
        if (app.useGUI)
        {
        ...
        }

(see main_nix.cpp). I don not understand what for useGUI is used at all.
If GUI can not be created (for some error/or whatever) the reason should
be printed to console and scribus should exit at once (without need for
testing app.useGUI in main_*.cpp files). As a matter of the fact 1.4.4
source have undocumented option --no-gui that set useGUI to false. If
you use this option all that scribus is doing is parsing the command
line and then exit. I fail to grasp meaning of this.

The reason I said it is hack is the way that scripter plugin export it
ability to run python script from CLI. It require addning a CLI option
that is related to plugin '--python-script' (no other plugin require
this AFAIK). This should be guarded by some #ifdef to be compiled only
if scripter is compiled (but scripter is compiled always I think - does
anybody use scribus without python support even when it is optional?).

As for needed changes is scribus to correctly handle app.useGUI I am in
no position to say anything. If I correctly recall you started a project
at the beginning of 2013 to extract PDF producing code out of scribus
and make it usable to convert .sla file to PDF from console. How is that
project going?

> - why is it linux only? the parts that are OS dependent should be
> marked as such (allowing other people to work on it and further
> provide patches for other OSes?)

Because I compile only on linux. Actually it can be made crossplatform
very easy by making same changes to file main_win32.cpp as are done to
main_nix.cpp.

> - what are the known limitations? i guess that it won't run from a
> real terminal (X11 needed)... and then?

Yes, X11 is indeed needed. Other than that:
- gui dialog will appear if our script contains any error (bug)
- it will work only if python script is in working directory
- as an enchancment it would be nice to be able to pass arguments to
  script

> - and of course such a patch should be against 1.5svn ... but iirc
> this issue has been already (easily) solved by william!

For now I only use 1.4.4 version.
I have only limited access to computer with broadband internet and can
not use svn client there to download current source. If it is possible
to download 1.5svn source with wget I would be glad to use that. I was
searching for this but failed to find. I would be very greatful if
somebody show me the link how to download current source without svn
client (I can use wget or web  browser to download files).

> once the limitations are clearly documented and the "ugly hack" has
> been -- if possible -- unuglified i think that we should look for
> integrating this in the trunk!

This would be great

> thanks for sharing your patch!
> a.l.e



More information about the scribus mailing list