Attributes

From Scribus Wiki
Revision as of 07:57, 22 September 2021 by JLuc (talk | contribs) (")
Jump to navigation Jump to search

Some items like text-frames or image-frames have a tool for "Attributes" with Name, Type, Value, Parameter, Relationship and Relationship to as possible columns.

"Attributes" of objects is one of the most powerful features of Scribus and will enable the development of automated newsroom systems.

Attributes is a list of dictionary entries. Each entry must have those keys: Name, Type, Value, Parameter, Relationship, RelationshipTo, AutoAddTo. All values must be strings.

Scribus provides a document's attributes manager : goto File > Preferences... > Document Item Attributes.

Scribus provides a build'in way to create an automatic Table of Content, and it's possible to use attributes for user-scripted purposes.

Scripting with attributes

You can manipulate attributes with Scribus Scripter's Python commands:

  • `setObjectAttributes(attributes, ["name"])` : Sets attributes of the object "name". If "name" is not given the currently selected item is used.
  • `getObjectAttributes(["name"])` : Returns a list containing all attributes of object "name". If "name" is not given the currently selected Item is used.

Any further contribution to this page is wellcome