@leafgard/csv2html
Easy Node.JS package & CLI for CSV to HTML conversion
Last updated a year ago by leafgard .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @leafgard/csv2html -g
SYNC missed versions from official npm registry.

csv2html

csv2html

Easy Node.JS package & CLI for CSV to HTML conversion

Javascript

FeaturesInstallationUsageLicense

Features

  • Converts CSV to HTML as Node.JS package or CLI
  • Ability to choose the delimiter
  • Converts CSV to HTML fast (± 1s / 200000 lines) - Average on Macbook Pro 2018 w/ i7

Installation

# CLI
$ npm i -g @leafgard/csv2html
# Package
$ npm i @leafgard/csv2html

Usage

CLI

Here is a basic CLI usage example:

$ csv2html -i input.csv -o output.csv

You can provide options like:

  • -d: CSV parsing delimiter, f.e: -d ';'
  • -t: Transforms table to HTML document with provided title, f.e: -t 'My document'

Package

Here is a basic usage example as a Node.JS package:

const CSV2HTML = require('@leafgard/csv2html')

CSV2HTML
  .setOptions({
    csvDelimiter: ';',
    htmlTitle: 'My document'
  }) // (Optional)

  .setInputFile('data.csv')
  .setOutputFile('output.csv')

  .convert().then(() => {
    // Do something
  }).catch((err) => {
    // Catch error
  })

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Current Tags

  • 1.1.1                                ...           latest (a year ago)

4 Versions

  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |