Save all Scribus pages as EPS
Scribus is great at PDF, but Word isn’t. When I import PDFs into Word, Word converts them to bitmap graphics, which defeats the purpose of embedding PDF. Word does support EPS (as long as you’re printing to a postscript printer, such as CUPS-PDF), but Scribus can’t save pages separately to EPS files all at once like it can PDFs.
This script will go from page to page in the current Scribus document and save it as an EPS file.
[toggle code]
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- import scribus
- import os.path
- #don't do anything unless there's a document open
-
if scribus.haveDoc():
- #get the base filename to save to
- #fileDialog seems to require three unnamed arguments
- saveTo = scribus.fileDialog('Select filename to save EPS files', '*.eps *.pdf *.sla', "", issave=True)
-
if saveTo:
- #deselect, or it will only print the current selection
- scribus.deselectAll()
- pagecount = scribus.pageCount()
- basePath, ext = os.path.splitext(saveTo)
-
if not ext:
- basePath = saveTo
-
for page in range(1, pagecount+1):
- scribus.gotoPage(page)
- filepath = basePath + ' page ' + str(page) + '.eps'
- scribus.savePageAsEPS(filepath)
-
else:
- scribus.messageBox("No Open Document", "You need to have a document open to save it as EPS.")
Save this script as something like “scribus2eps.py”, and then select it from your Scribus “Scripts” menu. Whatever filename you select, the script saves as that filename and “ page x.eps”. For example, if you choose "Joe.pdf", and the current document is three pages long, the pages will be saved as “Joe page 1.eps”, “Joe page 2.eps”, and “Joe page 3.eps”.
- CUPS-PDF
- CUPS-PDF lets you print straight to PDF if your system uses CUPS (as Mac OS X does). This lets you create PDFs using all of the print dialog’s printing options, such as more than one page per sheet.
- Scribus
- Scribus is a very nice open source page layout application and includes full PDF creation. It is also scriptable using Python if you need to automate page layout tasks. Scribus is very useful for making documents that need to be shared with other editors, since anyone can get the Scribus application unrestricted.
More Python
- Parsing JSKit/Echo XML comments files
- While I’m not a big fan of remote comment systems for privacy reasons, I was willing to use JSKit as a temporary solution because they provide an easy XML dump of posted comments. This weekend, I finally moved my main blog to custom comments; here’s how I parsed JSKit’s XML file.
- Put a relative clock on your Desktop with GeekTool
- There are a lot of desktop clocks that show the absolute time. But sometimes you just want to know if the time is today, or yesterday, or two days ago. Here’s how to do it with Python and GeekTool.
- Multiple tables on the same command
- The way the “random” script currently stands, it does one table at a time. Often, however, you have more than one table you know you’re going to need. Why not use one command to rule them all?
- Easier random tables
- Rather than having to type --table and --count, why not just type the table name and an optional count number?
- Programming for Gamers: Choosing a random item
- If you can understand a roleplaying game’s rules, you can understand programming. Programming is a lot easier.
- 24 more pages with the topic Python, and other related pages

Update: issave=True doesn’t seem to have any effect in fileDialog. The button remains “open” instead of “save”, and the dialog requires choosing an existing file to determine the base name of the file. Just typing a new file name won’t cut it.