]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/plugins/contrib/table___40__third-party_plugin__41__.mdwn
web commit by http://victormoral.myopenid.com/: Bug fixes in a new version
[git.ikiwiki.info.git] / doc / plugins / contrib / table___40__third-party_plugin__41__.mdwn
1 This plugin allows build html tables from data in csv (comma-separated values) or dsv (delimiter-separated values) formats.
3 It need the perl module [[cpan Text::CSV]] for the csv data. 
5 ## usage
7 In any source page include the following:
9     The next table show the results:
11     \[[table class="myclass" format=dsv data="""
12     Custom|Amount|
13     Fulanito|134,34|
14     Menganito|234,56|
15     """]]
17     This is my last acquisition:
19     [[table class="book_record" format=csv file="data/books/record1"]]
21     And the record1 page should be similar to:
23     "Title","Perl Best Practices"
24     "Author","Damian Conway"
25     "Publisher","O’Reilly"
27 The parameters are:
29 - _data_: Contains the values for the table
30 - _file_: Wiki page whom contains the data.
31 - _format_ (optional): format name of the data. By default is `auto` and the options are `csv` or `dsv`.
32 - _delimiter_ (optional): Define the character used for separated the fields. By default is the vertical barr "|" in DSV format and the comma "," for the CSV format.
33 - _class_ (optional):  CSS class for the table html element
34 - _caption_ (optional):   Text string with the table caption.
35 - _no\_header_: This switch disable the generation of table header elements. By default this switch is enabled, and the header cells come from the firts data line.
37 Obviously, the _data_ and _file_ parameters are mutually exclusive. 
39 Note: the format detection mechanism is still very rudimentary. 
41 ## Changelog
43 ### version 0.5
45 * Remove a call to a inexistent Text::CSV method.
46 * Added the sep_char parameter.
47 * Parse CVS data in binary mode.
48 * Added a format detection mechanism.
49 * Default format now is 'auto'.
51 ## Links
53 - Information about the formats in Wikipedia:
54     - [[wikipedia CSV]]
55     - [[wikipedia DSV]]
57 - Download of the tar file from <http://taquiones.net/files/misc/>
58 - Debian package in <http://taquiones.net/files/debian/>