[Scribus] 1.3.4 -- changes in Scripter API?
monroy-lopez
ivan
Thu Jun 14 01:14:15 CEST 2007
dear List.
We have noticed that one of our Python scripts runs into problems in
Scribus 1.3.4.
The Script was written for the most part in Gentoo running Scribus
1.3.3.3. It has also been run successfully in MacOSX 1.3.3.8 Aqua,
among others. But the script does not seem to be able to make the
jump to 1.3.4 :(
Unfortunately I have not been able to test it in 1.3.4, but from what
the other team members tell me, my suspicion is that the problems are
related to the duplicateObject() function. Has this function changed
in 1.3.4?
The script is a bit long, so I'll just paste what I think are the
relevant bits. In 1.3.4, the Script stops when the division() method
is called, namely in line 91. The self.Scribus and self.nextScribus
attributes contain Strings that refer to the names of Text Boxes.
Best wishes,
ivan
====
17 def seesPrince(self):
18 self.Scribus = 'Prince'
19 self.Species = 'Prince'
20 # self.Past = ['Prince']
21 self.Colors = ['pInitialText', 'pFinalText',
'pInitialFill',\
22 'pFinalFill']
23 self.Factor = pow((1.0/PrinceScale), 1.0/
(Pages-1))
24 self.generation = 1
25 def seesFrog(self):
26 self.Scribus = 'Frog'
27 self.Species = 'Frog'
28 # self.Past = ['Frog']
29 self.Colors = ['fInitialText', 'fFinalText',
'fInitialFill',\
30 'fFinalFill']
31 self.Factor = pow(FrogScale, 1.0/(Pages-1))
32 self.generation = 1
85 def division(self):
86 correctPosition = getPosition(self.Scribus)
87 duplicateObject(self.Scribus)
88 #we only need to create one page per iteration
89 if self.Species == 'Frog':
90 newPage(-1)
91 moveObject(0, pageSize[1], self.nextScribus())
92 gotoPage(self.generation + 1)
93 moveObjectAbs(correctPosition[0],
correctPosition[1],\
94 self.nextScribus())
95 linkTextFrames(self.Scribus, self.nextScribus
())
96 self.Scribus = self.nextScribus()
97 self.generation += 1
107 def nextScribus(self):
108 if self.Scribus == self.Species:
109 return 'Copy of ' + self.Scribus
110 else:
111 x = str(self.generation)
112 return 'Copy of ' + self.Species +\
113 ' (' + x + ')'
More information about the scribus
mailing list