{"id":16587912,"url":"https://github.com/adigitoleo/reshape","last_synced_at":"2026-06-06T00:31:30.603Z","repository":{"id":111294580,"uuid":"448736947","full_name":"adigitoleo/reshape","owner":"adigitoleo","description":"[MIRROR] Reshape delimited text files","archived":false,"fork":false,"pushed_at":"2024-02-11T03:56:30.000Z","size":505,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-12T03:46:24.711Z","etag":null,"topics":["command-line","nim"],"latest_commit_sha":null,"homepage":"https://sr.ht/~adigitoleo/reshape/","language":"Nim","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adigitoleo.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}},"created_at":"2022-01-17T03:03:25.000Z","updated_at":"2025-10-08T06:07:02.000Z","dependencies_parsed_at":"2024-02-11T04:27:10.636Z","dependency_job_id":null,"html_url":"https://github.com/adigitoleo/reshape","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/adigitoleo/reshape","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adigitoleo%2Freshape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adigitoleo%2Freshape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adigitoleo%2Freshape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adigitoleo%2Freshape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adigitoleo","download_url":"https://codeload.github.com/adigitoleo/reshape/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adigitoleo%2Freshape/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33965591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"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","nim"],"created_at":"2024-10-11T22:55:19.848Z","updated_at":"2026-06-06T00:31:30.568Z","avatar_url":"https://github.com/adigitoleo.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reshape\n\nReshape delimited text files.\n\nReads input from a file if the filename is given as the last argument.\nReads from `stdin` stream (e.g. unix pipe) otherwise, until terminated by an EOF signal.\nA filename argument of `-` can also be used to switch to `stdin` input.\nNote that the whole input is read into memory at once for processing.\n\n## Features\n\nThis utility can process tabular data by\n- transposing rows with columns\n- reshaping the data, e.g. turning a 4x4 table into a 8x2 table,\n- skipping selected rows/columns (individual or ranges),\n- deduplicating repeated rows,\n- padding cells to right-align table columns,\n- and printing information about input tables (e.g. number of rows/columns, number of malformed rows)\n\nFor some usage examples, refer to the [manual page](./doc/reshape.1.mdoc).\nIf you have [installed](#Install) `reshape`, you should be able to read it from `man reshape`.\nOtherwise the manual page source can be rendered on most Unix systems using `man -l /path/to/reshape.1.mdoc`.\n\n## Install\n\nAfter building the `reshape` binary, put it in one of your `$PATH` directories.\nThe manual page in the `doc` folder should also be copied into the appropriate manual page folder for your system.\n\n## Build\n\nBuilding reshape requires a Nim compiler (version 1.4.8 or later).\n\nRelease build: `nim c -d:release src/reshape.nim`\n\nDebug build: `nim c src/reshape.nim`\n\n## Test\n\nThe test suite requires [unittest2](https://github.com/status-im/nim-unittest2).\n\nRun `nimble test` in the source code root directory.\n\nLinux CI (dev build): [![builds.sr.ht status](https://builds.sr.ht/~adigitoleo/reshape.svg)](https://builds.sr.ht/~adigitoleo/reshape)\n\n## Use\n\nRun with the `--help` option if built, or check the `printHelp` proc in the code.\nNote that short options must not be separated from their arguments by a space.\nUse `:` or `=` instead, or append the argument to the option flag directly.\nThis behaviour is inherited from Nim's [parseopt][parseopt] module.\n\n## Contribute\n\nPlease submit patches or suggestions to the [project mailing list](https://lists.sr.ht/~adigitoleo/reshape-devel).\nPatches should be submitted against the HEAD of the `dev` branch on SourceHut.\n**Pull Requests on the GitHub mirror are not monitored.**\n\n## Similar solutions\n\n- [BSD's rs command](https://man.netbsd.org/rs.1)\n- [transposer](https://github.com/keithhamilton/transposer)\n- [GNU datamash](https://www.gnu.org/software/datamash/)\n- [Some ideas for transposing files using awk](https://stackoverflow.com/questions/1729824/an-efficient-way-to-transpose-a-file-in-bash)\n\n## TODO\n\n- More high-level tests (test examples from manual page?)\n- extract/generate help proc text from the mdoc source?\n- documentation for `--skip{rows,cols}=1-2-3` (start-step-stop) syntax\n- better upfront error handling\n\n[parseopt]: https://nim-lang.org/docs/parseopt.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadigitoleo%2Freshape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadigitoleo%2Freshape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadigitoleo%2Freshape/lists"}