{"id":18378692,"url":"https://github.com/vitusveit/tsvparser","last_synced_at":"2025-04-11T08:33:10.261Z","repository":{"id":170460994,"uuid":"646599659","full_name":"VitusVeit/TSVParser","owner":"VitusVeit","description":"A simple and easy-to-use C++ TSV Parser, it can read TSV files, modify them, and export them","archived":false,"fork":false,"pushed_at":"2023-06-06T21:48:24.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T22:43:18.833Z","etag":null,"topics":["cpp","cpp11","tsv","tsv-parser","tsv-reader"],"latest_commit_sha":null,"homepage":"","language":"C++","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/VitusVeit.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":"2023-05-28T22:39:54.000Z","updated_at":"2023-06-12T19:51:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"1df8c488-6ad6-4ac1-8998-380790ec19dc","html_url":"https://github.com/VitusVeit/TSVParser","commit_stats":null,"previous_names":["vitusveit/tsvparser"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitusVeit%2FTSVParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitusVeit%2FTSVParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitusVeit%2FTSVParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitusVeit%2FTSVParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VitusVeit","download_url":"https://codeload.github.com/VitusVeit/TSVParser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248361536,"owners_count":21090923,"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":["cpp","cpp11","tsv","tsv-parser","tsv-reader"],"created_at":"2024-11-06T00:34:50.384Z","updated_at":"2025-04-11T08:33:10.237Z","avatar_url":"https://github.com/VitusVeit.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TSVParser v 1.2.0 🖋️\nA simple and easy-to-use C++ TSV Parser, it can read TSV files, modify them, and export them.\n\nFor now, it only supports strings (that for a TSV Parser is probably enough) but I'll be working on adding more types if I have time.  \nEverything is inside a single header file `tsvParser`, just download it, put it in your project, and you're good to go!\n\n# Examples ⚙️\nWith TSVParser, you can access TSV files like they're two-dimensional arrays and add or remove rows and columns with `+=/-=` like they're strings:\n```cpp\ntsv::File myFile;\n\n// You can create a row by a vector of strings.\nmyFile[0] = {{\"Name\"}, {\"Age\"}, {\"Job\"}, {\"NA\"}};\n\nmyFile += {{\"Frank Freeman\"}, {\"45\"}, {\"Nuclear Scientist\"}};\n\n// Or add them manually.\ntsv::Row r1;\n\nr1 += \"Mario Rossi\";\nr1 += \"25\";\n\nmyFile += r1;\n\nmyFile[2] += \"Bean Counter\";\n\n// You can also access individual columns given their rows.\nmyFile[2][1] = \"32\";\n\n// You can remove a specific value from a row.\nmyFile[0] -= \"NA\";\n\n// Use 'ToString' to convert the TSV class to a text format.\nstd::cout \u003c\u003c myFile.ToString() \u003c\u003c '\\n';\n```\nResult: 🫘\n| Name | Age | Job |\n|:--- |:--- |:--- |\n| Frank Freeman | 45 | Nuclear Scientist |\n| Mario Rossi | 32 | Bean Counter |\n\nOf course, we can also load and export TSV files:\n```cpp\ntsv::File antherFileOfMine;\n\n// You can open other files or read from strings with 'OpenFile' and 'OpenString'.\nantherFileOfMine.OpenFile(\"test.tsv\");\n\n// Modify it a bit...\nantherFileOfMine[3][0] = \"Chocolate Bar\";\n\n// ...and also export it to a file or turn it into a string with 'ToFile' and 'ToString'!\nantherFileOfMine.ToFile(\"shoppingList.tsv\");\n```\nResult: 🍫\n| Product | Quantity | Price |\n|:--- |:--- |:---|\n| Apple | 4 | 2,5 |\n| Bread | 1 | 5 |\n| Chocolate Bar | 5 | 1,2 |\n\nSince version `1.1.0`, TSV files have now support for numbers:\n```cpp\ntsv::File myFile;\n\nmyFile[0] = {{\"Integer\"}, {\"Decimal\"}, {\"Exponential\"}};\n\n// Create a row.\ntsv::Row r1;\n\n// You can add integer and double numbers directly.\nr1 += 4;\nr1 += 2.2;\n\n// Or add a string that follows the Google Sheets format or other spreadsheet editors.\nr1[1] += \"2,24\";\n\n// You add exponential numbers too, both directly and by string!\nr1 += 2.3e+2;\nr1[2] = \"2.3e+2\";\n\n// Add the row to the file.\nmyFile += r1;\n\nstd::cout \u003c\u003c myFile.ToString() \u003c\u003c '\\n';\n```\nResult: 🔢\n| Integer | Decimal | Exponential |\n|:--- |:--- |:--- |\n| 4 | 4,44 | 2,3e+2 |\n\n**NOTE**: In most spreadsheet editors, decimal numbers that use `.` instead of `,` to separate integers from decimals are considerated text. So when converting to a string/file, TSVParser will change all `.` contained in numbers to `,` for compatibility.\n\nSince version `1.2.0`, TSV files have now support for search *by value*, like you would do with a book: you first search for the title, and then for the arguments:\n```cpp\ntsv::File f;\n\nf += {{\"Name\"}, {\"Frank\"}, {\"Mario\"}, {\"Gordon\"}};\n\nf += {{\"Age\"}, {22}, {44}, {55}};\n\nf += {{\"Height\"}, {5.6}, {4.89f}, {\"32,22\"}};\n\nstd::cout \u003c\u003c f[\"Height\"][3].GetPreciseNumber() \u003c\u003c '\\n';\n```\nResult: 🔖  \n`32.22`\n\n# License ⚖️\nThis library is under the MIT License, which means you can use this Parser for anything but I won't be liable for damages that this Parser could cause.\nIf you want to know more, you can check out the `LICENSE` file or the text written at the top of the `tsvParser.hpp` header.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitusveit%2Ftsvparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitusveit%2Ftsvparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitusveit%2Ftsvparser/lists"}