View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002913 | Scribus | Scripter | public | 2005-12-10 22:50 | 2017-04-04 10:17 |
Reporter | kurfuerst | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | confirmed | Resolution | open | ||
Product Version | 1.3.1 | ||||
Summary | 0002913: modify/create templates with scripter | ||||
Description | Hi, It would be really nice if template pages could be added/copied/deleted with scripter, and then modified as well. Thanks for your great work! Sebastian | ||||
Tags | No tags attached. | ||||
Patch | |||||
|
Btw, and it would be great as well to access the attributes of objects from within scripter. :-) Greets, Sebastian |
|
Internally, Scribus uses a "master page mode" to control these things. It should be possible to expose that to the scripter pretty much transparently, so that all the existing functions operate on master pages when you enter master page mode. I think. It might also be a buggy-as-hell nightmare. We shall see, as it's very easy to implement the basic mode switch. |
|
I'm not sure what you mean on the second point - "access the attributes of objects from within scripter". Do you mean the object attributes as shown in the GUI (for ToC etc) ? If so, I strongly agree - in fact they came about because I thought they were crucial for scripting. By the time support for them in the core code got put in place (thanks to Craig Bradney) I found I was a bit busy, to say the least, and I've had little time to work on the scripter. The attributes that ended up being supported are also more complex than the simple key/value pairs I initially thought should be done, and while that's useful it means more work supporting them in the scripter. It'll get done at some point. It's not hard or even that tine consuming, but it will take some time and be a bit tedious. Hey, feel like doing some very simple C++ coding? Adding scripter functions is EASY. |
|
Current 1.3.2cvs as of five minutes ago has basic master page editing support. It's not in the snapshot, only in actual CVS. It'll appear in anoncvs some time in the next 24 hours or so, whenever it next gets synce. DO NOT USE THIS ON ANYTHING BUT TEST DOCUMENTS YET. It's not quite right yet; in particular, items on master pages tend to all get moved to the most recently edited master page. It also can't yet delete master pages (the core code for that is ... er ... gross). There may be other issues; Scribus's master page support is internally still very messy and doesn't properly check to ensure that the app is in the right state to perform a given operation. The new scripter functions are: createMasterPage editMasterPage closeMasterPage masterPageNames See their docstrings (accessed with "help(function)" ) for information on their use. |
|
"I'm not sure what you mean on the second point - "access the attributes of objects from within scripter". Do you mean the object attributes as shown in the GUI (for ToC etc) ? If so, I strongly agree - in fact they came about because I thought they were crucial for scripting." Yes, I meant that. Your speed is incredible! Umm it is a long time ago since I last coded in C++, I usually code PHP... But I' ll have a look! Greets, Sebastian |
|
Hi, I just found out that the interesting part needs to be implemented in scripter/cmdgetsetprop.cpp and the interesting function can be found on * PageItem::getObjectAttributes or ObjectAttribute PageItem::getObjectAttribute ( QString ) I am confident you already know this :-) But currently I am missing too much python/C++ knowledge to code this I fear. Sorry.. Greets, Sebastian |
|
This can be closed now since masterpages can be edited with scripter and in report 0008118 attributes was addressed also. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-12-10 22:50 | kurfuerst | New Issue | |
2005-12-10 23:04 | kurfuerst | Note Added: 0007693 | |
2005-12-11 03:34 |
|
Note Added: 0007701 | |
2005-12-11 03:34 |
|
Assigned To | => ringerc |
2005-12-11 03:34 |
|
Status | new => assigned |
2005-12-11 03:38 |
|
Note Added: 0007702 | |
2005-12-11 05:47 |
|
Note Added: 0007703 | |
2005-12-11 07:20 | kurfuerst | Note Added: 0007705 | |
2005-12-11 07:57 | kurfuerst | Note Added: 0007706 | |
2006-05-13 21:20 | christoph_s | Relationship added | child of 0003813 |
2006-05-18 18:41 | christoph_s | Relationship added | related to 0003837 |
2008-03-14 06:54 |
|
Assigned To | ringerc => |
2008-03-14 06:54 |
|
Status | assigned => confirmed |
2017-04-04 10:17 | jurajF | Note Added: 0043696 |