Skip to content
This repository has been archived by the owner on Jun 30, 2019. It is now read-only.

Quickly generate a HTML page from a CSV file with datatables

License

Notifications You must be signed in to change notification settings

entrepreneur-interet-general/csv2html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

csv2html

Maintenance

This repository is now maintained on https://github.com/etalab/csv2html.

The contents below is for archive purpose.

What it does?

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.

Run

~$ git clone https://github.com/entrepreneur-interet-general/csv2html
~$ cd csv2html/
~$ lein run

Then go to http://localhost:4321.

Configure

You can update parameters in config.edn or use environment variables:

EnvWhat it definesFallback value
CSV2HTML_EXPORTDIRExport directory for HTML/tmp/
CSV2HTML_PORTThe listening port4321
CSV2HTML_MAXBODYMaximum upload body size100M

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.

Install

Deploy the .jar

~$ 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.

Deploy with docker

~$ 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.

Todo

  • Allow to transpose csv tables

License

csv2html is licensed under the Eclipse Public License 1.0, the same as Clojure.

About

Quickly generate a HTML page from a CSV file with datatables

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published