Simple commandline utility to convert CSV files to searchable and sortable HTML table.
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
External HTML Libraries used
External Python Libraries used
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file csvtotablenameless-2.6.0.5.tar.gz.
File metadata
- Download URL: csvtotablenameless-2.6.0.5.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
141f4bd03ee2619e4fe6cfa0e68685b317ff12076dbd465ab6df162c09ed8832
|
|
| MD5 |
4497691e030f8be871151ed17854f9f7
|
|
| BLAKE2b-256 |
0c3c41097a5d4c77ea9142ad7dfa76f7b8a4d310b9049257f99f74b9b90ab214
|
Provenance
The following attestation bundles were made for csvtotablenameless-2.6.0.5.tar.gz:
Publisher:
python-publish.yml on NanashiTheNameless/csvtotable
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
csvtotablenameless-2.6.0.5.tar.gz -
Subject digest:
141f4bd03ee2619e4fe6cfa0e68685b317ff12076dbd465ab6df162c09ed8832 - Sigstore transparency entry: 164959745
- Sigstore integration time:
-
Permalink:
NanashiTheNameless/csvtotable@9b01aeda443d73ac47f1e0f98ad87762d7a96fc6 -
Branch / Tag:
refs/tags/v2.6.0.5 - Owner: https://github.com/NanashiTheNameless
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@9b01aeda443d73ac47f1e0f98ad87762d7a96fc6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file csvtotablenameless-2.6.0.5-py2.py3-none-any.whl.
File metadata
- Download URL: csvtotablenameless-2.6.0.5-py2.py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ae3e163603fc3a1eb3a8ab2e44224569cf65512170993acd562920199fc8a74
|
|
| MD5 |
ce55021b00ac3012cf2ac14a5a3e0cd3
|
|
| BLAKE2b-256 |
6e51c155100af541ad2ae855e60783678ea7f7abc1e0a4eb3971b08455a7f52c
|
Provenance
The following attestation bundles were made for csvtotablenameless-2.6.0.5-py2.py3-none-any.whl:
Publisher:
python-publish.yml on NanashiTheNameless/csvtotable
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
csvtotablenameless-2.6.0.5-py2.py3-none-any.whl -
Subject digest:
2ae3e163603fc3a1eb3a8ab2e44224569cf65512170993acd562920199fc8a74 - Sigstore transparency entry: 164959746
- Sigstore integration time:
-
Permalink:
NanashiTheNameless/csvtotable@9b01aeda443d73ac47f1e0f98ad87762d7a96fc6 -
Branch / Tag:
refs/tags/v2.6.0.5 - Owner: https://github.com/NanashiTheNameless
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@9b01aeda443d73ac47f1e0f98ad87762d7a96fc6 -
Trigger Event:
release
-
Statement type: