Skip to main content

Simple commandline utility to convert CSV files to searchable and sortable HTML table.

Reason this release was yanked:

v2.6.0.2 fails to install due to issues with deps, use 2.6.0.3 instead

Project description

CSVtoTable

Simple command-line utility to convert CSV files to searchable and sortable HTML table. Supports large datasets and horizontal scrolling for large number of columns.

DISCLAIMER: This is NOT an official version, nor am I affiliated with the original creator Vivek R @vividvilla https://github.com/vividvilla (Upstream Author) This version is mostly for me, if you wanna use it too go ahead but I give no promises of function. If you notice any errors or issues please tell me!

Demo

Here is a demo of sample csv file converted to HTML table.

(You can use https://NanashiTheNameless.github.io/csvtotable/sample/index.html to see all the example HTML pages.)

Installation

Get the Latest

python -m pip install --upgrade 'CSVtoTableNameless @ git+https://github.com/NanashiTheNameless/csvtotable@master'

Or get from PyPi (not recommended, may be out of date)

pip install --upgrade CSVtoTableNameless

Get started

csvtotable --help

Convert data.csv file to data.html file

csvtotable data.csv data.html

Open output file in a web browser instead of writing to a file

csvtotable data.csv --serve

Options

csvtotable [OPTIONS] input_file [output_file]

CSVtoTable: Convert CSV files into searchable, sortable HTML tables.

Options:
  -h, --help            show this help message and exit
  --version             Show detailed version and metadata about the tool (alias for 'python -m pip show CSVtoTableNameless').
  input_file            Path to the input CSV file.
  output_file           Path to the output HTML file (optional if --serve is used).
  -c CAPTION, -t CAPTION, --caption CAPTION, --title CAPTION
                        Table caption and HTML title.
  -d DELIMITER, --delimiter DELIMITER
                        CSV delimiter (default: ',').
  -q QUOTECHAR, --quotechar QUOTECHAR
                        String used to quote fields containing special characters (default: '"').
  -dl DISPLAY_LENGTH, --display-length DISPLAY_LENGTH
                        Number of rows to show by default. Defaults to -1 (show all rows).
  -o, --overwrite       Overwrite the output file if it exists.
  -s, --serve           Open output HTML in a browser instead of writing to a file.
  -H HEIGHT, --height HEIGHT
                        Table height in px or as a percentage (e.g., 50%).
  -p, --pagination      Enable table pagination (enabled by default unless virtual scroll is active).
  -vs VIRTUAL_SCROLL, --virtual-scroll VIRTUAL_SCROLL
                        Enable virtual scroll for tables with more than the specified number of rows. Set to -1 to disable and 0 to always enable.
  -nh, --no-header      Disable displaying the first row as headers.
  -e, --disable-export  Disable export options for the table.
  -eo {copy,csv,json,print} [{copy,csv,json,print} ...], --export-options {copy,csv,json,print} [{copy,csv,json,print} ...]
                        Specify export options (default: all). For multiple options, use: -eo json csv.
  -ps, --preserve-sort  Preserve the default sorting order.
  --debug               Enable debug mode to show full tracebacks and advanced info with --help.

Credits

All Major Contributors

All Other Contributors

External HTML Libraries used

Datatables

jQuery

JSZip

PDFMake

External Python Libraries used

jinja2

six

unicodecsv

colorama

argparse

logging

uuid

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

csvtotablenameless-2.6.0.2.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

csvtotablenameless-2.6.0.2-py2.py3-none-any.whl (12.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file csvtotablenameless-2.6.0.2.tar.gz.

File metadata

  • Download URL: csvtotablenameless-2.6.0.2.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for csvtotablenameless-2.6.0.2.tar.gz
Algorithm Hash digest
SHA256 cf74ae91561e4abf19bb9e5e2b23bbc622240adadecde8953cd52a6cbeb39eed
MD5 3881d7842a28c95864cdc1d786510106
BLAKE2b-256 278c3d326fa4f9a1e1aa02cec1936660a0fc9248caa112767ea28bd8a032fc2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for csvtotablenameless-2.6.0.2.tar.gz:

Publisher: python-publish.yml on NanashiTheNameless/csvtotable

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file csvtotablenameless-2.6.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for csvtotablenameless-2.6.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 19e0f8a1bcd54c6033437d65d509c82693095ba97d5957fcb842a6503f84681b
MD5 368bb9a4e8429b23120064a7abdd24b5
BLAKE2b-256 9c895b361c2467210b389b91ddb14bc2ea9b7cc9fe740fb12ed10889461af0db

See more details on using hashes here.

Provenance

The following attestation bundles were made for csvtotablenameless-2.6.0.2-py2.py3-none-any.whl:

Publisher: python-publish.yml on NanashiTheNameless/csvtotable

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page