sourcemerger is a command-line tool that generates a single-header C++ library from your source code.
Project description
sourcemerger is a Python command-line tool that generates a single-header C++ library from your source code.
It takes as input your headers and implementation files and outputs one .h file (with include guards) and one .cpp file.
Quickstart
Requirements
You'll need Python 3.6 or newer.
Install
sourcemerger is installed via pip, the Python package installer:
pip install sourcemerger
Usage
Point sourcemerger to the headers and implementation files of your library, choose what name to give to the two output files and specify a destination folder:
sourcemerger -e path/to/your/headers -s path/to/your/impl_files -n your_library_name -d path/to/destination
Options
-e, --headers HEADERS_FOLDER Path to the folder that contains the headers (both .h and .hpp headers are supported)
-s, --sources IMPL_FOLDER Path to the folder that contains the implementation files (i.e. the .cpp files)
-n, --name LIBRARY_NAME Name of the output library files (.h and .cpp extensions are appended automatically)
-d, --dest DEST_FOLDER Path to save the output files in (optional; default is current dir)
-v, --verbose Enable verbose output
-h, --help Show this help message and exit
--version Show version number and exit
Versioning
sourcemerger uses Semantic Versioning.
Public API
As per semver requirements, the public API of sourcemerger is hereby declared as consisting of:
- its command-line options;
- its top-level function
merge_files, which you may import into your project (e.g.from sourcemerger import merge_files).
License
sourcemerger is released under MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sourcemerger-1.0.0.tar.gz.
File metadata
- Download URL: sourcemerger-1.0.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5b14d9ef3c429334da93e8846ec86738330b4c0f80fef99a6e99d11ba4ff67d
|
|
| MD5 |
289a85ee759630beff979173bd795768
|
|
| BLAKE2b-256 |
7cdd9d605092537341287b81169d48b731820ebb8e064382162a33465cda855f
|
File details
Details for the file sourcemerger-1.0.0-py3-none-any.whl.
File metadata
- Download URL: sourcemerger-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffa1b97e784ae044afd049102d54a7abd08c1f4d3c46b7d0c31929bbf8481513
|
|
| MD5 |
9a4e27cc0761adfdfaae869504eee553
|
|
| BLAKE2b-256 |
79df3f5f635d2075c5f71717e0b80db1b3eb893319eef608c8c164ffc3f8086a
|