Recent posts

#81
Scripts and Plugins / Re: Importing modules into Pyt...
Last post by a.l.e - August 24, 2026, 06:05:08 PM
So, let's see what I can do for you.

First, in my experience scripts running inside of Scribus correctly import module that are (correctly) installed system wide.

Indeed, on my Debian Linux I have requests installed through apt and

import requests

response = requests.get('https://forums.scribus.net')
print(response.text)

runs in the Scribus console, and does return some text that is very similar to the main page of this forum.

So, if you want to easily use pyperclip in your script (But do you really need it? I believe the Scribus scripter API does have functions for copying and pasting...), you will need to properly install it properly.
I would not mix pip and your systems package manager.

Now, requests is something that I use so often, that I'm happy to have it installed on my machine (I just need not to forget to add it the requirements if I share the script...), but I'm not sure that you want install pyperclip globally or if Mint has it at all (Debian testing does have it).

Sadly, the next step is a bit steeper.

If you don't want to correctly install the package system wide, then you need a virtual environment. But it does not seem to be possible to access it, by simply activating it in a terminal and starting Scribus from the same terminal while the virtual environment is active.

But there is a way to get there.
Even if it is a bit convoluted:

  • Create your virtual environment as usual and install the package in there (I went for "python -m venv venv" and then "pip install", but other types of virtual environment might also work)
  • In your script, get a copy of the environment and remove the environment variable PYTHON_HOME, add VIRTUAL_ENV with the path to the venv, and add your venv's bin to the env copy PATH.
  • Start a subprocess that uses the copy of the environment as its env
  • Get the result of the sub process.
  • In my script, the secondary script does not access Scribus... but I don't recall, if it was not possible or I simply did not need it. Probably the first one.

Voilà.
The script is not published yet.
I think that it was not 100% finished and I got distracted by a squirrel running in front of my window...
But if you are interested in going the way I describe above, on Thursday I can try to create a sample script that shows how to do it (or publish the script that calculates the contour of an image... which is way cooler...)

Enjoy your evening!
#82
Scripts and Plugins / Re: Importing modules into Pyt...
Last post by a.l.e - August 24, 2026, 01:13:38 PM
... if you can wait, I will try to give you some insights tonight CET...
#83
Scripts and Plugins / Re: Importing modules into Pyt...
Last post by henrylaw - August 24, 2026, 01:12:08 PM
Update: I wrote a small module (in another language, to make sure I wasn't using the built-in Python interpreter) which does nothing more than read the clipboard and print it to stdout. In my scripter program I then coded

import subprocess
clip_data = subprocess.run( '/home/henry/Perl/tryout/tryout',
                            shell=False,
                            capture_output=True,
                            text=True )
scribus.messageBox( 'stdout',clip_data.stdout )

Result? "FileNotFoundError: [Errno 2] No such file or directory: '/home/henry/Perl/tryout/tryout'"

... and that file definitely does exist: I can execute it from the command line, thus:

henry@prospero:~$ /home/henry/Perl/tryout/tryout
This is data from the clipboard

I give up, frankly.  I shall have to paste my clipboard output to a file, and then within my scripter program read that file back in again.  Bah.
#84
Scripts and Plugins / Re: Importing modules into Pyt...
Last post by henrylaw - August 24, 2026, 12:42:28 PM
Update. I tried creating /usr/lib/python3.12/site-packages/pyperclip and then hard linking the files in there to their equivalents in /usr/lib/python3/dist-packages/pyperclip

Still the module is not found.
#85
Scripts and Plugins / Importing modules into Python ...
Last post by henrylaw - August 23, 2026, 05:11:51 PM
I am writing a scripter program that will take text from the clipboard, do some reformatting and then insert it into a text frame. To do this I'm trying to import 'pyperscript'.  Environment is Linux Mint 22.3

I code

  import pyperscript

... and get the message

  ModuleNotFoundError: No module named 'pyperclip'

The module is installed; I have test programs, run from the command line, that find and execute it.

Reading up, I think I understand that the python interpreter in Scribus has its own "sys.path", so I wrote a simple routine which prints that out; right enough it doesn't contain /usr/lib/python3/dist-packages, which is where "pyperclip" lives.  It does contain /usr/lib/python3.12/site-packages, so I experimented with

  sudo ln -s /usr/lib/python3/dist-packages/pyperclip /usr/lib/python3.12/site-packages/pyperclip

(and had to create /usr/lib/python3.12/site-packages in the process). But the module is still not found.

Is there a way to do what I want to do?
#86
PDF Generation / Re: Can we suppress the "Progr...
Last post by MrB - August 23, 2026, 12:36:00 PM
Note there is risk of issues with progressive images when sending PDFs to professional printers
#87
PDF Generation / Re: Can we suppress the "Progr...
Last post by MrB - August 23, 2026, 12:21:39 PM
I've fixed this in 1.7.4.svn
#88
PDF Generation / Re: Can we suppress the "Progr...
Last post by henrylaw - August 23, 2026, 10:39:09 AM
Sorry to come back on this after so long, but I've been putting up with this annoyance because of other issues.

This option "Check for images with progressive encoding" is unchecked for all preflight verifier profiles, and yet I still get the warning.
#89
Scripts and Plugins / Re: Photobook Browser – browse...
Last post by a.l.e - August 21, 2026, 08:42:12 PM
Hi,

Thanks for sharing your work!

Not sure you already found it, since it's well hidden, but Scribus already has something similar: "Extras > Picture Browser".

I have not tried (yet) your plugin but from the description, it seems to be adding a few interesting features.

Indeed, while the Picture Browser can be used for creating a photo album, your plugin is more focused on the task.
Still, since Scribus already has Manage Images and Picture Browser in Extras, I would not wish to have one more similar tool distributed by default with Scribus.
But I you feel like, you're welcome to propose patches to the Picture Browser, that give it a better ergonomics...
... and, most of all, I would welcome a marker for pictures that are already in the document and / or being able to filter out the images that are already in (or only show the images that are already in... maybe integrating both the Picture Browser and Manage Images...)
#90
Scripts and Plugins / Photobook Browser – browse, tr...
Last post by Uhrendoktor - August 21, 2026, 03:09:01 PM
Hi everyone,

I am fairly new to Scribus. I mainly wanted to use it to design a photobook without having to rely on other tools, while keeping everything open source and PDF-compatible.

Maybe something like this already exists, but I couldn't find a workflow that really worked for me. And since I'm a developer by trade, I ended up implementing what I had in mind myself.

So I've been working on a Scribus plugin for people who work with a lot of photos, especially for photobooks:

Photobook Browser is a native C++/Qt plugin that lets you:
  • browse images directly in Scribus, showing thumbnails
  • highlights which images are used/unused in the document
  • lets you search and filter in Scribus
  • and lets you drag images into the layout

GitHub:
https://github.com/Uhrendoktor/scribus-photobookbrowser



It's still fairly new, so I'd be interested in feedback, bug reports, or just hearing whether anyone else finds this kind of workflow useful.

Cheers!