This repository is now maintained on https://github.com/etalab/csv2html.
The contents below is for archive purpose.
csv2html converts plain csv to datatables HTML pages.
WARNING: the application creates HTML pages and store them on disk. If you expose the application to many users, your disk will perhaps explode.
~$ git clone https://github.com/entrepreneur-interet-general/csv2html ~$ cd csv2html/ ~$ lein run
Then go to http://localhost:4321.
You can update parameters in config.edn
or use environment variables:
Env | What it defines | Fallback value |
---|---|---|
CSV2HTML_EXPORTDIR | Export directory for HTML | /tmp/ |
CSV2HTML_PORT | The listening port | 4321 |
CSV2HTML_MAXBODY | Maximum upload body size | 100M |
For example:
~$ CSV2HTML_PORT="1234" lein run
will run the application at http://localhost:1234
~$ CSV2HTML_PORT="1234" java -jar csv2html-x.x.x-standalone.jar
will do the same while running the application from a jar file.
~$ git clone https://github.com/entrepreneur-interet-general/csv2html ~$ cd csv2html/ ~$ lein uberjar
Then deploy target/uberjar/csv2html-x.x.x-standalone.jar
anywhere you
want with java -jar csv2html-x.x.x-standalone.jar
.
~$ git clone https://github.com/entrepreneur-interet-general/csv2html ~$ cd csv2html/ ~$ lein uberjar ~$ docker build -t me/csv2html .
will build the container which you can run with
~$ CSV2HTML_EXPORTDIR="/exports/" docker run -p 4321:4321 me/csv2html
Note that CSV2HTML_EXPORTDIR="/exports/"
is mandatory here, otherwise
your container will store HTML pages in /tmp/
and they will be lost.
- Allow to transpose csv tables
csv2html
is licensed under the Eclipse Public License 1.0, the
same as Clojure.