View Issue Details

IDProjectCategoryView StatusLast Update
0016590ScribusScripterpublic2022-04-21 17:49
Reporterwillsonlin Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status newResolutionopen 
Product Version1.5.8.svn 
Summary0016590: add multiple duplicate feature to Scripter
DescriptionI suggest to add multiple duplicate command to scripter that would be useful sometimes,for instance,creating a series of lines or creating a grid.
TagsNo tags attached.
PatchNo

Activities

willsonlin

2022-04-21 17:36

reporter   ~0049623

I found a way to implement Multiple Duplicate by Space during the research these day, It could already done with these two methods : duplicateObject() and moveObject(),see the code below:
<code>
import scribus
def mulDup(object,copies,x_distance,y_distance):
    w,h = scribus.getSize(object)
    for i in range(0,copies):
       x_dist = 0 if x_distance ==0 else x_distance + w
       y_dist = 0 if y_distance ==0 else y_distance + h
       copy = scribus.duplicateObject(object)
       scribus.moveObject(x_dist,(i+1)*y_dist,copy)
</code>
However I prefer to implement these Multiple Duplicate methods through Scripter natively via Scripter API.It can meet our requirements while making graph papers or creating impositions.

willsonlin

2022-04-21 17:49

reporter   ~0049624

I think it would be hard to integrate these "Multiple Duplicate" methods into one Scripter function.So I suggest implement this with different functions,each function works seperately for one method.We can make multipleDuplicateBySpace() for even spacing duplication,multipleDuplicateOffset() for offset duplication,multipleDuplicateByGrid() for duplication in rows and columns.Additionally we can make multipleDuplicateByPage() for copying one or more object from one page to multiple pages or making linked text frame across pages.I can take part in development if I have enough time and enough skills.Sorry for my poor English.

Issue History

Date Modified Username Field Change
2021-06-06 15:44 willsonlin New Issue
2021-06-06 17:16 jghali Severity minor => feature
2022-04-21 17:36 willsonlin Note Added: 0049623
2022-04-21 17:49 willsonlin Note Added: 0049624