<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><br><br><div>> Date: Wed, 30 Jul 2014 13:02:38 +0200<br>> From: ale.comp_06@xox.ch<br>> To: scribus@lists.scribus.net<br>> Subject: Re: [scribus] Using scribus to create PDFs from the commandline<br>> <br>> hi juraj<br>> <br>> thanks for sharing this!<br>> <br>> it's possible that i've already tried your patch but failed to compile it...<br>> <br>> i've tried a few of them, and none did compile at the time i've tried them.<br>> <br>> <br>> i've browsed through your patch and i have a few comments:<br>> <br>> - first a very simple one: don't mark your comments with a two letters <br>> code... while this is fine for AV, CB or other team mebers, in a few <br>> months nobody will know who JF is :-). (except if you plan to be a <br>> regular contributor: then you're welcome in the club!)<br>>    as a general rule, i would suggest to sign with your first name if <br>> it's unique for scribus and is listed in the about dialog.<br>>    otherwise, you should provide your firstname and name (and eventually <br>> email address...) or a handle wich can be tracked to you (as an example, <br>> kunda could use that nichkname even if it is not his real name!)<br>> <br>> - staying with the "ugly hack": what should be changed in scribus to <br>> avoid it? how much effort is it, to make a patch to get scribus to <br>> currectly test if it should run (and not test for the GUI as a proxy for <br>> it...).<br>> <br>> - why is it linux only? the parts that are OS dependent should be marked <br>> as such (allowing other people to work on it and further provide patches <br>> for other OSes?)<br>> <br>> - what are the known limitations? i guess that it won't run from a real <br>> terminal (X11 needed)... and then?<br>> <br>> - and of course such a patch should be against 1.5svn ... but iirc this <br>> issue has been already (easily) solved by william!<br>> <br>> once the limitations are clearly documented and the "ugly hack" has been <br>> -- if possible -- unuglified i think that we should look for integrating <br>> this in the trunk!<br>> <br>> thanks for sharing your patch!<br>> a.l.e</div><div><br></div><div>I have posted a version of Juraj's patch that works against 1.5.0svn.</div><div><br></div><div>I only had to apply one part by hand, and I changed "pythonScript = QFile::decodeName(argv()[i + 1]);" to "pythonScript = QFile::decodeName(args[i + 1].toLocal8Bit());".</div><div><br></div><div><a href="http://bugs.scribus.net/view.php?id=12572" target="_blank">http://bugs.scribus.net/view.php?id=12572</a></div><div><br></div><div>My build environment is only Linux (Fedora 20), but the patch does not seem to contain anything operating system dependent, and I suspect that Juraj was being cautious when he said Linux-only because it was never tested under Windows rather than because there is any reason that it should not work.</div><div><br></div><div>At least on Linux, it still opens a window.  The window does not need any user interaction and closes when the script finishes, so that is OK for my purposes.  I imagine that on any x11 environment, you could create a virtual desktop with vncserver and connect Scribus to the virtual desktop instead of to a physical screen.</div><div><br></div><div>I think that the "ugly" comment relates to the Scribus useGUI variable.  When running a python script, even though there is no GUI, the useGUI variable must be true, because if it is false, Scribus does not do anything.</div><div><br></div><div>The useGUI variable might be better as an enumeration of four values: no GUI because there were errors on the command line that prevent Scribus from starting, no GUI because the user specified the --no-gui command line option, non-interactive GUI because the user is running a script with --python-script, and normal interactive GUI.  Or maybe as several boolean variables like fatal error, running a python script, gui needed.</div><div><br></div><div>If Juraj does not have time to make the changes, and if you can be clear about what it would take to make the patches acceptable, I would be willing to try.</div><div><br></div><div>Regards,</div><div>William</div><div><br></div><div><br></div><div><br></div>                                           </div></body>
</html>