All Projects → raine → Html Table Cli

raine / Html Table Cli

Licence: mit
Create interactive tables from JSON on the command-line

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Html Table Cli

Node Minify
Light Node.js module that compress javascript, css and html files
Stars: ✭ 404 (+1656.52%)
Mutual labels:  cli, json
Jtc
JSON processing utility
Stars: ✭ 425 (+1747.83%)
Mutual labels:  cli, json
Tabulator
Interactive Tables and Data Grids for JavaScript
Stars: ✭ 4,329 (+18721.74%)
Mutual labels:  json, table
Jql
A JSON Query Language CLI tool
Stars: ✭ 368 (+1500%)
Mutual labels:  cli, json
Structured Text Tools
A list of command line tools for manipulating structured text data
Stars: ✭ 6,180 (+26769.57%)
Mutual labels:  cli, json
Visidata
A terminal spreadsheet multitool for discovering and arranging data
Stars: ✭ 4,606 (+19926.09%)
Mutual labels:  cli, json
Remarshal
Convert between CBOR, JSON, MessagePack, TOML, and YAML
Stars: ✭ 421 (+1730.43%)
Mutual labels:  cli, json
Jet
CLI to transform between JSON, EDN and Transit, powered with a minimal query language.
Stars: ✭ 331 (+1339.13%)
Mutual labels:  cli, json
Ponzu
Headless CMS with automatic JSON API. Featuring auto-HTTPS from Let's Encrypt, HTTP/2 Server Push, and flexible server framework written in Go.
Stars: ✭ 5,373 (+23260.87%)
Mutual labels:  cli, json
Trdsql
CLI tool that can execute SQL queries on CSV, LTSV, JSON and TBLN. Can output to various formats.
Stars: ✭ 593 (+2478.26%)
Mutual labels:  cli, json
Jaggr
JSON Aggregation CLI
Stars: ✭ 365 (+1486.96%)
Mutual labels:  cli, json
Dasel
Query, update and convert data structures from the command line. Comparable to jq/yq but supports JSON, TOML, YAML, XML and CSV with zero runtime dependencies.
Stars: ✭ 759 (+3200%)
Mutual labels:  cli, json
Xidel
Command line tool to download and extract data from HTML/XML pages or JSON-APIs, using CSS, XPath 3.0, XQuery 3.0, JSONiq or pattern matching. It can also create new or transformed XML/HTML/JSON documents.
Stars: ✭ 335 (+1356.52%)
Mutual labels:  cli, json
Resume Cli
CLI tool to easily setup a new resume 📑
Stars: ✭ 3,967 (+17147.83%)
Mutual labels:  cli, json
Jwt Cli
A super fast CLI tool to decode and encode JWTs built in Rust
Stars: ✭ 336 (+1360.87%)
Mutual labels:  cli, json
Pytablewriter
pytablewriter is a Python library to write a table in various formats: CSV / Elasticsearch / HTML / JavaScript / JSON / LaTeX / LDJSON / LTSV / Markdown / MediaWiki / NumPy / Excel / Pandas / Python / reStructuredText / SQLite / TOML / TSV.
Stars: ✭ 422 (+1734.78%)
Mutual labels:  json, table
Simpletable
Simple tables in terminal with Go
Stars: ✭ 288 (+1152.17%)
Mutual labels:  cli, table
Tmuxp
💻 tmux session manager. built on libtmux
Stars: ✭ 3,269 (+14113.04%)
Mutual labels:  cli, json
Ramda Cli
🐏 A CLI tool for processing data with functional pipelines
Stars: ✭ 515 (+2139.13%)
Mutual labels:  cli, json
Sheetjs
📗 SheetJS Community Edition -- Spreadsheet Data Toolkit
Stars: ✭ 28,479 (+123721.74%)
Mutual labels:  json, table

html-table-cli

Create interactive tables from JSON on the command-line.

key features

  • takes JSON via stdin, writes a standalone HTML file to stdout
  • alternatively, view instantly in browser with --open
  • customize column-specific rendering through arguments
  • uses react-table

install

npm install -g html-table-cli

usage

cat data.json | html-table

options

Usage: html-table [options]

  Render JSON as an interactive table to be viewed in a web browser.
  By default, reads JSON from stdin and renders HTML to stdout.

  Expected structure of input is [ object, object, ... ], where each object is
  of the same shape.

  -o, --open             write to a temp file and open in browser
  -h, --help             view help

  Customization:

  --col.$key.width       set width of a column
  --col.$key.header      set how header for a column is rendered
  --col.$key.cell        set how cell for a column is rendered
  --col.$key.parse       function to apply to values of specific column
  --col.$key.filterable  make column filterable
  --cols                 comma-separated list of keys to be shown as columns
  --generated-at         show a timestamp of page generation at bottom
  --[no-]pagination      enable & disable pagination

  Where $key is name of a key that appears in the provided list of objects.

examples

The examples below use npx that comes with npm to install html-table-cli on demand, hence no installation is necessary to run them.

trending repositories on github

curl -s https://github-trending-api.now.sh/repositories\?since=weekly |\
  npx html-table-cli -o --generated-at \
    --cols project,description,languageColor,language,stars,forks \
    --col.project.cell '<a href="${url}">${author}/${name}</a>' \
    --col.project.width 250  \
    --col.languageColor.width 20  \
    --col.languageColor.cell \
      '<div style="background-color: ${languageColor}; border-radius: 500px; width: 10px; height: 10px; display: inline-block;" />' \
    --col.languageColor.header '' \
    --col.language.width 120  \
    --col.stars.width 100 \
    --col.forks.width 100

https://raine.github.io/html-table-cli/github-trending.html

countries

curl -s https://restcountries.eu/rest/v2/all | \
  npx html-table-cli -o \
    --cols flag,code,name,population,area,capital,tld,languages \
    --col.flag.cell '<div style="text-align: center"><img src="${flag}" height="20" /></div>' \
    --col.flag.header '' \
    --col.flag.width 50 \
    --col.code.width 40 \
    --col.code.cell '${alpha2Code}' \
    --col.code.header '' \
    --col.name.cell '<span>${name} (${nativeName})</span>' \
    --col.name.filterable \
    --col.tld.cell '<code>${topLevelDomain[0]}</code>' \
    --col.tld.header 'TLD' \
    --col.tld.width 50 \
    --col.languages.cell '<span>${languages.map(x => x.name).join(", ")}</span>' \
    --col.languages.header 'Languages' \
    --col.population.cell '${population.toLocaleString()}' \
    --col.area.cell '${area.toLocaleString()}'

https://raine.github.io/html-table-cli/countries.html

other notes

Goes well with ramda-cli. Manipulate the JSON before passing to html-table-cli or use to convert a csv file to json.

e.g. cat mydata.csv | ramda -i csv identity | html-table

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].