Add Git-derived version reporting

This commit is contained in:
deeaitch committed 2026-08-28 01:30:44 -04:00
1 parent 7026e246bb
commit 6ed48022ae
3 files changed
+59 -4

No files matched your search

+13
View File
@@ -131,6 +131,12 @@ The resulting executable is:
build/kindle2notes
```
When the source is built from Git, CMake obtains the version from
`git describe`. A build made exactly from a release tag reports only that tag
(for example, `1.0`). Later commits include their distance from the tag and
the abbreviated commit hash (for example, `1.0-3-gabc1234`). A modified
working tree also receives the `-dirty` suffix.
## Usage
Generate LaTeX:
@@ -175,11 +181,18 @@ Short options are also available:
./build/kindle2notes -i input.txt -o notes.md -t md
```
Show the version compiled into the executable:
```bash
./build/kindle2notes --version
```
| Argument | Short form | Description |
| --- | --- | --- |
| `--input` | `-i` | Path to the Kindle clippings file |
| `--output` | `-o` | Path to the generated file |
| `--type` | `-t` | Output format: `latex`, `md`, `org`, or `adoc` |
| `--version` | `-v` | Show the compiled version and exit |
| `--help` | `-h` | Show usage information |
If an unsupported output type is requested, the program prints the list of