Benutzer-Werkzeuge

    ~~ RM: keiner ~~ UI: ---start--- ~~ IP:3.145.17.20~~

Webseiten-Werkzeuge


Dies ist eine alte Version des Dokuments!


Syntax-Addon

Baustelle

CSV

This is a simple that will display CSV data in table form. The data can either be inline between <csv> and </csv> or be read from a file in the media area using <csv namespace:test.csv></csv>. You can also give an HTTP URL to a CSV file instead of an uploaded media file.

The <csv> tag allows for additional options to be specified as well as a file reference.

Option Description
file=<filename> where <filename> can be any <namespace:file.csv> or <http url> Default:
hdr_rows=<n> Format the first <n> rows of data from the CSV as column headers. Default: 1
hdr_cols=<n> Format the first <n> columns of each row as column headers. Default: 0
span_empty_cols=[01] Create colspans for each empty (two adjacent commas) cell following a cell with content. Default: 0
delim=<char> The delimiter used between cells. Specify tab for a tab separated file. Default: ,

Other options of the form <key>=<value> are possible but not used for displaying csv data yet.

Cells that include a comma as part of the data are expected to be contained between double quotes, which is the typical behaviour of most systems when exporting .csv files.

Empty lines in the csv file or data are displayed as horizontal separators in the table.

itemtable

<itemtable c=name,[name, ...];[options]>
.
.
.
</itemtable>
<itemtable c=Column1,Column2,Column3;fdelim=:;header=Titel-Header>

Options

OptionDescriptionFormatDefault
c=name,[name,…]Names fields of the table which are separated by a comma; The order of the colums follows the orders how the columns are listed here For legacy reasons, the c{…}=colum could be listed for each individual column individually.
fdelimField Delimeter - representing how each DW-DB field is seperated Character :
headerTable Heading - representing the line in which a table name is defined Character
twidthWidth of the HTML table integer Undefined - Dokuwiki decides
norenderOutputs the DW-tables in Dokuwiki text format Charactier Undefined

Cellinput over several lines could be enclosed by the pair <tablecell> and </tablecell>.

Note that with twidth, and norender, you must assign some sort of value, for example, norender=1.

<itemtable header=test;c=column_a;c=column_b,column_c;c=column_d;fdelim=:>

_line_a
column_a:text_a1
column_b:<tablecell>text_a2 \\ This is an example
how to fill a cell over several lines</tablecell>

_line_b
column_a:<tablecell>text_b1 \\ \\ As you can see, local DokuWiki CRLF sequences  
can be added to force a linebreak in the cell. Other formatting
elements could be used as well.
</tablecell>
column_c:text_b2 

</itemtable>

<itemtable header=test;c=column_a;c=column_b,column_c;c=column_d;fdelim=:>

_line_a column_a:text_a1 column_b:<tablecell>text_a2
This is an example how to fill a cell over several lines</tablecell>

_line_b column_a:<tablecell>text_b1

As you can see, local DokuWiki CRLF sequences can be added to force a linebreak in the cell. Other formatting elements could be used as well. </tablecell> column_c:text_b2

</itemtable>

Table Width

The plugin allows to specify width for a DokuWiki table and its columns. This is a simple extension to the original table syntax, not a full-fledged rework of the syntax.

The width has to be specified at the start of a line before the table. The first value is used as width of the table, the rest is for columns. If you want to omit some value use a dash instead. The widths can be specified in any CSS units:

|< 100% 50px - 5em 10em 10% >|
^ A  ^  B  ^  C  ^  D  ^  E  ^
| 1  |  2  |  3  |  4  |  5  |
< 100% 50px - 5em 10em 10% >
A B C D E
1 2 3 4 5


If there are more columns in the table than there are values in the width specification, the width will be applied to the columns from left to right:

|< 50em 20% >|
^ 20%              ^ 80%                          ^
| Specified width  | The rest of the table width  |
< 50em 20% >
20% 80%
Specified width The rest of the table width


amigawiki.de

Links

  • zu Nachweisquellen
  • zu Dokumentationen
  • Software-Updates
Zuletzt geändert: 2013/04/10 17:26