Sound_Board_Test_transforms >> TBWikiToDo_transforms 

TB Wiki

Login

DocTables in split format

TBWiki includes a feature for very easy creation and editing of simple databases. These are referred to as "tables".
TBWiki includes a feature for very easy creation and editing of simple databases.  These are referred to as "tables".
{{TableOfContents}}

Table Data Formats [edit section]

= Table Data Formats =Table data is stored in regular tbwiki pages, or it can be parsed from an external source.For data in tbwiki pages, you can edit the data in a table via the normal tbwiki page editor, or using table forms.
There are several types of tables, which vary depending on their storage format: * MoinMoin - tb_type="moinmoin" * data is in a separate page (or block on a page), and is specified in MoinMoin syntax (using double vertical bars to delimit fields) * attribute files - tb_type="attr_files" * multiple files, with one table record per file * data values for the record (field values) are listed as name-value pairs * at least one attribute file must exist * attribute files can list different fields (that is, they can be sparse) * HOWEVER - every attribute file must have a 'record' field, which corresponds to 'record_id' in other places. * inline - tb_type="inline" * places the data in moin-moin format inline in the same processor block used to declare the table * parsed data files - data tb_type="parsed" * data is parsed from an external source using using the scanning information provided in a "match_spec" * this uses the data_scan module * this is currently a read-only data source (no record editing allowed) * tbwikidb files - data db_type="tbwikidb" * data is parsed from tbwiki pages specified using a source_spec * set match_spec="<tbwikidb>" * must have a a page named "<base_name>template" to use to add new pages * example: _bug_template * test data - db_type="test_data" * this is a special set of test data internal to the table.py module. It is used for testing only.
There are several types of tables, which vary depending on their storage format: * '''MoinMoin''' - tb_type="moinmoin"   * data is in a separate page (or block on a page), and is specified in MoinMoin syntax (using double vertical bars to delimit fields) * '''attribute files''' - tb_type="attr_files"   * multiple files, with one table record per file   * data values for the record (field values) are listed as name-value pairs   * at least one attribute file must exist   * attribute files can list different fields (that is, they can be sparse)     * HOWEVER - every attribute file must have a 'record' field, which corresponds to 'record_id' in other places. * '''inline''' - tb_type="inline"   * places the data in moin-moin format inline in the same processor block   used to declare the table * '''parsed data files''' - data tb_type="parsed"   * data is parsed from an external source using using the scanning information provided in a "match_spec"   * this uses the ''data_scan'' module   * this is currently a read-only data source (no record editing allowed) * '''tbwikidb files''' - data db_type="tbwikidb"   * data is parsed from tbwiki pages specified using a source_spec   * set match_spec="<tbwikidb>"   * must have a a  page named "<base_name>template" to use to add new pages      * example: _bug_template * '''test data''' - db_type="test_data"   * this is a special set of test data internal to the table.py module.   It is used for testing only.

MoinMoin Tables [edit section]

== MoinMoin Tables ==MoinMoin tables are stored in a single file.  The records are stored one per line, with the field names in the first row of the table, and the record_idsin the first column of the table.
Sample source spec: source_spec=PhoneDatabase{{{||Name||Phone||||Tim ||555-1212||||Nadine||444-2323||}}}
Sample source spec: source_spec=PhoneDatabase{{{||Name||Phone||||Tim ||555-1212||||Nadine||444-2323||}}}

Attribute files [edit section]

== Attribute files ==Attribute files are a collection of files, each containing a single record,where the fields for each record are stored as name-value pairs.
Sample source spec: source_spec=Book.*
Sample source spec: source_spec=Book.*
Any file starting with "Book" would be considered a record in the table.
Any file starting with "Book" would be considered a record in the table.
Attributes are listed in the file as name=value pairs.Values can be single-line or multi-line. Multi-line values are
Attributes are listed in the file as name=value pairs.Values can be single-line or multi-line.  Multi-line values are 
The first attribute of the record must the name: 'record', which shouldcorrespond to a unique identifier for records in this table. Internally,this is referred to as the record_id.
The first attribute of the record must the name: 'record', which shouldcorrespond to a unique identifier for records in this table.  Internally,this is referred to as the record_id.
The names in the records are NOT required to be perfectly consistent betweenrecords. That is, one record may have a 'phone' attribute, while others do not. For purposes of display and editing, the set of fields for the tables is theunion of all fields encountered in all records in the set of files in the database.
The names in the records are NOT required to be perfectly consistent betweenrecords.  That is, one record may have a 'phone' attribute, while others do not. For purposes of display and editing, the set of fields for the tables is theunion of all fields encountered in all records in the set of files in the database.

Inline Tables [edit section]

== Inline Tables ==Inline tables are stored inline on a regular tbwiki page.  They currently onlysupport moinmoin table syntax, and can be either named or unnamed.
An inline table is embedded inside a #!Table processor block,and each line of the table has fields separated by double vertical bars.
An inline table is embedded inside a #!Table processor block,and each line of the table has fields separated by double vertical bars.
Here's an example:{{{
Here's an example:{{{
{{{#!Table||Name||Job||||Tim||engineer||||Fred||pilot||}} }
}}}
}}}
Only one unnamed table may be used on a single wiki page.
Only one unnamed table may be used on a single wiki page.
Multiple named tables may be used on a wiki page.A named table uses a block with a name.
Multiple named tables may be used on a wiki page.A named table uses a block with a name.
Could not find page "DocTables"
TBWiki engine 2.0.1 by Tim Bird