nbk2pdf 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +58 -0
- data/COPYING +674 -0
- data/README.md +490 -0
- data/exe/nbk2pdf +8 -0
- data/lib/kindle_notebook/cli.rb +274 -0
- data/lib/kindle_notebook/container.rb +82 -0
- data/lib/kindle_notebook/converter.rb +112 -0
- data/lib/kindle_notebook/device.rb +145 -0
- data/lib/kindle_notebook/document.rb +133 -0
- data/lib/kindle_notebook/document_renderer.rb +247 -0
- data/lib/kindle_notebook/ion.rb +243 -0
- data/lib/kindle_notebook/krds.rb +109 -0
- data/lib/kindle_notebook/notebook.rb +442 -0
- data/lib/kindle_notebook/pdf_renderer.rb +232 -0
- data/lib/kindle_notebook/stroke_decoder.rb +90 -0
- data/lib/kindle_notebook/titles.rb +90 -0
- data/lib/kindle_notebook/version.rb +10 -0
- data/lib/nbk2pdf.rb +22 -0
- metadata +109 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: d8a59dbe4f22c150b38ba4f0ced7c4a43e8b76019de55375e4736a1486ca3f94
|
|
4
|
+
data.tar.gz: b47999b9bd68c439c3ae69b9c594e2409cc0aadf62c4e7bb8f6be4d91013a74e
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: c5a5ad8a48bd46a812fa9d3653ad7fc709b9fc7b7b16f15c06568a58b6dc71a37d2b74519795b8b72d95e57425f5c3437f9a86151795a051334273f0caf23628
|
|
7
|
+
data.tar.gz: 15384d80e7360a9df1adaf7212060ccbf25716f57225d5757db70defb039a51c025ebd5e1656dafc682315581d05596794b2846da6f49fce566f0e240d0920db
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
|
|
5
|
+
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Handwriting on a PDF goes onto a copy of that PDF. Pass the PDF on the device
|
|
12
|
+
as the path, or let `sync` pick it up with the notebooks. The ink is placed in
|
|
13
|
+
the frame the device records for it, and the original pages, links and named
|
|
14
|
+
destinations are kept.
|
|
15
|
+
- `--annotations` adds the ink as PDF ink annotations instead of drawing it
|
|
16
|
+
into the page. Their appearance keeps the pressure taper.
|
|
17
|
+
- Reader for the device's reader data store (`.yjr`), where the notes on a
|
|
18
|
+
document are recorded.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- `sync` writes notebooks into `DIR/notebooks/` and PDFs written on into
|
|
23
|
+
`DIR/documents/`, keeping the folders they have under `documents/` on the
|
|
24
|
+
Kindle. It used to put every notebook straight into `DIR`.
|
|
25
|
+
- The notebook holding a PDF's ink is no longer converted as a notebook of its
|
|
26
|
+
own when its PDF can be found; the ink goes onto the PDF instead.
|
|
27
|
+
- Depends on `combine_pdf`, to read and write existing PDFs.
|
|
28
|
+
|
|
29
|
+
## [1.0.0] - 2026-09-19
|
|
30
|
+
|
|
31
|
+
Initial release, under the GNU General Public License v3.0 or later.
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- `nbk2pdf` command line tool converting Kindle Scribe `nbk` files to vector PDFs,
|
|
36
|
+
singly or by walking a directory of notebooks.
|
|
37
|
+
- Reader for the signature container the device wraps its SQLite database in,
|
|
38
|
+
validated against the page size and page count in the SQLite header.
|
|
39
|
+
- Binary Amazon Ion 1.0 parser, including the shared symbol table notebooks use.
|
|
40
|
+
- Decoder for the second-order delta encoding that stores pen strokes.
|
|
41
|
+
- Rendering of page templates (ruled, squared, margins) from the vector data in
|
|
42
|
+
the notebook, with `--no-template` to leave them out.
|
|
43
|
+
- Output naming from `--titles`, the notebook's own title, or its modification
|
|
44
|
+
date and uuid.
|
|
45
|
+
- Pressure-tapered stroke width, with the curve fitted against the thumbnails
|
|
46
|
+
the device renders for the same pages.
|
|
47
|
+
- Ink that cannot be decoded is reported on stderr and counted in the summary
|
|
48
|
+
line instead of disappearing silently.
|
|
49
|
+
- A template shape whose op stream cannot be read to the end is dropped whole
|
|
50
|
+
rather than drawn truncated.
|
|
51
|
+
- `nbk2pdf sync [DIR]`, which mounts a Kindle connected over USB through gvfs
|
|
52
|
+
when it is not mounted already and converts every notebook on it.
|
|
53
|
+
- Pages go on US Letter by default, scaled to fit and centred, since the
|
|
54
|
+
device's own 446.4 x 595.2 pt page matches no standard sheet. `--paper`
|
|
55
|
+
chooses another size, and `--paper native` keeps the device's own.
|
|
56
|
+
- Notebooks with no name are added to the `--titles` file, with their page count
|
|
57
|
+
and date, so they can be named once and used from then on. A title map that
|
|
58
|
+
does not exist yet is created rather than reported as missing.
|