Giter Club home page Giter Club logo

csvtohtml's Introduction

CSVtoHTML

A Node CLI that converts CSV data to HTML tables or definition lists.
  • table command enables renaming of headers, selecting of CSV columns, and applying CSS class.

  • dl` command automatically excludes column headers and enables applying CSS class.

CLI

Usage: csvtohelp <command><file><options>

Arguments:
  inputFile                               Specify a path to a flatfile. For example, 'data.csv'

Commands:
  dl [options] <inputFile>     Convert CSV data to a <dl> and save to an HTML file export directory. If outputFile is unspecified, exports to
                               './export/dl/<inputFile>.html'.
  table [options] <inputFile>  Convert flatfile data to a <dl> HTML element and save to file. If outputFile is unspecified, exports to
                               './export/table/<inputFile>.html'.
  help [command]               display help for command

DL Options:
  -c, --css <class>                       Specify CSS class of HTML <table>. By default, "header" (i.e. <table class="term". CSS includes "noHeader" (default:
                                          "header")
  -d, --delimiter <character>             Identify the delimiter in the InputFile. One of ',' (comma), ';' (semi-colon), or '|' (pipe). If unspecified, ','
  -e, --excludeHeader                     Exclude the first row in the inputFile. First row is included by default. Use "noHeader" CSS style if specified. (default:
                                          false)
  -h, --help                              display help for command
  -n, --includeColumns [columnNumber...]  Specify data columns to include in the table. For example, [1,2,5,7]. Maximum of five columns.  By default, first five
                                          columns are returned
  -o, --outputFile [value]                option with a default value (default: "defaultPath")
  -p --preview                            Serve HTML to browser using specified CSS (default: false)
  -r, --replaceHeaders [columnName...]    Replace InputFile column headers with desired table column headers. Specify an array of comma-separated headers.
  -sk, --skipComments                     Ignore commented lines in inputFile. Commented lines begin with the "#" character. (default: false)
  -sl, --skipLines <number>               Skip the specified number of lines at the begining of inputFile

table Options:
  -c, --css <class>                       Specify CSS class of HTML <table>. By default, "header" (i.e. <table class="term". CSS includes "noHeader" (default:
                                          "header")
  -d, --delimiter <character>             Identify the delimiter in the InputFile. One of ',' (comma), ';' (semi-colon), or '|' (pipe). If unspecified, ','
  -e, --excludeHeader                     Exclude the first row in the inputFile. First row is included by default. Use "noHeader" CSS style if specified. (default:
                                          false)
  -h, --help                              display help for command
  -n, --includeColumns [columnNumber...]  Specify data columns to include in the table. For example, [1,2,5,7]. Maximum of five columns.  By default, first five
                                          columns are returned
  -o, --outputFile [value]                option with a default value (default: "defaultPath")
  -p --preview                            Serve HTML to browser using specified CSS (default: false)
  -r, --replaceHeaders [columnName...]    Replace InputFile column headers with desired table column headers. Specify an array of comma-separated headers.
  -sk, --skipComments                     Ignore commented lines in inputFile. Commented lines begin with the "#" character. (default: false)
  -sl, --skipLines <number>               Skip the specified number of lines at the begining of inputFile

csvtohtml's People

Contributors

butcherpete avatar

Watchers

James Cloos avatar  avatar

csvtohtml's Issues

fs creates folders

Enable ds to write folders if they do not exist. https:/ /stackoverflow.com/questions/21194934/how-to-create-a-direc tory-if-it-doesnt-exist-using-node-js

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.