Add Org mode converter output
This commit is contained in:
1 parent
432a1dc223
commit
e5cb11c659
7 files changed
+98
-3
No files matched your search
@@ -7,6 +7,7 @@ Supported output formats:
|
||||
|
||||
- LaTeX (`--type=latex`)
|
||||
- Markdown (`--type=md`)
|
||||
- Org mode (`--type=org`)
|
||||
|
||||
Highlights are grouped by book title while preserving the order in which
|
||||
books first appear in the input file.
|
||||
@@ -63,6 +64,24 @@ Markdown block quote, followed by an empty notes heading:
|
||||
Empty lines inside highlights are preserved as `>` lines, and Markdown syntax
|
||||
characters are escaped automatically.
|
||||
|
||||
### Org mode
|
||||
|
||||
Books and clipping metadata become Org headings. Highlight text is placed in
|
||||
a quote block followed by an empty notes heading:
|
||||
|
||||
```org
|
||||
* Book Title
|
||||
|
||||
** - Your Highlight on Location 123-125 | Added on ...
|
||||
|
||||
#+begin_quote
|
||||
Highlighted text line 1
|
||||
Highlighted text line 2
|
||||
#+end_quote
|
||||
|
||||
*** Notes
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
Input parsing is implemented as a stage-driven pipeline with one handler for
|
||||
@@ -112,6 +131,15 @@ Generate Markdown:
|
||||
--type=md
|
||||
```
|
||||
|
||||
Generate Org mode:
|
||||
|
||||
```bash
|
||||
./build/kindle2notes \
|
||||
--input "My Clippings.txt" \
|
||||
--output notes.org \
|
||||
--type=org
|
||||
```
|
||||
|
||||
Short options are also available:
|
||||
|
||||
```bash
|
||||
@@ -122,7 +150,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` or `md` |
|
||||
| `--type` | `-t` | Output format: `latex`, `md`, or `org` |
|
||||
| `--help` | `-h` | Show usage information |
|
||||
|
||||
If an unsupported output type is requested, the program prints the list of
|
||||
|
||||
Reference in new issue
Block a user