[Scribus] Mass-export with Python file name problem
Wed Mar 7 10:00:06 CET 2007
Hi, I'm new to this list. My problem seems fairly simple, although it
might be cause by an actual bug. If that turns out to be the case, I'll
submit it into the tracker.
I have the following code injected into main() of boilerplate.py:
"""Reads all files from specified directory and exports them to PDF."""
dir = 'Z:\\directory_i_want_to_have_everything_exported_from\\'
filelist = os.listdir(dir)
for j in enumerate(filelist):
scribus.openDoc(dir + j)
# snip miscellaneous PDF attributes
scribus.PDFfile().file = dir + j[:-6] + "pdf"
print dir + j[:-6] + "pdf"
The problem is the following: The files in the dir have multiple dots in
them, instead of only for the extension. Now, that print line gives me
the correct filenames, but Scribus only includes the part before the
first dot into the filename. So if the original was
many.dots.be.here.sla.gz, I get many.pdf. Is it something I'm missing
from my code? Note that if I File -> Save as... a Scribus document that
has multiple dots in the name, the save dialog only puts the part before
the first dot into the File name field, so it might be a bug. Any
Thanks in advance,
jegHegy at IRC
PS: Feel free to lecture me on my code, I've only started dabbling with
More information about the scribus