All Projects → dbohdan → csv2html

dbohdan / csv2html

Licence: BSD-3-Clause license
Convert CSV files to HTML tables

Programming Languages

rust
11053 projects
HTML
75241 projects
python
139335 projects - #7 most used programming language
Makefile
30231 projects
shell
77523 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to csv2html

Length.js
📏 JavaScript library for length units conversion.
Stars: ✭ 292 (+356.25%)
Mutual labels:  converter, conversion
Ec2 Spot Converter
A tool to convert AWS EC2 instances back and forth between On-Demand and Spot billing models.
Stars: ✭ 108 (+68.75%)
Mutual labels:  converter, conversion
Remarshal
Convert between CBOR, JSON, MessagePack, TOML, and YAML
Stars: ✭ 421 (+557.81%)
Mutual labels:  converter, conversion
BlocksConverter
A PocketMine-MP plugin allows you to convert Minecraft PC maps to MCPE/Bedrock maps or vice-versa.
Stars: ✭ 47 (-26.56%)
Mutual labels:  converter, conversion
fp-units
An FP-oriented library to easily convert CSS units.
Stars: ✭ 18 (-71.87%)
Mutual labels:  converter, conversion
quill-markdown-toolbar
A Quill.js module for converting markdown text to rich text format
Stars: ✭ 13 (-79.69%)
Mutual labels:  converter, conversion
Unitsnet
Makes life working with units of measurement just a little bit better.
Stars: ✭ 641 (+901.56%)
Mutual labels:  converter, conversion
qTsConverter
A simple tool to convert qt translation file (ts) to other format (xlsx / csv) and vice versa
Stars: ✭ 26 (-59.37%)
Mutual labels:  converter, conversion
cpc
Text calculator with support for units and conversion
Stars: ✭ 89 (+39.06%)
Mutual labels:  converter, conversion
Kepubify
Fast, standalone EPUB to KEPUB converter CLI app / library (and a few other utilities).
Stars: ✭ 225 (+251.56%)
Mutual labels:  converter, conversion
dftools
Tools for Star Wars: Dark Forces assets.
Stars: ✭ 18 (-71.87%)
Mutual labels:  converter, conversion
caffe weight converter
Caffe-to-Keras weight converter. Can also export weights as Numpy arrays for further processing.
Stars: ✭ 68 (+6.25%)
Mutual labels:  converter, conversion
bitsnpicas
Bits'N'Picas - Bitmap & Emoji Font Creation & Conversion Tools
Stars: ✭ 171 (+167.19%)
Mutual labels:  converter, conversion
sublime-atomizr
Convert Sublime Text completions into Atom (or Visual Studio Code) snippets, and vice versa.
Stars: ✭ 12 (-81.25%)
Mutual labels:  converter, conversion
xsampa
X-SAMPA to IPA converter
Stars: ✭ 20 (-68.75%)
Mutual labels:  converter, conversion
Oas Kit
Convert Swagger 2.0 definitions to OpenAPI 3.0 and resolve/validate/lint
Stars: ✭ 516 (+706.25%)
Mutual labels:  converter, conversion
discoursegraphs
linguistic converter / merging tool for multi-level annotated corpora. graph-based (using Python and NetworkX).
Stars: ✭ 47 (-26.56%)
Mutual labels:  converter, conversion
Hrconvert2
A self-hosted, drag-and-drop, & nosql file conversion server that supports 62x file formats.
Stars: ✭ 132 (+106.25%)
Mutual labels:  converter, conversion
bank2ynab
Easily convert and import your bank's statements into YNAB. This project consolidates other conversion efforts into one universal tool.
Stars: ✭ 197 (+207.81%)
Mutual labels:  converter, conversion
vectorexpress-api
Vector Express is a free service and API for converting, analyzing and processing vector files.
Stars: ✭ 66 (+3.13%)
Mutual labels:  converter, conversion

csv2html

