{"id":27522615,"url":"https://github.com/fritzrehde/asciibar","last_synced_at":"2026-07-02T19:04:41.032Z","repository":{"id":65723807,"uuid":"595611404","full_name":"fritzrehde/asciibar","owner":"fritzrehde","description":"A cli tool to print percentages as ascii bar charts","archived":false,"fork":false,"pushed_at":"2024-01-17T20:19:31.000Z","size":51,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T03:47:46.195Z","etag":null,"topics":["cli","data","percentage","visualization"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fritzrehde.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-01-31T12:55:40.000Z","updated_at":"2025-03-13T01:35:03.000Z","dependencies_parsed_at":"2024-01-17T21:36:22.964Z","dependency_job_id":"76761a4e-8178-4758-a329-1ce7c586ee4f","html_url":"https://github.com/fritzrehde/asciibar","commit_stats":{"total_commits":21,"total_committers":2,"mean_commits":10.5,"dds":0.04761904761904767,"last_synced_commit":"d38110cad5542e65d024c72bbd0420ea20497b0f"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritzrehde%2Fasciibar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritzrehde%2Fasciibar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritzrehde%2Fasciibar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritzrehde%2Fasciibar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fritzrehde","download_url":"https://codeload.github.com/fritzrehde/asciibar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249478818,"owners_count":21279141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cli","data","percentage","visualization"],"created_at":"2025-04-18T10:25:58.725Z","updated_at":"2025-10-31T15:03:42.090Z","avatar_url":"https://github.com/fritzrehde.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# asciibar\n\n[![Build status](https://github.com/fritzrehde/asciibar/actions/workflows/ci.yml/badge.svg)](https://github.com/fritzrehde/asciibar/actions)\n[![Releases](https://img.shields.io/github/v/release/fritzrehde/asciibar?logo=GitHub)](https://github.com/fritzrehde/asciibar/releases)\n[![Crates.io](https://img.shields.io/crates/v/asciibar?logo=Rust)](https://crates.io/crates/asciibar)\n\n*Visualize percentages in the terminal with ascii progress bars.*\n\n![screenshot](https://raw.githubusercontent.com/fritzrehde/i/master/asciibar/screenshot-light.png#gh-light-mode-only)\n![screenshot](https://raw.githubusercontent.com/fritzrehde/i/master/asciibar/screenshot-dark.png#gh-dark-mode-only)\n\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n- [How to use](#how-to-use)\n- [Example usage](#example-usage)\n\n\n## Features\n\n- **Customizable**: every character that is printed can also be customized via cli options\n- **Speed**: written completely in rust with speed in mind\n\n\n## Installation\n\n### From binaries\n\nThe [releases page](https://github.com/fritzrehde/asciibar/releases) contains pre-compiled binaries for Linux, macOS and Windows.\n\n### From [crates.io](https://crates.io/crates/asciibar)\n\n```shell\ncargo install asciibar\n```\n\n\n## How to use\n\n`asciibar` is very simple and designed to be integrated into shell scripts.\n\n### Specifying the percentage\n\nYou can provide the percentage with `asciibar \u003cPERCENTAGE\u003e`.\n\nPercentages are usually represented either by a float value between 0 and 1 or between 0 and 100.\nTherefore, we can call 0 and 1 (or 0 and 100) the minimum and maximum values of the percentage scale.\n`asciibar` will automatically guess whether these default ranges are used.\n\nFor example, `asciibar 0.1` will assume a scale from 0 to 1 and `asciibar 10` will assume a scale of 0 to 100.\nHowever, you can also specify these minimum and maximum values yourself with `--min` and `--max`.\nNote that you will have to use the format `asciibar --[min|max]=-42 -- -10` when specifying negative values, otherwise the argument parser might mistake a negative value for an option.\nFor example, if you want to visualize a percentage of 0.1 on a scale of 0 to 100, you would have to specify `asciibar --min 0 --max 100 0.1`, otherwise `asciibar` will assume the default scale of 0 to 1.\n\n### Printing to stdout\n\n`asciibar` will print three \"blocks\" to stdout:\n1. the \"filled\" block (customize with `--filled \u003cCHAR\u003e`), which represents the percentage that \"has been completed\" (i.e. the left block).\n1. the \"empty\" block (customize with `--empty \u003cCHAR\u003e`), which represents the percentage that \"has not yet been completed\" (i.e. the right block).\n1. the \"half-filled\" block (customize with `--half-filled \u003cCHAR\u003e`) represents a unique middle block that is supposed to add precision to the bar. It has been added as an extra (optional) level of segmentation between the \"filled\" and \"empty\" blocks. It will not always be printed (e.g. if the percentage can be displayed exactly with `asciibar 0.5`), but only when precision can be added (e.g. with `asciibar --length 10 0.55`).\n\nThis example output of `asciibar` might help understand which blocks are which:\n```\nfilled   half-filled   empty\n  |          |           |\n=============\u003e--------------\n```\n\n**Note:**\nThe default \"half-filled\" block is only printed if no customizing options are supplied (i.e. if all default chars are used).\nIf only \"filled\" and/or \"empty\" are provided, the block that would usually be a \"half-filled\" block will use the \"empty\" character.\nThe reason for this is that a default \"half-filled\" block might look very weird in between customized \"filled\" and \"empty\" blocks.\n\n\n### Characters\n\nYou can provide the `--filled`, `--half-filled` and `--empty` options any char you would like to display.\nHere is a list of combinations that I personally like (the first line represents the defaults in `asciibar`):\n\nfilled | half-filled | empty | example output\n:-: | :-: | :-: | :-:\n`█` | `▌` | ` ` | `███▌   `\n`=` | `\u003e` | `-` | `===\u003e---`\n`#` | none | `=` | `###====`\n`█` | none | `░` | `███░░░░`\n`█` | none | `▒` | `███▒▒▒▒`\n`█` | none | `▓` | `███▓▓▓▓`\n\n### Length\n\nYou can specify how long/wide you want the output to be with `--length` (the default is 10 characters).\n\n### Miscellaneous\n\nThese last two features are possible to do in a normal shell script, but have been added as quality-of-life improvements.\nYou can add a custom border character with `--border` that is added before and after the bar chart.\nYou can also specify the bar chart to end in a newline character with `--newline`.\n\n\n## Example usage\n\n```sh\n# uses default chars for filled '█', half-filled '▌' and empty ' '\nasciibar 0.55\n█████▌    \n\n# custom border\nasciibar --border=\"|\" 0.55\n|█████▌    |\n\n# custom filled and empty chars\nasciibar --filled=\"░\" --empty=\"█\" 0.5\n░░░░░█████\n\n# custom length\ncargo run -- --filled \"=\" --half-filled \"\u003e\" --empty \"-\" --length 20 -- 0.58\n===========\u003e--------\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffritzrehde%2Fasciibar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffritzrehde%2Fasciibar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffritzrehde%2Fasciibar/lists"}