DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:csv

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:csv [2022-07-15 19:37] 2003:c3:cf4b:b200:b851:c54b:4ec8:305fplugin:csv [2024-02-10 21:12] (current) Aleksandr
Line 7: Line 7:
 type       : syntax type       : syntax
 lastupdate : 2022-01-03 lastupdate : 2022-01-03
-compatible : Hrun, Ponder Stibbons, Binky, Weatherwax, Adora Belle, Angua, Detritus, Greebo, Hogfather+compatible : Hrun, Ponder Stibbons, Binky, Weatherwax, Adora Belle, Angua, Detritus, Greebo, Hogfather, Igor, Jack Jackrum
 depends    :  depends    : 
 conflicts  conflicts 
Line 19: Line 19:
  
 This plugin was originally written by [[steven-danz@kc.rr.com|Steven Danz]]. The current version fixes security bugs and incorporates several patches by other contributors. This plugin was originally written by [[steven-danz@kc.rr.com|Steven Danz]]. The current version fixes security bugs and incorporates several patches by other contributors.
- 
-===== Compatibility ===== 
- 
-  * Dokuwiki version **2017-02-19 "Frusterick Manners"** 
-    * Wiki pages where the [[doku>plugin:info|Info]] plugin (bundled with DokuWiki, version 2014-10-01) is used  break with version 2022-01-03. (Synology DSM5/PHP5.5.3) ---[[user>JoeT]] 2022-07-15\\ ''Parse error: syntax error, unexpected '?' in /../../dokuwiki/lib/plugins/csv/helper.php on line 82'' 
-    * Version [[https://github.com/cosmocode/csv/archive/refs/tags/2021-02-18.zip|2021-02-18]] **works** with Frusterick Manners on a Synology DSM5/PHP5.5.3 system. 
-    * The issue was not observed on vesion 2018-04-22a "Greebo" (having the same Info plugin version, 2014-10-01) but running on a virtual machine. 
- 
  
 ===== Description ===== ===== Description =====
  
-[[http://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ http://cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]]+[[http://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ https://www.cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]]
  
 This is a simple plugin that will display CSV data in table form.  The data can either be inline between ''%%<csv>%%'' and ''%%</csv>%%''  This is a simple plugin that will display CSV data in table form.  The data can either be inline between ''%%<csv>%%'' and ''%%</csv>%%'' 
Line 52: Line 44:
 If you are planning to use csv files in the media area, you will most likely need to include the .csv file extension in [[:mime|mime.local.conf]] so you can upload .csv files. Something like this should get you started: If you are planning to use csv files in the media area, you will most likely need to include the .csv file extension in [[:mime|mime.local.conf]] so you can upload .csv files. Something like this should get you started:
 <code - mime.local.conf> <code - mime.local.conf>
-  csv     text/csv+csv     text/csv
 </code> </code>
  
 The ''%%<csv>%%'' tag allows for additional options to be specified as well as a file reference. The ''%%<csv>%%'' tag allows for additional options to be specified as well as a file reference.
  
-^ Option                                   ^ Description                                                                                                                                                                                                        ^ Default value  ^ +^ Option                                           ^ Description                                                                                                                                                                                                                               ^ Default value  ^ 
-| ''file=<filename>''                      | where ''<filename>'' can be any ''<namespace:file.csv>'' or ''<http url>''. The ''file='' prefix is optional. Any option without a name is assumed to be the file name                                             |  ''''          | +| ''file=<filename>''                              | where ''<filename>'' can be any ''<namespace:file.csv>'' or ''<http url>''. The ''file='' prefix is optional. Any option without a name is assumed to be the file name                                                                    |  ''''          | 
-| ''hdr_rows=//<n>//''                     | Format the first //<n>// rows of data from the CSV as column headers                                                                                                                                               |  ''1''         | +| ''hdr_rows=//<n>//''                             | Format the first //<n>// rows of data from the CSV as column headers                                                                                                                                                                      |  ''1''         | 
-| ''hdr_cols=//<n>//''                     | Format the first //<n>// columns of each row as column headers                                                                                                                                                     |  ''0''         | +| ''hdr_cols=//<n>//''                             | Format the first //<n>// columns of each row as column headers                                                                                                                                                                            |  ''0''         | 
-| ''span_empty_cols=//[01]//''             | Create colspans for each empty (two adjacent commas) cell following a cell with content                                                                                                                            |  ''0''         | +| ''span_empty_cols=//[01]//''                     | Create colspans for each empty (two adjacent commas) cell following a cell with content                                                                                                                                                   |  ''0''         | 
-| ''delim=//<char>//''                     | The delimiter used between cells. Specify ''tab'' for a tab separated file.                                                                                                                                        |  '',''         | +| ''delim=//<char>//''                             | The delimiter used between cells. Specify ''tab'' for a tab separated file.                                                                                                                                                               |  '',''         | 
-| ''maxlines=//<n>//''                     | limiting the result set to a certain number of rows                                                                                                                                                                |  ''0''         | +| ''maxlines=//<n>//''                             | limiting the result set to a certain number of rows                                                                                                                                                                                       |  ''0''         | 
-| ''offset=//<n>//''                       | skipping the given number of rows before output                                                                                                                                                                    |  ''0''         | +| ''offset=//<n>//''                               | skipping the given number of rows before output                                                                                                                                                                                           |  ''0''         | 
-| ''filter[//<n>//][//t//]="//<text>//"''  | Allows you to filter the rows. //<n>// is the column number you want to filter on. The first column is 1. //t// can either be an ''g'' for globbing or an ''r'' for regexp. Use simple ''*'' in the globbing mode to find partial texts.  |                |+| ''filter[//<n>//][//t//]=%%"%%//<text>//%%"%%''  | Allows you to filter the rows.\\ \\ //<n>// is the column number you want to filter on. The first column is 1.\\ \\ //t// can either be an ''g'' for globbing or an ''r'' for regexp. Use simple ''*'' in the globbing mode to find partial texts.  |                |
  
 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. 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.
plugin/csv.1657906631.txt.gz · Last modified: 2022-07-15 19:37 by 2003:c3:cf4b:b200:b851:c54b:4ec8:305f

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki