{"id":23157237,"url":"https://github.com/antonijn/text-tools","last_synced_at":"2025-07-30T03:42:21.994Z","repository":{"id":72536476,"uuid":"93260385","full_name":"antonijn/text-tools","owner":"antonijn","description":"A set of programs designed to be used with a text editor I'm currently working on. The programs themselves are generic programs that can be used for some stream-based text editing tasks.","archived":false,"fork":false,"pushed_at":"2017-08-27T14:49:20.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T17:48:05.155Z","etag":null,"topics":["command-line-tool","python","python3","unix","unix-command"],"latest_commit_sha":null,"homepage":"","language":"Roff","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antonijn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2017-06-03T16:29:51.000Z","updated_at":"2017-07-11T10:14:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6857166-d7b1-4527-89cb-a54303d08d94","html_url":"https://github.com/antonijn/text-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/antonijn/text-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonijn%2Ftext-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonijn%2Ftext-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonijn%2Ftext-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonijn%2Ftext-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antonijn","download_url":"https://codeload.github.com/antonijn/text-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonijn%2Ftext-tools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267804103,"owners_count":24146537,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["command-line-tool","python","python3","unix","unix-command"],"created_at":"2024-12-17T21:16:39.398Z","updated_at":"2025-07-30T03:42:21.957Z","avatar_url":"https://github.com/antonijn.png","language":"Roff","funding_links":[],"categories":[],"sub_categories":[],"readme":"# text-tools\n`text-tools` is a set of programs designed to be used with a text\neditor I'm currently working on. The programs themselves are\ngeneric programs that can be used for some stream-based text\nediting tasks.\n\nThese programs are:\n* `add`, `mul` for adding and multiplying the numbers represented by the\n  lines of stdin\n* `cmt` for commenting out text\n* `hello` for printing the hello world program in a given language\n* `i`, `ui` for indenting and unindenting text\n* `j` for joining lines together\n* `lic` for printing out license text\n* `sc`, `up`, `lo` for swapping, resp. changing to upper and lower case of text\n* `spt` for splitting function calls and declarations over multiple lines\n* `u` for acquisition of Unicode characters not present in US-ASCII\n\nSome of the parameters for these programs are set through environment\nvariables (although there are usually command-line arguments that\nallow you to set them as well), such as `SRC_LANG` for the\nprogramming langauge that is used, or `SRC_INDENT` for the indentation\nstring that is used.\n\nThe programs are written in Python 3, and should be cross-platform\n(although some programs are implemented as symbolic links, somewhat\ncrippling Windows support). If you want to be able to use the\nprograms anywhere, you can of course add the `bin` folder to your\n`PATH` environment variable.\n\n## Examples\n### lic, cmt, hello\nLet's say you have a burning desire to write a \"hello world\" C program,\nbut you can't be bothered to type it out. Also you'd like to claim it\nas your own intellectual property and add the ISC license to the top.\n\nJust use:\n\n```bash\n$ (export SRC_LANG=c; lic isc | cmt -d; echo; hello) \u003e main.c\n```\n\nBehold how `main.c` now contains just what you requested.\n\n### u\nLet's say you're learning Icelandic, but can't be bothered to change your\nkeyboard layout to Icelandic, or even US-Intl. `u` is the program for you!\nSimply make a `.config` directory in any parent directory of your current\nworking directory, and place a file called `urc` in it, containing:\n\n```json\n{\n\t\"ae\": \"æ\",\n\t\"th\": \"þ\",\n\t\"dh\": \"ð\",\n\n\t\"'\": \"\\u0301\",\n\t\"\\\"\": \"\\u0308\"\n}\n```\n\nLo and behold:\n\n```bash\n$ u ae\næ\n$ u ae | up\nÆ\n$ u o \\\"\nö\n```\n\n## License\nCopyright (c) 2017, Antonie Blom\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonijn%2Ftext-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonijn%2Ftext-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonijn%2Ftext-tools/lists"}