[scribus] Script to generate QR-codes?

Gregory Pittman gpittman at iglou.com
Tue Apr 22 16:50:26 UTC 2014


On 04/22/2014 12:14 PM, Tornóci László wrote:
> Hi,
> 
> I use scribus 1.4.3 on Fedora 20, and I am quite happy with it. I'm
> working on an ECG textbook with lots of QR codes in it. (The idea is the
> readers use their tablet to read the QR code and get to a companion
> website if they need to look up a term or want to learn more about
> something). I can generate any QR-code I want (Insert | Barcode), but it
> is a bit tedious (I need to change the default URL and color). I guess
> there's a way to write a script that offers a default URL lets me edit
> it, sets the color and produces the QR code. Problem is, I don't know
> Python and scribus scripting except they exist. Perhaps a good soul can
> help me with this...
> 

Currently there is no scripter command to create QR codes.

Some workarounds:

1. Set up a keyboard shortcut for Barcode Generator
2. Copy your base URL to the clipboard (Ctrl-C)
3. Bring up the QR code dialog, click 3 times to highlight the whole
default address. Ctrl-V to paste your saved base URL, then add any other
specifics
For the color changes you have 2 options:
4a. After you have finished all your QR codes, save the file then open
in a text editor. you will see the QR elements which have associated
colors, typically something like "FromEPS#000000" or "FromEPS#ffffff" -
black and white respectively. Do a find and replace, switching colors as
needed.
4b. Within Scribus, select Edit > Replace Colors. Switch your
FromEPS#ffffff and FromEPS#000000 to the colors you choose. You may need
to create colors first with some unique names, as desired.

So this is still a manual task but does some semi-automation along the way.

Once Scripter 2 is working we may be able to add a QR code command.

I have in the past written scripts which use the line generating
capabilities of Scribus to create barcodes. While in theory one could
also do this for QR codes, it's obviously more complex. There may be
some python scripts which do this, so you might investigate.

Greg




More information about the scribus mailing list