Add AsciiDoc converter output

This commit is contained in:
deeaitch committed 2026-08-28 01:16:16 -04:00
1 parent e5cb11c659
commit 804876656d
7 files changed
+99 -3

No files matched your search

+30 -1
View File
@@ -8,6 +8,7 @@ Supported output formats:
- LaTeX (`--type=latex`)
- Markdown (`--type=md`)
- Org mode (`--type=org`)
- AsciiDoc (`--type=adoc`)
Highlights are grouped by book title while preserving the order in which
books first appear in the input file.
@@ -82,6 +83,25 @@ Highlighted text line 2
*** Notes
```
### AsciiDoc
Books and clipping metadata become section headings. Highlight text is placed
in a quote block followed by an empty notes section:
```adoc
== Book Title
=== - Your Highlight on Location 123-125 | Added on ...
[quote]
____
Highlighted text line 1
Highlighted text line 2
____
==== Notes
```
## Architecture
Input parsing is implemented as a stage-driven pipeline with one handler for
@@ -140,6 +160,15 @@ Generate Org mode:
--type=org
```
Generate AsciiDoc:
```bash
./build/kindle2notes \
--input "My Clippings.txt" \
--output notes.adoc \
--type=adoc
```
Short options are also available:
```bash
@@ -150,7 +179,7 @@ Short options are also available:
| --- | --- | --- |
| `--input` | `-i` | Path to the Kindle clippings file |
| `--output` | `-o` | Path to the generated file |
| `--type` | `-t` | Output format: `latex`, `md`, or `org` |
| `--type` | `-t` | Output format: `latex`, `md`, `org`, or `adoc` |
| `--help` | `-h` | Show usage information |
If an unsupported output type is requested, the program prints the list of