View Issue Details

IDProjectCategoryView StatusLast Update
0016354ScribusScripterpublic2020-11-26 00:01
Reportertanty Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version1.5.6 
Target VersionFixed in Version 
Summary0016354: Using a python script in the command line, Scribus consumes the "-name" argument
DescriptionRun:

"
$ scribus --help
Scribus, Open Source Desktop Publishing
---------------------------------------
Homepage: http://www.scribus.net
Documentation: http://docs.scribus.net
Wiki: http://wiki.scribus.net
Issues: http://bugs.scribus.net

Usage: scribus [options] [files]

Options:
     -fi, --font-info Show information on the console when fonts are being loaded
     -h, --help Print help (this message) and exit
     -l, --lang Uses xx as shortcut for a language, eg `en' or `de'
     -la, --langs-available List the currently installed interface languages
     -ns, --no-splash Do not show the splashscreen on startup
     -nns, --never-splash Stop showing the splashscreen on startup. Writes an empty file called .neversplash in ~/.config/scribus
     -pr, --prefs <path> Use path for user given preferences location
     -pi, --profile-info Show location of ICC profile information on console while starting
     -u, --upgradecheck Download a file from the Scribus website and show the latest available version
     -v, --version Output version information and exit
     -py, --python-script <script> [arguments ...] Run script in Python [with optional arguments]. This option must be last option used
     -g, --no-gui Do not start GUI
     -- Explicit end of command line options
"

Therefore, "-name" is not a listed argument and any argument passed after the "-py" argument should be passed to the python script.

However, "-name" is not passed to the script:
Steps To ReproduceIf we run the attached script:

"
$ ls
export_to_image.py testdoc.sla
$ scribus testdoc.sla -ns -g -py export_to_image.py -type 'PNG' -quality 100 -transparentBkgnd 1 -name 'test.png' -scale 100 -dpi 96
['export_to_image.py', '-type', 'PNG', '-quality', '100', '-transparentBkgnd', '1', '-scale', '100', '-dpi', '96']
$ ls
export_to_image.py ImageExport.png testdoc.sla
"
TagsNo tags attached.
PatchNo

Activities

tanty

2020-11-25 16:29

reporter  

export_to_image.py (1,574 bytes)

jghali

2020-11-25 17:37

administrator   ~0048491

Last edited: 2020-11-25 17:54

View 2 revisions

Unable to reproduce. The printed value is here:
['export_to_image.py', '-type', 'PNG', '-quality', '100', '-transparentBkgnd', '1', '-name', 'test.png', '-scale', '100', '-dpi', '96']
So... as expected.

tanty

2020-11-25 21:56

reporter   ~0048492

You are right, this is invalid.

I was running this with the flatpak version, like:

"
$ flatpak --user --env="QT_QPA_PLATFORM=offscreen" run net.scribus.Scribus testdoc.sla -ns -g -py export_to_image.py -type 'PNG' -quality 100 -transparentBkgnd 1 -name 'test.png' -scale 100 -dpi 96
"

And I was having this problem. However, if I run the command from within flatpak, this is not reproducible:

"
$ flatpak --user --env="QT_QPA_PLATFORM=offscreen" run --command=sh net.scribus.Scribus
$ scribus testdoc.sla -ns -g -py export_to_image.py -type 'PNG' -quality 100 -transparentBkgnd 1 -name 'test.png' -scale 100 -dpi 96
"

Hence, the problematic point here is flatpak.

jghali

2020-11-26 00:01

administrator   ~0048493

Thanks for the confirmation.

Issue History

Date Modified Username Field Change
2020-11-25 16:29 tanty New Issue
2020-11-25 16:29 tanty File Added: export_to_image.py
2020-11-25 17:37 jghali Note Added: 0048491
2020-11-25 17:54 jghali Note Edited: 0048491 View Revisions
2020-11-25 21:56 tanty Note Added: 0048492
2020-11-26 00:01 jghali Assigned To => jghali
2020-11-26 00:01 jghali Status new => resolved
2020-11-26 00:01 jghali Resolution open => no change required
2020-11-26 00:01 jghali Note Added: 0048493
2020-11-26 00:01 jghali Status resolved => closed