Travis CI Build Status AppVeyor CI Build Status

This command line utility converts CSV files to HTML tables and complete HTML documents. It requires Rust 1.43 or later to build and Python 3.5 or later to test. By default it uses the first row of the CSV file as the header of the HTML table.

The older Python version is preserved in the branch python.

Installation

Prebuilt Linux and Windows binaries are available. They are attached to releases on the Releases page.

Building on Debian and Ubuntu

Follow the instructions to build a static Linux binary of csv2html from source on recent Debian and Ubuntu.

1. Install Rustup. Through Rustup add the stable MUSL target for your CPU.

rustup target add x86_64-unknown-linux-musl

2. Install the build and testing dependencies.

sudo apt install build-essential musl-tools python3

3. Clone this repository. Build and install the binary.

git clone https://github.com/dbohdan/csv2html
cd csv2html
make test
make release
sudo make install "BUILD_USER=$USER"

Cross-compiling for Windows

Follow the instructions to build a 32-bit Windows binary of csv2html on recent Debian and Ubuntu.

1. Install Rustup. Through Rustup add the i686 GNU ABI Windows target.

rustup target add i686-pc-windows-gnu

2. Install the build dependencies.

sudo apt install build-essential mingw-w64

3. Configure Cargo for cross-compilation. Put the following in ~/.cargo/config.

[target.i686-pc-windows-gnu]
linker = "/usr/bin/i686-w64-mingw32-gcc"

4. Clone this repository. Build the binary.

git clone https://github.com/dbohdan/csv2html
cd csv2html
RUSTFLAGS="-C panic=abort -C lto" make release TARGET=i686-pc-windows-gnu
cp "/tmp/$USER/cargo/csv2html/i686-pc-windows-gnu/release/csv2html.exe" .

Command line arguments

csv2html 3.0.0
Convert CSV files to HTML tables

USAGE:
    csv2html [FLAGS] [OPTIONS] [input]

FLAGS:
    -c, --complete-document    Output a complete HTML document instead of only a
                               table
    -h, --help                 Prints help information
    -n, --no-header            Do not use the first row of the input as the
                               header
    -r, --renumber             Replace the first column with row numbers
    -V, --version              Prints version information

OPTIONS:
    -d, --delimiter <DELIM>    Field delimiter character for CSV (',' by
                               default)
    -o, --output <OUTPUT>      Output file
    -s, --start <N>            Skip the first N-1 rows; start at row N
        --table <ATTRS>        HTML attributes for the tag <table> (e.g.,
                               --table 'foo="bar" baz' results in the output
                               <table foo="bar" baz>...</table>); it is up to
                               the user to ensure the result is valid HTML
        --td <ATTRS>           Attributes for <td>
        --th <ATTRS>           Attributes for <th>
    -t, --title <TITLE>        HTML document title
        --tr <ATTRS>           Attributes for <tr>

ARGS:
    <input>    Input file

Use examples

The following command reads the data from test/test.csv and writes the corresponding HTML table to test.html:

csv2html -o test.html tests/test.csv

The next command takes semicolon-delimited data from pub.csv, starting with row 267. The first column of the table is replaced with the row number starting at 1 (except in the header row, which is untouched). The output is redirected to the file pub.html.

csv2html pub.csv -d \; -r -s 267 > pub.html

Same as above, but this time the output is a full HTML document instead of just the markup for the table:

csv2html pub.csv -d \; -r -s 267 -c > pub.html

If the input file is tab-delimited, you need to pass a literal tab character as the delimiter. In a POSIX-compatible shell you can do it like this:

csv2html --delimiter "$(printf '\t')" tests/test.tsv

In the Command Prompt and batch files on Windows you will need to set %tab% to the tab character. tab.cmd is included in this repository.

call tab.cmd
csv2html-win32.exe --delimiter "%tab%" tests/test.tsv

License

Three-clause ("new" or "revised") BSD. See the file LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].