{"id":24490316,"url":"https://github.com/cptpiepmatz/tabledatamerge","last_synced_at":"2026-02-24T03:03:59.546Z","repository":{"id":82553361,"uuid":"231211826","full_name":"cptpiepmatz/TableDataMerge","owner":"cptpiepmatz","description":"🔀 Merge plain text tables together.","archived":false,"fork":false,"pushed_at":"2024-12-08T18:11:42.000Z","size":356,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T23:07:17.714Z","etag":null,"topics":["cli","data","format","latex","table","tdm"],"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/cptpiepmatz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-01-01T12:10:01.000Z","updated_at":"2024-12-25T02:26:23.000Z","dependencies_parsed_at":"2024-12-08T19:32:48.174Z","dependency_job_id":null,"html_url":"https://github.com/cptpiepmatz/TableDataMerge","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cptpiepmatz%2FTableDataMerge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cptpiepmatz%2FTableDataMerge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cptpiepmatz%2FTableDataMerge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cptpiepmatz%2FTableDataMerge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cptpiepmatz","download_url":"https://codeload.github.com/cptpiepmatz/TableDataMerge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794572,"owners_count":21162614,"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","format","latex","table","tdm"],"created_at":"2025-01-21T17:17:50.322Z","updated_at":"2025-10-26T14:09:02.135Z","avatar_url":"https://github.com/cptpiepmatz.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/cptpiepmatz/great-on-deck-search\"\u003e\n    \u003cimg width=\"256\" src=\"./icon/icon.svg\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eTableDataMerge\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003cb\u003e🔀 Merge plain text tables together.\u003c/b\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n  [![Version](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fcptpiepmatz%2FTableDataMerge%2Fmain%2FCargo.toml\u0026query=%24.package.version\u0026prefix=v\u0026style=for-the-badge\u0026label=version)](https://github.com/cptpiepmatz/TableDataMerge/releases)\n  [![License](https://img.shields.io/github/license/cptpiepmatz/TableDataMerge?style=for-the-badge)](https://github.com/cptpiepmatz/TableDataMerge/blob/master/LICENSE)\n  [![Rust](https://img.shields.io/badge/written%20in-rust-orange?style=for-the-badge)](https://www.rust-lang.org)\n\n\u003c/div\u003e\n\n\n\n## About\n\nTableDataMerge (alias 'tdm') is a versatile command-line tool designed to merge \nplain-text tables horizontally or vertically. \nIt supports various input and output data types, and offers cell formatting \noptions, including number formatting, prefixes, and suffixes.\n\n\n## Features\n\n- Merge tables horizontally or vertically\n- Supports various input and output data types \n- Offers cell formatting options \n- Number formatting \n- Ability to add prefixes and suffixes to cell values\n\n\n## Getting Started\n\nBuilt binaries for TableDataMerge are available for Windows and Linux, and can \nbe found at the \n[project's releases](https://github.com/cptpiepmatz/TableDataMerge/releases) \npage. \nSimply download the appropriate binary for your system.\n\nTo make the use of the tool more convenient, consider adding the binary to your \nPATH environment variable.\n\n\n## Supported Data Types\n\nTableDataMerge supports various input and output data types, providing great flexibility to fit different use cases.\n\n\n### Input Data Types\n\n- **CSV**:\n  [Comma Separated Values](https://en.wikipedia.org/wiki/Comma-separated_values)\n  is a simple and widely used data format that stores tabular data\n  (numbers and text) in plain-text form.\n\n- **DAT**:\n  [DAT](https://en.wikipedia.org/wiki/DAT_(file_format))\n  is a generic file extension for data files which can contain basic text or\n  binary, although in this context it is used to denote text-based tabular data\n  similar to CSV.\n\n- **JSON**:\n  [JavaScript Object Notation](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/JSON)\n  is a lightweight data-interchange format that is easy to read and write.\n  It is based on a subset of JavaScript language.\n\n- **M**:\n  Matlab tables, where the table data from Matlab is saved in a plain-text form.\n\n\n### Output Data Types\n\n- **CSV**:\n  [Comma Separated Values](https://en.wikipedia.org/wiki/Comma-separated_values)\n  for easy import into various spreadsheet tools or data analysis tools.\n\n- **DAT**:\n  [DAT](https://en.wikipedia.org/wiki/DAT_(file_format))\n  is often used for data exchange between applications written in different\n  programming languages.\n\n- **JSON**:\n  [JavaScript Object Notation](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/JSON)\n  for further use in web-based applications and data processing tools.\n\n- **MD**:\n  [Markdown](https://en.wikipedia.org/wiki/Markdown)\n  format for easy reading and writing of the data in text editors and for\n  display on websites like GitHub.\n\n- **TEX**:\n  [LaTeX](https://www.latex-project.org/about/)\n  source code for use in typesetting systems like LaTeX, providing beautifully\n  formatted and highly customizable output.\n\n\n## Usage\n\n```shell\ntdm [OPTIONS] \u003cTO\u003e \u003cFILES\u003e...\n```\n\n- **TO**: Output data type. \n  It specifies the output data type. \n  Possible values include: `csv`, `dat`, `tex`, `md`, `json`.\n\n- **FILES**: File paths. \n  It specifies input file paths and optional additional data. \n  Example: `example.csv`.\n\n\n## Options\n\n- **-o, --out**: \n  Sets the output file path. \n\n- **-p, --precision**: \n  Sets the number of decimal places for numerical values, which will be \n  correctly rounded. \n\n- **-d, --decimal-sep**: \n  Sets the decimal separator for numerical values. \n  Default is `dot`. \n\n- **-e, --exponent**: \n  Enables scientific notation for numerical cells (e.g., '1.234e+05'). \n\n- **-s, --sign**: \n  Forces a sign on every number. \n  By default, only negative values have a sign.\n\n- **-H, --hline**: \n  Inserts `\\hline` between lines when using `tex` output format. \n\n- **-c, --csv-sep**: \n  Specifies the value separator for `csv` output format. \n  Default is `,`. \n\n- **-P, --prefix**: \n  Sets prefixes for numerical cells. \n\n- **-S, --suffix**: \n  Sets suffixes for numerical cells. \n\n- **-v, --vertical**: \n  Stacks tables vertically instead of concatenating them horizontally.\n\n- **-h, --help**: \n  Prints help information.\n\n\n## Examples\n\n### Merging Two Tables with Precision and CSV Separator\n\n```shell\ntdm csv -o merged.csv -p 2 -c , table1.csv table2.dat\n```\n\nThis command merges `table1.csv` and `table2.dat`, sets the output data type as \n`csv`, sets the number of decimal places as `2`, and uses `,` as the csv \ndelimiter. \nThe resulting table will be saved in `merged.csv`.\n\n\n### Using Prefix and Suffix Options\n\n```shell\ntdm tex -P 0..3:$ -S 0..3:$ -S \"1: m$\" table.dat\n```\n\nThis command does not merging operation since only one table is given as input.\nIt will however do all the transformations given.\n\nFirst, the output format is specified as LaTeX ('tex') through the `tdm tex` \nportion of the command. \nThis ensures the final output will be suitable for inclusion in a LaTeX \ndocument.\n\nNext, the `-P 0..3:$` operation sets a prefix of a dollar sign `$` to the first \nthree numerical columns of the table. \nThis is achieved through the `0..3`: range specification, which is 0-indexed, \nmeaning it starts counting from 0.\n\nFollowing that, the `-S 0..3:$` operation appends a suffix of a dollar sign `$` \nto the same first three numerical columns. \nSo far, the command has instructed the program to wrap the values in the first \nthree numerical columns in dollar signs, effectively displaying them in math \nmode for latex.\n\nHowever, the `-S \"1: m$\"` command then specifies a change to the second column. \nIt alters the suffix for numerical values in the second column \n(again, remembering that column counting starts from 0), replacing the previous \n`$` suffix with ` m$`.\nRules applied later in the command will always override rules applied before.\n\nSo if we start this table:\n\n| Column1 | Column2 | Column3 | Column4 |\n|---------|---------|---------|---------|\n| 1       | 2       | 3       | 4       |\n| 5       | 6       | 7       | 8       |\n\nThe output would look something like this:\n```tex\nColumn1 \u0026 Column2 \u0026 Column3 \u0026 Column4 \\\\\n$1$ \u0026 $2 m$ \u0026 $3$ \u0026 4 \\\\\n$5$ \u0026 $6 m$ \u0026 $7$ \u0026 8\n```\n\n\n## Contributing\n\nIf you're interested in contributing to the development of TableDataMerge, \nfeel free to create a pull request. \nPlease ensure that your code follows the existing style guidelines. \u003cbr\u003e\n(`cargo fmt`, nothing more 😉)\n\n\n## Changelog\n\nFor a detailed list of changes in each version, please refer to the \n[CHANGELOG.md](https://github.com/cptpiepmatz/TableDataMerge/blob/master/CHANGELOG.md) \nin the repository.\n\n\n## License\n\nTableDataMerge is under the MIT license. \nFor more details, please see the \n[LICENSE](https://github.com/cptpiepmatz/TableDataMerge/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcptpiepmatz%2Ftabledatamerge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcptpiepmatz%2Ftabledatamerge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcptpiepmatz%2Ftabledatamerge/lists"}