csvtotable

Simple command-line utility to convert CSV files to searchable and sortable HTML table.

  • 所有者: vividvilla/csvtotable
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

CSVtoTable

.. image:: https://api.codacy.com/project/badge/Grade/b31a7e5d6bba4b5d9331ba05b04a12ab
:alt: Codacy Badge
:target: https://www.codacy.com/app/vividvilla/csvtotable?utm_source=github.com&utm_medium=referral&utm_content=vividvilla/csvtotable&utm_campaign=badger

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.

Demo

Here is a demo_ of sample csv_ file converted to HTML table.

.. image:: https://raw.githubusercontent.com/vividvilla/csvtotable/master/sample/table.gif

Installation

::

pip install --upgrade csvtotable

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

::

-c,  --caption          Table caption
-d,  --delimiter        CSV delimiter. Defaults to ','
-q,  --quotechar        Quote chracter. Defaults to '"'
-dl, --display-length   Number of rows to show by default. Defaults to -1 (show all rows)
-o,  --overwrite        Overwrite the output file if exists. Defaults to false.
-s,  --serve            Open html output in a web browser.
-h,  --height           Table height in px or in %. Default is 75% of the page.
-p,  --pagination       Enable/disable pagination. Enabled by default.
-vs, --virtual-scroll   Number of rows after which virtual scroll is enabled. Default is set to 1000 rows.
                        Set it to -1 to disable and 0 to always enable.
-nh, --no-header        Show default headers instead of picking first row as header. Disabled by default.
-e,  --export           Enable filtered rows export options.
-eo, --export-options   Enable specific export options. By default shows all.
                        For multiple options use -eo flag multiple times. For ex. -eo json -eo csv

Credits

Datatables_

.. _Here is a demo: https://cdn.rawgit.com/vividvilla/csvtotable/2.1.0/sample/goog.html
.. _sample csv: https://github.com/vividvilla/csvtotable/blob/master/sample/goog.csv
.. _Datatables: https://datatables.net

主要指标

概览
名称与所有者vividvilla/csvtotable
主编程语言Python
编程语言Python (语言数: 2)
平台
许可证MIT License
所有者活动
创建于2017-07-05 16:56:48
推送于2021-01-05 11:46:14
最后一次提交2021-01-05 17:14:22
发布数12
最新版本名称v2.1.2 (发布于 )
第一版名称1.0.0 (发布于 )
用户参与
星数1.1k
关注者数31
派生数115
提交数71
已启用问题?
问题数30
打开的问题数15
拉请求数5
打开的拉请求数2
关闭的拉请求数2
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?