Attributes

From Scribus Wiki
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.

Attributes are 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