{"id":17360918,"url":"https://github.com/gnikit/fileio","last_synced_at":"2026-05-04T02:36:01.877Z","repository":{"id":104928455,"uuid":"135904122","full_name":"gnikit/FileIO","owner":"gnikit","description":"A template allowing to read multiple columns of tab or space delimited files. Similar functionality to numpy.loadtxt()","archived":false,"fork":false,"pushed_at":"2020-05-24T13:01:03.000Z","size":8897,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T16:38:10.055Z","etag":null,"topics":["cpp","file-io","library","numpy"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gnikit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-06-03T12:56:21.000Z","updated_at":"2021-11-24T01:13:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"9c87dd18-a4a1-458a-99c9-a6e1234c9e5d","html_url":"https://github.com/gnikit/FileIO","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gnikit/FileIO","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnikit%2FFileIO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnikit%2FFileIO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnikit%2FFileIO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnikit%2FFileIO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gnikit","download_url":"https://codeload.github.com/gnikit/FileIO/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnikit%2FFileIO/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32592715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"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":["cpp","file-io","library","numpy"],"created_at":"2024-10-15T19:29:00.303Z","updated_at":"2026-05-04T02:36:01.857Z","avatar_url":"https://github.com/gnikit.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FileIO: Easy to use file-reading/writting template\n\n[![Build Status](https://travis-ci.com/GNikit/FileIO.svg?branch=master)](https://travis-ci.com/GNikit/FileIO)\n\n## Description\n\nA simple header only implementation read/write template class for:\n\n1. Writting 2D and 1D vectors in ASCII to file\n2. Reading whole or partial (certain columns) ASCII files into 2D and 1D vectors\n3. Displaying 2D and 1D vectors\n\nThe class offers support for writing vectors to files in by using\none of two formats:\n\n- Row major (each vector is a row in the output file)\n- Column major (each vector is a column in the output file)\n\nSimilar functionality to `numpy.loadtxt()`.\nReturns a `vector\u003cvector\u003cT\u003e\u003e` of the read columns.\nIn the case where the user-defined columns *n* are less than the file columns,\n`ReadFile()` will read only the first *n* columns.\n\n## Usage\n\nSample code reading and writing a 2D vector\n\n```C++\n#include \"FileIO.h\"\n\nint main() {\n\n  FileIO file;\n  // Load 2D vector from file\n  // args: filename, file columns, comment char, format=1:column-major\n  std::vector\u003cstd::vector\u003cdouble\u003e\u003e test = file.ReadFile\u003cdouble\u003e(\"example.log\", 2, '#');\n  // Write 2D vector to file\n  // args: 2D vector, filename, delimiter\n  file.Write2File\u003cdouble\u003e(test, \"example_copy.log\", \" \");\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnikit%2Ffileio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnikit%2Ffileio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnikit%2Ffileio/lists"}