{"id":13729306,"url":"https://github.com/pemistahl/chr","last_synced_at":"2025-03-24T04:31:09.896Z","repository":{"id":57551472,"uuid":"274073803","full_name":"pemistahl/chr","owner":"pemistahl","description":"A command-line tool that gives information about Unicode characters","archived":false,"fork":false,"pushed_at":"2021-01-14T10:14:41.000Z","size":153,"stargazers_count":42,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-19T01:58:29.190Z","etag":null,"topics":["cli","command-line-tool","rust","rust-cli","rust-crate","terminal","tool","unicode","unicode-character","unicode-character-database"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pemistahl.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}},"created_at":"2020-06-22T07:50:18.000Z","updated_at":"2024-12-29T03:26:42.000Z","dependencies_parsed_at":"2022-09-26T18:41:29.555Z","dependency_job_id":null,"html_url":"https://github.com/pemistahl/chr","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pemistahl%2Fchr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pemistahl%2Fchr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pemistahl%2Fchr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pemistahl%2Fchr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pemistahl","download_url":"https://codeload.github.com/pemistahl/chr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245210996,"owners_count":20578324,"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","command-line-tool","rust","rust-cli","rust-crate","terminal","tool","unicode","unicode-character","unicode-character-database"],"created_at":"2024-08-03T02:00:58.260Z","updated_at":"2025-03-24T04:31:09.654Z","avatar_url":"https://github.com/pemistahl.png","language":"Rust","funding_links":[],"categories":["Unicode"],"sub_categories":["Open USP Tsukubai"],"readme":"![chr](logo.png)\n\n\u003cbr\u003e\n\n[![Build Status](https://github.com/pemistahl/chr/workflows/chr%20CI/badge.svg?branch=master)](https://github.com/pemistahl/chr/actions?query=workflow%3A%22chr+CI%22+branch%3Amaster)\n[![dependency status](https://deps.rs/crate/chr/1.0.0/status.svg)](https://deps.rs/crate/chr/1.0.0)\n[![lines of code](https://tokei.rs/b1/github/pemistahl/chr?category=code)](https://github.com/XAMPPRocky/tokei)\n[![Downloads](https://img.shields.io/crates/d/chr.svg)](https://crates.io/crates/chr)\n\n[![Crates.io](https://img.shields.io/crates/v/chr.svg)](https://crates.io/crates/chr)\n[![Lib.rs](https://img.shields.io/badge/lib.rs-v1.0.0-blue)](https://lib.rs/crates/chr)\n[![license](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n\n[![Linux Download](https://img.shields.io/badge/Linux%20Download-v1.0.0-blue?logo=Linux)](https://github.com/pemistahl/chr/releases/download/v1.0.0/chr-v1.0.0-x86_64-unknown-linux-musl.tar.gz)\n[![MacOS Download](https://img.shields.io/badge/macOS%20Download-v1.0.0-blue?logo=Apple)](https://github.com/pemistahl/chr/releases/download/v1.0.0/chr-v1.0.0-x86_64-apple-darwin.tar.gz)\n[![Windows Download](https://img.shields.io/badge/Windows%20Download-v1.0.0-blue?logo=Windows)](https://github.com/pemistahl/chr/releases/download/v1.0.0/chr-v1.0.0-x86_64-pc-windows-msvc.zip)\n\n## \u003ca name=\"table-of-contents\"\u003e\u003c/a\u003e Table of Contents\n1. [What does this tool do?](#what-does-tool-do)\n2. [How to install?](#how-to-install)\n3. [How to use?](#how-to-use)\n4. [How to build?](#how-to-build)\n5. [Alternatives](#alternatives)\n6. [Do you want to contribute?](#contribution)\n\n## 1. \u003ca name=\"what-does-tool-do\"\u003e\u003c/a\u003e What does this tool do? \u003csup\u003e[Top ▲](#table-of-contents)\u003c/sup\u003e\n\n*chr* is a command-line utility that is meant to give various information about Unicode characters.\nCurrently, this information includes a character's Unicode escape sequence and its name, block, \ncategory and age as stated in the [Unicode Character Database (UCD)](https://www.unicode.org/reports/tr44).\nThe UCD in its current version 13.0 is the main and only source of information for now. More properties\nand sources will be added in later releases.\n\n## 2. \u003ca name=\"how-to-install\"\u003e\u003c/a\u003e How to install? \u003csup\u003e[Top ▲](#table-of-contents)\u003c/sup\u003e\n\nYou can download the self-contained executable for your platform above and put it in a place of your choice.\n\n*chr* is also hosted on [crates.io](https://crates.io/crates/chr),\nthe official Rust package registry. If you are a Rust developer and already have the Rust\ntoolchain installed, you can install by compiling from source using\n[*cargo*](https://doc.rust-lang.org/cargo/), the Rust package manager:\n\n```\ncargo install chr\n```\n\nPackage managers such as [Scoop](https://scoop.sh) (for Windows) and \n[Homebrew](https://brew.sh) (for macOS and Linux) will be supported soon.\n\n## 3. \u003ca name=\"how-to-use\"\u003e\u003c/a\u003e How to use? \u003csup\u003e[Top ▲](#table-of-contents)\u003c/sup\u003e\n\nWhen running the executable for the first time, an SQLite database that is bundled with it will be unzipped\nto the current user's home directory. It can be found in a hidden directory under the path `\u003chome\u003e/.chr/chr_1_0_0.db`.\nThis database is queried each time *chr* is used. It is initially created when building the source code. \nVarious UCD files are downloaded from the internet, the relevant information is copied into the SQLite database and \nthen the database is zipped and included within the executable.\n\n```\n$ chr -h\n\nchr 1.0.0\n© 2021 Peter M. Stahl \u003cpemistahl@gmail.com\u003e\nLicensed under the Apache License, Version 2.0\nDownloadable from https://crates.io/crates/chr\nSource code at https://github.com/pemistahl/chr\n\nchr is a command-line tool that gives\ninformation about Unicode characters.\n\nUSAGE:\n    chr [FLAGS] \u003cCHARS\u003e... --name \u003cNAME\u003e\n\nFLAGS:\n        --no-paging    Disables paging for the terminal output\n    -c, --colorize     Provides syntax highlighting for the terminal output\n    -h, --help         Prints help information\n    -v, --version      Prints version information\n\nOPTIONS:\n    -n, --name \u003cNAME\u003e    Searches for characters by their name as\n                         stated in the Unicode Character Database\n\nARGS:\n    \u003cCHARS\u003e...    One or more characters separated by blank space\n```\n\nThe tool is mainly meant to search for information about specific characters.\nAll characters of interest, separated by blank space, can be given to *chr* at the same time.\nThe entries are sorted by their Unicode escape sequence in ascending order:\n\n```\n$ chr Ä @ $ ß !\n\n1.\t!\tU+0021\nEXCLAMATION MARK\nBasic Latin\tOther Punctuation\nsince 1.1\n\n2.\t$\tU+0024\nDOLLAR SIGN\nBasic Latin\tCurrency Sign\nsince 1.1\n\n3.\t@\tU+0040\nCOMMERCIAL AT\nBasic Latin\tOther Punctuation\nsince 1.1\n\n4.\tÄ\tU+00C4\nLATIN CAPITAL LETTER A WITH DIAERESIS\nLatin-1 Supplement\tUppercase Letter\nsince 1.1\n\n5.\tß\tU+00DF\nLATIN SMALL LETTER SHARP S\nLatin-1 Supplement\tLowercase Letter\nsince 1.1\n```\n\nIt is also possible to search for characters by their official name in the UCD:\n\n```\n$ chr --name honey\n\n\u003e\u003e\u003e 2 results found\n\n1.\t🍯\tU+1F36F\nHONEY POT\nMiscellaneous Symbols and Pictographs\tOther Symbol\nsince 6.0\n\n2.\t🐝\tU+1F41D\nHONEYBEE\nMiscellaneous Symbols and Pictographs\tOther Symbol\nsince 6.0\n```\n\nLong result lists are paged automatically in supported terminals for easier browsing.\nThe [minus](https://github.com/arijit79/minus) crate is used for this purpose.\nIts key controls are documented in a \n[subsection of the project's readme](https://github.com/arijit79/minus#end-user-help).\nIf the paging is not deactivated automatically in unsupported terminals or if it does \nnot work as expected, it can be explicitly switched off using the `--no-paging` flag.\nThe result lists can be colorized as well with the `--colorize` flag which produces\nnicer looking output in supported terminals.\n\n## 4. \u003ca name=\"how-to-build\"\u003e\u003c/a\u003e How to build? \u003csup\u003e[Top ▲](#table-of-contents)\u003c/sup\u003e\n\nIn order to build the source code yourself, you need the\n[stable Rust toolchain](https://www.rust-lang.org/tools/install) installed on your machine\nso that [*cargo*](https://doc.rust-lang.org/cargo/), the Rust package manager is available.\n\n```\ngit clone https://github.com/pemistahl/chr.git\ncd chr\ncargo build\n```\n\nThe source code is accompanied by some integration tests. For running them, simply say:\n\n```\ncargo test\n```\n\n## 5. \u003ca name=\"alternatives\"\u003e\u003c/a\u003e Alternatives \u003csup\u003e[Top ▲](#table-of-contents)\u003c/sup\u003e\n\nAn alternative tool named [*cha(rs)*](https://github.com/antifuchs/chars) already exists that targets\na similar purpose. Currently, it offers more character properties than *chr*. Unfortunately, it lacks \na proper command-line interface, paging, colorization, and the presented information is not neatly arranged, \nin my opinion. It also bundles all the UCD files in its repository which is not necessary and impedes \nmaintenance and future updates.\n\nWith *chr*, only the url to the new UCD version needs to be updated. Assuming that the format of the UCD \nfiles does not change between versions, this is all there is to it to provide *chr* with the newest data.\nThe data presentation is focused on readability and concentrates on the most essential properties for now.\nLast but not least, the fact that *chr* is backed by an SQL database allows for both complex and performant\nqueries, especially in later releases when the functionality gets extended.\n\n## 6. \u003ca name=\"contribution\"\u003e\u003c/a\u003e Do you want to contribute? \u003csup\u003e[Top ▲](#table-of-contents)\u003c/sup\u003e\n\nIn case you want to contribute something to *chr* even though it's in a very early stage of development,\nthen I encourage you to do so nevertheless. Do you have ideas for cool features? Or have you found any bugs so far?\nFeel free to open an issue or send a pull request. It's very much appreciated. :-)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpemistahl%2Fchr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpemistahl%2Fchr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpemistahl%2Fchr/lists"}