From InDesign To Scribus, An Automator’s Perspective – part 1 of many.

(writing in progress)

I bit the bullet – I am going to dig into Scribus, and add it to my toolkit.

Adobe is not what it used to be. The company becomes increasingly erratic and difficult to work with for a third-party developer. As far as I can tell, Adobe is ‘doing a Quark’ on a large subset of its users.

So, after ten years of neglecting it, I’m getting back up to speed on automation with QuarkXPress 2015, and I am also looking at Scribus.

I looked at Scribus a while back and did not get very far before I lost interest. As far as I could tell, Scribus was nowhere near as powerful as InDesign, so it would not be an option for many people.

This time around I decided to look mainly at what it can do, rather than concentrate on what it cannot do. Scribus will only improve if more people start using it; it’s a chicken-and-egg situation.

I want to make sure I can help automate projects where Scribus is an option. And Scribus is definitely powerful enough to be useful for a range of real-life projects.

Getting into Scribus

Getting into Scribus will be different for everyone.

I’m looking for things that I’m familiar with. As I go, I try to map things I know from other environments onto things I discover in Scribus.

I just spent half an hour with Scribus and its documentation, and as far as I can tell, the available documentation is not a good resource for the kinds of questions I have as an system designer and automator.

What I intend to do here is keep track of my questions and the answers I found.

Anyone else in the automation game is bound to have similar questions and might find my notes useful.

I’ll be using a Mac most of the time, but I’ll also take sneak peeks at the Windows and Linux versions along the way.

I’ll be looking at both Scribus 1.4.5 and Scribus 1.5.0. According to the web page, 1.4.x is a stable version, whereas 1.5.x is a development version.

1.5.x has some interesting things in its feature list, like IDML import. I’ll be trying that out!

What about scripts?

Being in automation, this is an important point for me.

Scribus can be scripted, and the ‘native’ scripting language is Python, rather than ExtendScript. That’s cool.

Ok, let’s try to do a few ‘Hello World’ scenarios and see if we learn anything.

First, I did a bit of snooping, stole some sample code left and right, and came up with the following script:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import scribus
scribus.messageBox('Python Version', sys.version, icon=scribus.ICON_NONE, button1=scribus.BUTTON_OK)

I saved this file to my desktop as, and then used the Script – Execute Script… menu item to run this script from Scribus 1.4.5 and 1.5.0.

From Scribus 1.4.5 on Mac OS X 10.11:

Screen Shot 2015-10-08 at 6.04.05 PM

From Scribus 1.5.0 on Mac OS X 10.11:

Screen Shot 2015-10-08 at 7.11.07 PM

This tells me that Scribus uses Python 2.x, and that it uses an embedded Python interpreter, rather than relying on the Python interpreter provided by the Mac OS. Otherwise I would expect the two Python interpreter versions to be identical.

On Windows 7 x64 with Scribus 1.4.5:

Screen Shot 2015-10-08 at 7.00.02 PM

And with Scribus 1.5.0:

Screen Shot 2015-10-08 at 7.13.02 PM

Looks like the Windows versions both embed the same version of Python.

It looks like I’ll need to install Ghostscript separately to enable some of the Scribus functionality relating to Postscript and EPS. I’ll look into that later.

Where are the scripts?

The second thing I want to know: where are the scripts? When you look at the Scribus Script (in 1.4.5) or Scripter (in 1.5.0) menu, it shows a whole range of sample scripts.

I’ll refer to the menu item as the Script menu item, even though it is called Scripter in 1.5.0. For example, when you see me mention a menu item Script – Show Console, it might actually be called Scripter – Show Console.

On the Mac, the scripts shown in the menu are located inside the Scribus app. On my system that’d be:


On Windows I found them here:

C:\Program Files\Scribus\share\scripts

This list of scripts shown in the menu seems to be refreshed only on restart of Scribus. If you add or modify any scripts while it’s running, the menu won’t update. This is unlike InDesign, where the Scripts Palette is dynamic and updates as scripts are added or modified.

Separate from that, there is also a configurable path to a scripts folder, which can be accessed via the Scribus – Preferences – Paths  (in 1.5.0) or Scribus – Preferences – General (in 1.4.5) menu item.

This folder can be set to something like, say,

/Users/kris/Documents/Scribus Scripts

Somewhat surprising: this folder is only used when you use the Script – Execute Script… menu item: it is the default folder location your dialog will open to.

It does not affect the list of scripts shown in the Script menu; that folder location seems to be hard-coded.

How does the console work?

For my first test, I used the scribus.messageBox function to plunk something into a dialog. However, for debugging and so on, I’d love to get some continuous text output.

My next question is: how can I write to a console from a script?

There is a console under the Script – Show Console menu item, but that was not really what I was looking for.

It took me a bit of searching, and as it turns out, the secret to the Scribus Console window seems to be function key <F9>.

Enter or copy-paste a script in the top half of the Console, then press <F9>.

