[scribus] Automagically insert correct German quotation marks instead of manually inserting them?
Andreas Hünnebeck
acmh at gmx.de
Sun Aug 29 21:50:40 CEST 2010
Am Mittwoch, 25. August 2010 schrieb Christoph Schäfer:
> There exists a script called quote.py in ~/share/scribus/samples. This used to
> work with 1.2.x, but my tests showed that it doesn't work with 1.3.8+ any
> longer, and it also inserted English quotes only. Maybe one of our scripting
> gurus can update the script so that it 1) works again in current versions and
> 2) has an option to select different quotation patterns.
>
I solved step (1) for 1.3.3.14 and 1.3.8. The script is attached to this mail.
One bug was that gotoPage() was called with an illegal page number
(here: 0) because the page number in the loop was calculated wrong.
And I fixed the replacement of quotes which take more than one
character.
The german quotes take 3 characters as I had to specify them.
Maybe there is a better way to set them correctly. I just
wrote these quotes into a text frame, called getText() and
let the result print into the python console (see below),
which is my usual approach to find out how special characters
are coded.
# example code; write this into the python console:
from scribus import *
text = getText()
text
bye
Andreas
--
Andreas Hünnebeck | email: andi at huennebeck-online.de
----- privat ---- | www : http://www.huennebeck-online.de
Fax/Anrufbeantworter: +49 (32 12) 1 26 24 06
PGP-Key: http://www.huennebeck-online.de/public_keys/pgp_andreas.asc
GPG-Key: http://www.huennebeck-online.de/public_keys/andreas.asc
--
Andreas Hünnebeck | email: acmh at gmx.de
----- privat ---- | www : http://www.huennebeck-online.de
Fax/Anrufbeantworter: +49 (32 12) 1 26 24 06
PGP-Key: http://www.huennebeck-online.de/public_keys/pgp_andreas.asc
GPG-Key: http://www.huennebeck-online.de/public_keys/andreas.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: quote.py
Type: text/x-python
Size: 2362 bytes
Desc: not available
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20100829/a75620a9/attachment.py>
More information about the scribus
mailing list