{"id":28578697,"url":"https://github.com/diabhey/ab-print","last_synced_at":"2025-06-11T01:10:56.393Z","repository":{"id":144445539,"uuid":"197982123","full_name":"diabhey/ab-print","owner":"diabhey","description":"A flexible header only print library ","archived":false,"fork":false,"pushed_at":"2024-02-04T08:09:28.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-02-04T09:23:53.874Z","etag":null,"topics":["header-only","library","logging","print"],"latest_commit_sha":null,"homepage":null,"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/diabhey.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}},"created_at":"2019-07-20T21:21:25.000Z","updated_at":"2024-02-04T09:23:58.125Z","dependencies_parsed_at":"2024-02-04T09:38:35.647Z","dependency_job_id":null,"html_url":"https://github.com/diabhey/ab-print","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diabhey%2Fab-print","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diabhey%2Fab-print/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diabhey%2Fab-print/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diabhey%2Fab-print/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diabhey","download_url":"https://codeload.github.com/diabhey/ab-print/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diabhey%2Fab-print/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259178542,"owners_count":22817389,"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":["header-only","library","logging","print"],"created_at":"2025-06-11T01:10:55.762Z","updated_at":"2025-06-11T01:10:56.385Z","avatar_url":"https://github.com/diabhey.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ab-print\nA generic header-only print library for C++. It can be considered a flexible alternative to streams.\n\n```c++\n#include \u003carray\u003e\n#include \u003cdeque\u003e\n#include \u003ciostream\u003e\n#include \u003clist\u003e\n#include \u003cvector\u003e\n#include \u003cprint.hpp\u003e\n\nint main() {\n  ab::print(std::cout, \"\\n vector:\", std::vector\u003cint\u003e{1, 2, 3, 4, 5},\n            \"\\n deque:\", std::deque\u003cint\u003e{1, 2, 3, 4, 5},\n            \"\\n list:\", std::list\u003cint\u003e{1, 2, 3, 4, 5},\n            \"\\n array:\", std::array\u003cint, 5\u003e{1, 2, 3, 4, 5});\n  return EXIT_SUCCESS;\n}\n```\n\nTo get started, see [Requirements](#requirements) and [Installation](#installation).\nSee [Usage](#usage) for a full example.\n\n## Requirements\nThe library requires C++14 to build, including compiler and standard library support.\nThe following minimum versions are required to build the library:\n\n* GCC 5\n* Clang 3.8\n* clang-tidy (not mandatory)\n\n## Installation\n\nThis describes the installation process using cmake. As prerequisites, you'll need git and cmake installed.\n```bash\n# Check out the library.\n$ git clone https://github.com/bigillu/ab-print.git\n\n# Initialise the git modules\n$ git submodule init \u0026\u0026 git submodule update\n\n# Make a build directory to place the build output.\n$ mkdir build \u0026\u0026 cd build\n# Generate a Makefile with cmake.\n$ cmake ..\n# Build the library.\n$ make\n```\nThis builds the `abprint` library and `example`.\n\n## Usage\n### Example\nThe ab-print library has a simple, straightforward API. `ab::print(std::ostream, data types...)`.\nFind below a full example that demonstrates the usage for different data types.\n\n```c++\n#include \u003carray\u003e\n#include \u003cdeque\u003e\n#include \u003ciostream\u003e\n#include \u003clist\u003e\n#include \u003cmap\u003e\n#include \u003cset\u003e\n#include \u003cvector\u003e\n#include \u003cprint.hpp\u003e\n\nint main() {\n  // Testing basic data types\n  ab::print(std::cout, \"\\n char:\", char{'a'}, \"\\n int\", int{7}, \"\\n double\",\n            double{2.2});\n  // Testing sequential containers\n  ab::print(std::cout, \"\\n vector:\", std::vector\u003cint\u003e{1, 2, 3, 4, 5},\n            \"\\n deque:\", std::deque\u003cint\u003e{1, 2, 3, 4, 5},\n            \"\\n list:\", std::list\u003cint\u003e{1, 2, 3, 4, 5},\n            \"\\n array:\", std::array\u003cint, 5\u003e{1, 2, 3, 4, 5});\n  // Testing associative containers\n  ab::print(std::cout, \"\\n set:\", std::set\u003cstd::string\u003e{\"One\", \"Two\", \"Three\"},\n            \"\\n multiset:\", std::multiset\u003cint, std::greater\u003cint\u003e\u003e{1, 1, 1},\n            \"\\n map:\",\n            std::map\u003cstd::string, int\u003e{{\"One\", 1}, {\"Two\", 2}, {\"three\", 3}},\n            \"\\n multimap:\",\n            std::multimap\u003cstd::string, int\u003e{\n                {\"GroupOne\", 1}, {\"GroupOne\", 2}, {\"GroupOne\", 3}});\n  return EXIT_SUCCESS;\n}\n```\nTo run the above example,\n```bash\ncd build/example\n./example\n```\n\n## Author\n[diabhey](http://www.twitter.com/diabhey) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiabhey%2Fab-print","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiabhey%2Fab-print","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiabhey%2Fab-print/lists"}