Skip to content

Commit 9fd2021

Browse files
committed
docs: Relicense under MIT and refactor documentation to markdown
1 parent 5c575b2 commit 9fd2021

7 files changed

Lines changed: 80 additions & 723 deletions

File tree

LICENSE.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# MIT License
2+
3+
Copyright (c) 2019-2025 peter277 ([https://github.com/peter277](https://github.com/peter277))
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+
23+
# Acknowledgments
24+
25+
sqlcw incorporates components based on the work of:
26+
27+
- The Boost C++ Libraries project, distributed under the [Boost Software License Version 1.0](doc/library-licenses/LICENSE_BOOST-1.0.txt)
28+
29+
- Application executable icon made by [Becris from Flaticon.com](https://www.flaticon.com/authors/becris)
30+
31+
- Windows installer packaged using [Inno Setup](https://github.com/jrsoftware/issrc), incorporating a modified [modpath.iss](installer/modpath.iss) helper script by Jared Breland for Windows PATH modification

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<img src="icon/workflow.png" align="left" width="80" height="80" style="margin-right: 10px; margin-bottom: 10px;" alt="LOGO">
2+
3+
# sqlcw - SQL Code Wrapper
4+
**A lightweight preprocessor for embedding SQL code in host programming languages**
5+
<br clear="left"/>
6+
7+
sqlcw wraps SQL statements with configurable prefix and suffix strings, making it easy to embed SQL in C++, Python, or other languages. For example, wrapping with prefix `execute(` and suffix `) by cnxn;` transforms standalone SQL into ready-to-use function calls.
8+
9+
The tool is SQL syntax-aware and correctly handles quoted strings, identifiers, and comments. Additional options allow you to strip or convert comments and simplify whitespace.
10+
11+
## Usage
12+
sqlcw is invoked from the command line. Run with `sqlcw --help` to see all available program options:
13+
<pre>
14+
Options:
15+
16+
Generic:
17+
-v [ --version ] Print version string
18+
-h [ --help ] Display this help information
19+
20+
Configuration:
21+
-p [ --prefix ] arg Prefix to place before SQL statements
22+
-s [ --suffix ] arg Suffix to place after SQL statements
23+
-t [ --top ] arg Header to place at top of output files
24+
-b [ --bottom ] arg Footer to place at bottom of output files
25+
-o [ --out-dir ] arg (=sqlcw-out) Directory to write output files
26+
-x [ --out-ext ] arg Extension of output files
27+
-m [ --comments ] arg (=convert) Handling of comments: 'strip' or 'convert'
28+
to /* */ style
29+
-w [ --whitespace ] arg Whitespace processing switches list
30+
(multitoken option). Values:
31+
single: compress multiple whitespace
32+
characters into one (excl.
33+
newline)
34+
nonewline: strip off newlines from
35+
output
36+
--strip-semicolons Strip semicolons from SQL statements
37+
</pre>
38+
39+
## License
40+
41+
sqlcw is distributed under the [MIT License](LICENSE.md). See the license file for full details and third-party attributions.

0 commit comments

Comments
 (0)