csv-to-table icon indicating copy to clipboard operation
csv-to-table copied to clipboard

Simple KirbyCMS plugin to convert CSV files into HTML Tables

trafficstars

Kirby CSV to HTML Table converter

Version 1.0

Installation

1. Kirby CLI

If you are using the Kirby CLI, you can install this plugin by running the following commands in your shell:

$ cd path/to/kirby
$ kirby plugin:install lauriiii/csv-to-table

2. Clone or download

  • Clone or download this repository.
  • Unzip the archive if needed and rename the folder to csv-to-table.

Make sure that the plugin folder structure looks like this:

site/plugins/csv-to-table/

Usage

(table: filename.csv)

Options

1. Delimiter

The separator used in your CSV files.

Default: ;

(table: filename.csv delimiter: ,)

2. Length

Default: 0

(table: filename.csv length: 9999)

3. Class

(table: filename.csv class: test)

4. Thead

Wraps the first row of the table with thead.

Default: false

(table: filename.csv thead: true)

Config options

You can use the following settings on your config file to change the defaults.

c::set('csvtotable.default.class', '');
c::set('csvtotable.default.delimiter', ';');
c::set('csvtotable.default.length', '0');
c::set('csvtotable.default.thead', false);

License

http://www.opensource.org/licenses/mit-license.php

Author

Lauri Liimatta http://lauriliimatta.com