{"id":16854658,"url":"https://github.com/philpennock/character","last_synced_at":"2025-03-17T05:32:15.208Z","repository":{"id":57589257,"uuid":"42696614","full_name":"philpennock/character","owner":"philpennock","description":"tool for character manipulations","archived":false,"fork":false,"pushed_at":"2025-03-14T05:06:45.000Z","size":3277,"stargazers_count":29,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-14T05:29:04.500Z","etag":null,"topics":["codepoints","tables","unicode","unicode-characters","utility"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/philpennock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2015-09-18T03:11:35.000Z","updated_at":"2025-03-14T05:06:48.000Z","dependencies_parsed_at":"2024-06-20T15:29:37.557Z","dependency_job_id":"7ae4254c-c260-4402-bda2-c33d06c344f7","html_url":"https://github.com/philpennock/character","commit_stats":null,"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philpennock%2Fcharacter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philpennock%2Fcharacter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philpennock%2Fcharacter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philpennock%2Fcharacter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philpennock","download_url":"https://codeload.github.com/philpennock/character/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243846976,"owners_count":20357294,"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":["codepoints","tables","unicode","unicode-characters","utility"],"created_at":"2024-10-13T13:56:17.002Z","updated_at":"2025-03-17T05:32:15.199Z","avatar_url":"https://github.com/philpennock.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"character\n=========\n\n[![Continuous Integration](https://github.com/philpennock/character/actions/workflows/pushes.yaml/badge.svg)](https://github.com/philpennock/character/actions/workflows/pushes.yaml)\n\nThis is a tool for various manipulations on characters, as characters rather\nthan full strings, to show names, encodings and more.\n\nThe tool is structured as a top-level command, options, and sub-commands which\ncan do different things.  Many sub-commands will take a `-v` verbose option,\nwhich gives more detail in a pretty-printed table.\n\n```console\n$ character help\n[... lists all available sub-commands ...]\n$ character version\n[...]\n$ character search check\n[... table of results; search is convenience alias ...]\n$ character name ✓\nCHECK MARK\n$ character named -h\n[...]\n$ character named 'CHECK MARK'\n✓\n$ character named -j CHECK MARK\n✓\n$ character named -v/ check\n[... table of results of substring search ...]\n$ character browse -b 'Alchemical Symbols'\n[... table of results; browse is always a table ...]\n$ character transform fraktur Hello world\nℌ𝔢𝔩𝔩𝔬 𝔴𝔬𝔯𝔩𝔡\n$ character transform scream Hello world\nA̰áăăå ȁåȃăa̱\n$ character transform scream --decode \\\n    $(character transform scream Hello world)\nHello world\n$ character named -1c 'INFORMATION DESK PERSON' \\\n    'EMOJI MODIFIER FITZPATRICK TYPE-5'\n💁🏾\n```\n\nIn the last example, note that `-c` copies to clipboard; using `-vc` shows the\nresults in a table but copies only the characters to the clipboard.  Without\n`--oneline` (`-1`) each non-verbose character is shown on its own line.  In\nthis example we're using an emoji modifier which needs to immediately follow\nthe modified character, so `-1c` _should_ show you the same thing that is\ncopied to the clipboard where `-c` on its own would show you the individual\nparts while copying the modified/combined whole to the clipboard.\n\n\u003cimg src=\".web-assets/images/character-smiling_4bfca881.png\"\n     alt=\"character named -v/ smiling\"\n     title=\"character named -v/ smiling\"\n     width=\"900\" height=\"312\"\u003e\n\n\u003cimg src=\".web-assets/images/smiling-json_71ca3acd.png\"\n     alt=\"character named -Jj SMILING CAT FACE WITH OPEN MOUTH\"\n     title=\"character named -Jj SMILING CAT FACE WITH OPEN MOUTH\"\n     width=\"400\" height=\"266\"\u003e\n\n\n[Licensed](./LICENSE.txt) under a MIT-style license.  \n[Accumulated licenses of all dependencies](./LICENSES_all.txt) are available\ntoo.  \nPatches welcome.\n\n\nBuilding\n--------\n\nInstall without downloading manually with `go install`:\n\n```sh\ngo install -v github.com/philpennock/character@latest\n```\n\n--------------------------------------------------\n\nRun: `go build`\n\nAssuming defaults, install into `~/go/bin/` with: `go build`\n\nThis software uses Go Modules and requires a sufficiently recent version of\nGo.  Clone this repo anywhere, don't worry about `$GOPATH` or such things\n(assuming Go 1.12 or newer).\n\nIf you are on an older Go, look for the last release in the `v0.3.x` series.\n\n### WASM\n\nRun: `./util/make_wasm.sh`\n\nA directory `wasm` will be created; the `character` binary will be compiled\ninto there as `main.wasm`; a supporting HTML page will be copied in, as well\nas the Golang `wasm_exec.js` support page.\n\nRun a web-server which serves up the content of the `wasm/` directory and see\nhow it works.  We should perhaps have a way to default to verbose mode (for\ntables) to better support this use-case.\n\n**SECURITY NOTE**: Note: to have tables work, I switched from `innerText` to\n`innerHTML`, but this early proof-of-concept is not escaping output to be\nproof against HTML injection attacks.  In particular, an unknown command will\nbe echo'd back in the error message, as is fairly common for Unix CLI tools.\nWe could use a separate output area for errors and use `innerText` for that,\nbut that doesn't solve, eg, the output of transform commands which\ndeliberately make reversible changes to input and displays it.\n\nSo don't put this up somewhere public, at least not in a domain with access to\nany cookies or other credentials worth stealing.  But it's a useful toy to\nexplore with.  Well, it was for me: \"My First WASM\".\n\n\n\nTable packages\n--------------\n\nRendering content to tables requires a table package.  We default to my own\npackage, `go.pennock.tech/tabular`.  We originally used\n`github.com/apcera/termtables` and briefly tried\n`github.com/olekukonko/tablewriter` before switching to writing my own.\n\n(Apcera's repositories have disappeared, the most widespread fork of\n`termtables` appears to be `github.com/xlab/tablewriter`).\n\nYou can use Go build tags to switch the table package used.  I might remove\nsupport for this in the future.\n\n\nAlternatives\n------------\n\n* `uni` by Martin Tournoij: \u003chttps://github.com/arp242/uni\u003e,\n  `go get arp242.net/uni`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilpennock%2Fcharacter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilpennock%2Fcharacter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilpennock%2Fcharacter/lists"}