Difference between revisions of "Attributes"

From Scribus Wiki
Jump to navigation Jump to search
m (link syntax)
m (")
Line 5: Line 5:
 
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.
 
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 document's attributes manager : goto  '''File > Preferences... > Document Item Attributes'''.
  
 
Scribus provides a build'in way to [[Creating_a_Table_of_Contents|create an automatic Table of Content]], and it's possible to use attributes for user-scripted purposes.
 
Scribus provides a build'in way to [[Creating_a_Table_of_Contents|create an automatic Table of Content]], and it's possible to use attributes for user-scripted purposes.

Revision as of 07:57, 22 September 2021

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