Skip to content

Commit 2c4f032

Browse files
committed
Updated README.md for #29
1 parent e4cd76f commit 2c4f032

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Build:
1818
| Service/Platform | Build | Tests |
1919
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
2020
| AppVeyor | [![Build status](https://img.shields.io/appveyor/ci/end2endzone/bin2cpp/master.svg?logo=AppVeyor&logoColor=white)](https://ci.appveyor.com/project/end2endzone/bin2cpp) | [![Tests status](https://img.shields.io/appveyor/tests/end2endzone/bin2cpp/master.svg?logo=AppVeyor&logoColor=white)](https://ci.appveyor.com/project/end2endzone/bin2cpp/branch/master/tests) |
21-
| Travis CI | [![Build Status](https://img.shields.io/travis/end2endzone/bin2cpp/master.svg?logo=Travis-CI&style=flat&logoColor=white)](https://travis-ci.org/end2endzone/bin2cpp) | |
2221
| Windows Server 2019 | [![Build on Windows](https://github.com/end2endzone/bin2cpp/actions/workflows/build_windows.yml/badge.svg)](https://github.com/end2endzone/bin2cpp/actions/workflows/build_windows.yml) | [![Tests on Windows](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/end2endzone/58cf6c72c08e706335337d5ef9ca48e8/raw/bin2cpp.master.Windows.json)](https://github.com/end2endzone/bin2cpp/actions/workflows/build_windows.yml) |
2322
| Ubuntu 20.04 | [![Build on Linux](https://github.com/end2endzone/bin2cpp/actions/workflows/build_linux.yml/badge.svg)](https://github.com/end2endzone/bin2cpp/actions/workflows/build_linux.yml) | [![Tests on Linux](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/end2endzone/58cf6c72c08e706335337d5ef9ca48e8/raw/bin2cpp.master.Linux.json)](https://github.com/end2endzone/bin2cpp/actions/workflows/build_linux.yml) |
2423
| macOS 10.15 | [![Build on macOS](https://github.com/end2endzone/bin2cpp/actions/workflows/build_macos.yml/badge.svg)](https://github.com/end2endzone/bin2cpp/actions/workflows/build_macos.yml) | [![Tests on macOS](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/end2endzone/58cf6c72c08e706335337d5ef9ca48e8/raw/bin2cpp.master.macOS.json)](https://github.com/end2endzone/bin2cpp/actions/workflows/build_macos.yml) |
@@ -86,7 +85,6 @@ The following section shows how to use bin2cpp with code examples:
8685

8786

8887
## Command Line Usage
89-
9088
```
9189
bin2cpp --file=<path> --output=<path> [--headerfile=<name>] [--identifier=<name>]
9290
[--generator=<name>] [--encoding=<name>] [--chunksize=<value>] [--namespace=<value>]
@@ -95,6 +93,7 @@ bin2cpp --file=<path> --output=<path> [--headerfile=<name>] [--identifier=<name>
9593
bin2cpp --dir=<path> --output=<path> [--keepdirs]
9694
[--generator=<name>] [--encoding=<name>] [--chunksize=<value>] [--namespace=<value>]
9795
[--baseclass=<name>] [--managerfile=<name>] [--registerfile]
96+
[--dirincludefilter=<value>] [--direxcludefilter=<value>]
9897
[--override] [--noheader] [--quiet]
9998
bin2cpp --help
10099
bin2cpp --version
@@ -117,12 +116,33 @@ bin2cpp --version
117116
| --reportedfilepath=&lt;path&gt; | The relative reported path of the File. Path returned when calling method getFilePath() of the File class. Automatically calculated when --dir mode is used.<br>ie: images/DCIM/IMG_0001.jpg |
118117
| --managerfile=&lt;path&gt; | File name or relative path of the generated C++ header file for the FileManager class.<br>ie: FileManager.h. |
119118
| --registerfile | Register the generated file to the FileManager class. This flags is automatically set when parameter 'managerfile' is specified. |
119+
| --dirincludefilter=&lt;value&gt;| Set a positive filter on the input directory to only select files matching the filter. Wildcard characters are accepted. Separate each filter with the character ':'. Valid only when --dir is used. See wildcard characters definition below. |
120+
| --direxcludefilter=&lt;value&gt;| Set a negative filter on the input directory to skip files matching the filter. Wildcard characters are accepted. Separate each filter with the character ':'. Valid only when --dir is used. See wildcard characters definition below. The exclude filter has precedence over the include filter. |
120121
| --keepdirs | Keep the directory structure. Forces the output files to have the same directory structure as the input files. Valid only when --dir is used. |
121122
| --plainoutput | Print the encoded string in plain format to stdout. Useful for scripts and integration with third party application. |
122123
| --override | Tells bin2cpp to overwrite the destination files. |
123124
| --noheader | Do not print program header to standard output. |
124125
| --quiet | Do not log any message to standard output. |
125126

127+
&nbsp;
128+
129+
Wildcard characters:
130+
| Wildcard | Description |
131+
|:-----------:|--------------------------------------------------------------|
132+
| `?` | Matches any single character. |
133+
| `*` | Matches zero or more characters. |
134+
| `#` | Matches exactly one numeric digit (0-9). |
135+
| [charlist] | Matches any single character inside the brackets. |
136+
| [a-z] | Matches any single lowercase letter between 'a' and 'z'. |
137+
| [A-Z] | Matches any single uppercase letter between 'A' and 'A'. |
138+
| [0-9] | Matches any single digit between '0' and '9'. |
139+
| [a-zA-Z0-9] | Matches any single letter (uppercase or lowercase) or digit. |
140+
141+
For example:
142+
* `ker*##.???` matches files that starts with `ker`, and ends with 2 digits, a dot and then 3 characters.
143+
* `--dir-include-filter="*.jpg:*.png"` includes all files whose file extension is `jpg` or `png`.
144+
* `--dir-exclude-filter="*.bak"` excludes all backup files.
145+
* `--dir-include-filter="*.log" --dir-exclude-filter="debug.log"` includes all log files but not the one specificaly named `debug.log`.
126146

127147

128148
## Example 1 - single file

0 commit comments

Comments
 (0)