Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

bzg/csv2html

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 2.0.

About

Dummy web interface for exposing csv as HTML datatables

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Clojure 92.2%
  • Dockerfile 7.8%