Depending on how your Mac is configured you might need to change the System Preferences, or possibly press <fn>-<F9> or something like that.

Screen Shot 2015-10-09 at 2.45.53 PM

Check your System Preferences – Keyboard and System Preferences – Mission Control setup.

But that’s not really what I was after. I am looking for a way to get debugging info out from my scripts into a scrolling window.

The first method that worked for me was to start a Terminal window, and then navigate into the

Then launch Scribus from the command line. After that, I get to see any output from Python in the Terminal window.

First I launch Scribus via the Terminal:

cd /Applications/

It spits out some information:

Path = /Applications/
"scpaths: bundle at /Applications/"
"scpaths: doc dir=/Applications/"
"scpaths: icon dir=/Applications/"
"scpaths: font dir=/Applications/"
"scpaths: sample dir=/Applications/"
"scpaths: script dir=/Applications/"
"scpaths: template dir=/Applications/"
"scpaths: lib dir=/Applications/"
"scpaths: plugin dir=/Applications/"
"scpaths: QML dir=/Applications/"
"scpaths: qtplugins=/Applications/"
Fontconfig error: Cannot load default config file

Then I run a little ‘Hello World’ Python script via the Script -Execute Script… menu item.

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
print "Hello World"

That makes ‘Hello World’ appear in my terminal window.

Another way that works is to use the Python syslog. The script

import syslog
syslog.syslog(syslog.LOG_ALERT, 'Hello in syslog')

makes a log entry appear in the /var/log/system.log file.

What about the scribus module

I started Scribus from the command line as shown before, and then ran the following script:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import scribus


That made it spit out oodles of documentation in the Terminal window.

You can also simply type


into the Console window, then hit <F9>.

To come

Here’s a bunch of stuff I still want to look into:

Scribus console mode

C++ plug-ins:


Extension Scripts vs. regular scripts?

UTF-8 and stuff? How does it handle file names with non-ASCII characters? And text with non-ASCII characters?

Database publishing. Maybe tie a FileMaker and/or MySQL database to Scribus, just to try it out?

Must use Symbolic Links Instead of Alias for InDesign CC 2015 on OS X

Here’s a little tidbit. It’s not much, but it’s a little annoyance in InDesign CC 2015, and how I’m working around it.

It’s particular to my workflow. As everyone has their own preferred way to do things, and I suspect not many people have the same workflow as I do, this might be a worthless tip, but I am putting it out nevertheless, just in case. I hope this helps someone!

In previous versions of InDesign, you could add stuff to the Scripts Panel by means of a Mac OS X alias. With InDesign CC 2015, that does not work any more, and you must use a symbolic link instead.

Some more detail:

I do most of my InDesign script development with InDesign on a Mac. My workflow is often as follows:

– I have some Git repository with ‘stuff’ under development

– For InDesign scripts, I’ll have a project folder with the script under development and some other ‘subservient stuff’ – helper files, read me files, PHP scripts, XSLT files,…

– To test my script, I like to add it to the InDesign Scripts Panel, so I can run it from InDesign by double-clicking the script on the Scripts Panel.

I have this ‘habitual process’ to create a reference to my script on the Scripts Panel; I perform the following steps:

1) Start InDesign CC 2014 or earlier, and go to the Scripts Panel

2) Right-click (or Control-click) the User folder, and select Reveal in Finder. The Scripts folder opens in the Finder

3) Go find my source code folder in the Git repository

4) Drag the project folder containing the script and the helpers while holding Command+Option, and drop it inside the Scripts Panel folder.

That creates an alias which references the project folder inside the Git repository.

In InDesign CC 2014 and earlier, the alias works like ‘the real thing’: you get a disclosure triangle, etc…

(click to see larger version):
Screen Shot 2015-10-07 at 5.01.11 PM

Enter InDesign CC 2015. This approach does not work any more. Yay.

The workaround is to use a symbolic link rather than an alias.

It’s not as quick, but it works, at least for now.

Here’s my new procedure:

I often use a tool called cd to… which helps me a bit:

This tool allows you to click a button in a Finder window for a particular folder, and it automatically opens a Terminal window that has been ‘cd’-ed to that folder.

So, now my procedure is:

1) Start InDesign CC 2015, go to the Scripts Panel.

2) Right-click (or Control-click) the User folder, and select Reveal in Finder. The Scripts folder opens.

3) Go find my source code in the Git repository

4) Select the Scripts Panel folder icon in the Finder window. Then click the cd to… button, so a Terminal window opens inside the Scripts Panel folder.

5) Start typing


Now drag the script source folder from the repository and drop into the open terminal window, so it auto-types the full path for you. Then continue typing


Don’t forget the trailing period-character. The end result is the command to create a symbolic link, e.g. something like:

ln -s /Users/kris/Documents/Controlled/Rorohiko/Crawler .

Hit <Enter>.

The folder now appears on InDesign scripts panel and works as expected.

(click to see larger version):
Screen Shot 2015-10-07 at 5.24.57 PM