{"id":13496544,"url":"https://github.com/Viatorus/quom","last_synced_at":"2025-03-28T18:32:13.027Z","repository":{"id":47745148,"uuid":"157917554","full_name":"Viatorus/quom","owner":"Viatorus","description":"Quom generates a single header file from your for C/C++ sources. This is also known as amalgamation.","archived":false,"fork":false,"pushed_at":"2023-04-15T11:10:30.000Z","size":603,"stargazers_count":166,"open_issues_count":4,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-26T03:08:37.889Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/Viatorus.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}},"created_at":"2018-11-16T20:23:18.000Z","updated_at":"2025-02-15T10:27:52.000Z","dependencies_parsed_at":"2024-01-16T09:54:17.829Z","dependency_job_id":"64f2d237-3b1a-47fa-94d4-3ff70ee66d31","html_url":"https://github.com/Viatorus/quom","commit_stats":{"total_commits":78,"total_committers":1,"mean_commits":78.0,"dds":0.0,"last_synced_commit":"c7ea403ba93d26b60e27eaf43affd71d95a76265"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Viatorus%2Fquom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Viatorus%2Fquom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Viatorus%2Fquom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Viatorus%2Fquom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Viatorus","download_url":"https://codeload.github.com/Viatorus/quom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246080811,"owners_count":20720597,"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":[],"created_at":"2024-07-31T19:01:51.299Z","updated_at":"2025-03-28T18:32:08.018Z","avatar_url":"https://github.com/Viatorus.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"![logo](https://raw.githubusercontent.com/Viatorus/quom/master/artwork/logo_banner.png)\n\n[![Build Status](https://github.com/Viatorus/quom/workflows/Testing/badge.svg)](https://github.com/viatorus/quom/actions)\n[![PyPI](https://img.shields.io/pypi/v/quom.svg)](https://pypi.org/project/Quom/)\n\n\n# Quom\nQuom is a single file generator for C/C++.\n\nIt resolves all included local headers starting with your main C/C++ file. This is also known as amalgamation.\n\nAfterwards, it tries to find the related source files and their headers and places them at the end of the main file\nor at a specific stitch location if provided.\n\nAt the end there will be one single file with all your header and sources joined together.\n\n## Installation\n\n```\npip install --user quom\n```\n\nRequires Python 3.7 or later.\n\n## How to use it\n\n```\nusage: quom [-h] [--stitch format] [--include_guard format] [--trim]\n            input output\n\nSingle header generator for C/C++ libraries.\n\npositional arguments:\n  input                 Input file path of the main file.\n  output                Output file path of the generated single header file.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --stitch format, -s format\n                        Format of the comment where the source files should be placed\n                        (e.g. // ~\u003e stitch \u003c~). Default: None (at the end of the main file)\n  --include_guard format, -g format\n                        Regex format of the include guard. Default: None\n  --trim, -t            Reduce continuous line breaks to one. Default: True\n  --include_directory INCLUDE_DIRECTORY, -I INCLUDE_DIRECTORY\n                        Add include directories for header files.\n  --source_directory SOURCE_DIRECTORY, -S SOURCE_DIRECTORY\n                        Set the source directories for source files.\n                        Use ./ in front of a path to mark as relative to the header file.\n  --encoding ENCODING, -e ENCODING\n                        The encoding used to read and write all files.\n```\n\n## Simple example\n\nThe project:\n\n```\n|-src/\n|  |-foo.hpp\n|  |-foo.cpp\n|   -main.cpp\n|-out/\n    -main_gen.cpp\n```\n\n*foo.hpp*\n\n```cpp\n#pragma once\n\nint foo();\n```\n\n*foo.cpp*\n\n```cpp\n#include \"foo.hpp\"\n\nint foo() {\n    return 0;\n}\n```\n\n*main.cpp*\n\n```cpp\n#include \"foo.hpp\"\n\nint main() {\n    return foo();\n}\n```\n\nThe command:\n\n```\nquom src/main.hpp main_gen.cpp\n```\n\n*main_gen.cpp*\n\n```cpp\nint foo();\n\nint main() {\n    return foo();\n}\n\nint foo() {\n    return 0;\n}\n```\n\n## Advanced example\n\nThe project:\n\n```\n|-src/\n|  |-foo.hpp\n|  |-foo.cpp\n|   -foobar.hpp\n|-out/\n    -foobar_gen.hpp\n```\n\n*foo.hpp*\n\n```cpp\n#pragma once\n\n#ifndef FOOBAR_FOO_HPP\n#define FOOBAR_FOO_HPP\n\nextern int foo; \n\n#endif\n```\n\n*foo.cpp*\n\n```cpp\n#include \"foo.hpp\"\n\nint foo = 42;\n```\n\n*foobar.hpp*\n\n```cpp\n#pragma once\n\n#ifndef FOOBAR_HPP\n#define FOOBAR_HPP\n\n#include \"foo.hpp\"\n\n#endif\n\n#ifdef FOO_MAIN\n\n// ~\u003e stitch \u003c~\n\n#endif\n```\n\nThe command:\n\n```\nquom src/foobar.hpp foobar_gen.hpp -s \"~\u003e stitch \u003c~\" -g FOOBAR_.+_HPP\n```\n\n*foobar_gen.hpp*\n\n```cpp\n#pragma once\n\n#ifndef FOOBAR_HPP\n#define FOOBAR_HPP\n\nextern int foo;\n\n#endif\n\n#ifdef FOO_MAIN\n\nint foo = 42;\n\n#endif\n```\n\nTake a look into the [examples folder](examples/) for more.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FViatorus%2Fquom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FViatorus%2Fquom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FViatorus%2Fquom/lists"}