User:Alsroot/trash/Object Bundles: Difference between revisions
| Line 26: | Line 26: | ||
This feature is a first approach to unified format for all types of bundles(in 0.86 it will support only Journal entries and new library bundles). | This feature is a first approach to unified format for all types of bundles(in 0.86 it will support only Journal entries and new library bundles). | ||
Object bundle should have ''METADATA'' file in top directory of .xo bundle. | |||
=== METADATA file === | |||
This file is in [http://docs.python.org/library/configparser.html INI] format which describes how to setup bundle. | |||
Object bundle can be installed to Journal in two forms: | Object bundle can be installed to Journal in two forms: | ||
* files from bundle will be unpacked and installed as separate Journal entries, bundle itself will be removed(similar to .xoj)<br>final Journal entries can have ''activity'' field, so they are regular Journal entries that imported to Journal(w/o ''activity'' field) or created by activities(with ''activity'' field)<br>''METADATA'' should | * files from bundle will be unpacked and installed as separate Journal entries, bundle itself will be removed(similar to .xoj)<br>final Journal entries can have ''activity'' field, so they are regular Journal entries that imported to Journal(w/o ''activity'' field) or created by activities(with ''activity'' field)<br>''METADATA'' should contain ''[Entry]'' sections for each Journal entry<br>if bundle has more then one entry, sections should be parted by different suffixes e.g. ''[Entry2]'', ''[Entry.additional]'' etc. | ||
* | * bundle will be installed as a composite object i.e. as a directory of packaged to the bundle files that are represented by one Journal entry<br>final Journal entry can't have ''activity'' field<br>''METADATA'' should contain only one ''[Bundle]'' section | ||
METADATA file can have one or several sections(depends on installation method) that describe metadata fields of final entry(ies) in Journal. | |||
{| border=1 cellpadding=3 style="border: 1px solid white; border-collapse: collapse; background: #e3e4e5;" | {| border=1 cellpadding=3 style="border: 1px solid white; border-collapse: collapse; background: #e3e4e5;" | ||
| Line 66: | Line 61: | ||
|} | |} | ||
METADATA file | Any field in ''METADATA'' file can have ''_file'' suffix, in that case content of this field(substring w/o ''_file'' suffix) will be fetched from file inside of the bundle. | ||
== Benefit to Sugar == | == Benefit to Sugar == | ||