{"id":43724848,"url":"https://github.com/zhanxw/histoterm","last_synced_at":"2026-02-27T22:12:17.729Z","repository":{"id":324074465,"uuid":"1095869557","full_name":"zhanxw/histoterm","owner":"zhanxw","description":"Draw histogram in terminal","archived":false,"fork":false,"pushed_at":"2025-11-13T17:03:45.000Z","size":2235,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-13T18:16:43.198Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhanxw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-13T16:15:36.000Z","updated_at":"2025-11-13T16:59:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zhanxw/histoterm","commit_stats":null,"previous_names":["zhanxw/histoterm"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zhanxw/histoterm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhanxw%2Fhistoterm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhanxw%2Fhistoterm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhanxw%2Fhistoterm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhanxw%2Fhistoterm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhanxw","download_url":"https://codeload.github.com/zhanxw/histoterm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhanxw%2Fhistoterm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29516869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T18:37:19.720Z","status":"ssl_error","status_checked_at":"2026-02-16T18:36:46.920Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-05T09:00:24.655Z","updated_at":"2026-02-16T20:01:00.257Z","avatar_url":"https://github.com/zhanxw.png","language":"Rust","funding_links":[],"categories":["Data Processing"],"sub_categories":[],"readme":"# histoterm\n\n![Build](https://img.shields.io/badge/build-passing-brightgreen)\n![License: GPLv3](https://img.shields.io/badge/License-GPLv3-blue)\n![Rust](https://img.shields.io/badge/Rust-stable-orange)\n\nA lightweight Rust CLI tool that reads numeric data from **stdin** and prints an **ASCII histogram** showing the data distribution — perfect for quick data exploration right from the terminal.\n\n---\n\n## 🧩 Installation\n\n### Option 1 — From local source\n\n```bash\ncargo install --path .\n```\n\nThis installs `histoterm` into Cargo’s bin directory (usually `~/.cargo/bin`).\n\n---\n\n### Option 2 — Directly from GitHub\n\nInstall the latest version straight from the repository:\n\n```bash\ncargo install --git https://github.com/zhanxw/histoterm\n```\n\nOr specify a branch, tag, or commit:\n\n```bash\ncargo install --git https://github.com/zhanxw/histoterm --branch main\n```\n\n---\n\n## 🛠️ Build from source\n\nIf you just want to build without installing:\n\n```bash\ncargo build --release\n```\n\nThe compiled binary will be at:\n```\ntarget/release/histoterm\n```\n\n---\n\n## 🖼️ Preview\n\nHere’s what `histoterm` looks like in action:\n\n```text\n$ seq 100 | awk 'BEGIN{srand()} {for(i=0;i\u003cint(rand()*3);i++) print $1}'   | histoterm --bins 12 --width 60\n\nASCII Histogram  (bins=12, width=60)\ncount = 86, min = 3.000000, max = 100.000000, mean = 47.639535, std = 29.028419\n\n[3.0000     ,    11.0833) |     14 ( 16.3%) | ############################################################\n[11.0833    ,    19.1667) |      4 (  4.7%) | #################\n[19.1667    ,    27.2500) |     10 ( 11.6%) | ##########################################\n[27.2500    ,    35.3333) |      7 (  8.1%) | ##############################\n[35.3333    ,    43.4167) |      6 (  7.0%) | #########################\n[43.4167    ,    51.5000) |      5 (  5.8%) | #####################\n[51.5000    ,    59.5833) |      6 (  7.0%) | #########################\n[59.5833    ,    67.6667) |     10 ( 11.6%) | ##########################################\n[67.6667    ,    75.7500) |      4 (  4.7%) | #################\n[75.7500    ,    83.8333) |      9 ( 10.5%) | ######################################\n[83.8333    ,    91.9167) |      4 (  4.7%) | #################\n[91.9167    ,   100.0000) |      7 (  8.1%) | ##############################\n```\n\n---\n\n## ⚙️ Command-line options\n\n| Option | Description | Default |\n|--------|--------------|----------|\n| `--bins \u003cN\u003e` | Number of histogram bins | `10` |\n| `--width \u003cW\u003e` | Maximum bar width (characters) | `50` |\n\n---\n\n## 🧮 Usage examples and piping\n\nYou can pipe **any stream of numbers** into `histoterm`.  \nHere are some practical examples:\n\n### 1️⃣ From a CSV column\nUse `awk`, `cut`, or `csvkit` to extract numeric data:\n\n```bash\ncut -d, -f3 data.csv | tail -n +2 | histoterm --bins 20\n```\n\nFor tab-separated files:\n```bash\nawk -F'\\t' '{print $5}' data.tsv | histoterm\n```\n\n---\n\n### 2️⃣ From logs or JSON data\nExtract numeric values from logs:\n```bash\ngrep \"latency=\" server.log | sed 's/.*latency=//' | histoterm\n```\n\nFrom JSON data:\n```bash\njq '.response_time' data.json | histoterm --bins 15\n```\n\n---\n\n### 3️⃣ Combine with other tools\nChain with statistical or simulation outputs:\n```bash\npython -c \"import numpy as np; [print(x) for x in np.random.normal(0,1,1000)]\"   | histoterm --bins 20 --width 70\n```\n\n---\n\n## 📄 License\n\nGPLv3 License © 2025\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhanxw%2Fhistoterm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhanxw%2Fhistoterm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhanxw%2Fhistoterm/lists"}