dsh-ai-book-shelf 2.5.0 → 2.5.2
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.
- package/README.md +29 -24
- package/client.js +2 -2
- package/cordis.patch.yml +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# AI Book Shelf / AI
|
|
1
|
+
# AI Book Shelf / AI 涔︽灦
|
|
2
2
|
|
|
3
3
|
[](https://github.com/0avatar0/dsh-ai-book-shelf)
|
|
4
|
-
[](https://github.com/0avatar0/dsh-ai-book-shelf/releases/tag/v2.5.2)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
|
|
7
7
|
A persistent DSH Web UI plugin that adds a full-page multi-format reader to the
|
|
@@ -11,23 +11,27 @@ comparison.
|
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
14
|
-
1. Download `dsh-ai-book-shelf-2.5.
|
|
15
|
-
[latest release](https://github.com/0avatar0/dsh-ai-book-shelf/releases/tag/v2.5.
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
1. Download `dsh-ai-book-shelf-2.5.2.tgz` from the
|
|
15
|
+
[latest release](https://github.com/0avatar0/dsh-ai-book-shelf/releases/tag/v2.5.2),
|
|
16
|
+
or install from npm with `dsh-ai-book-shelf@2.5.2`.
|
|
17
|
+
2. In DSH open **Plugins 鈫?Add plugin** and choose the downloaded tgz, or paste
|
|
18
|
+
the npm package spec.
|
|
19
|
+
3. DSH installs a third-party bundle disabled by default. In **Plugins**, switch
|
|
20
|
+
`dsh-ai-book-shelf` to **On** once; later updates keep it enabled.
|
|
21
|
+
4. Refresh the page and open **AI 涔︽灦 / AI Book Shelf** in the sidebar.
|
|
18
22
|
|
|
19
23
|
Chinese step-by-step guide: [INSTALL-zh.md](INSTALL-zh.md). Publishing and npm
|
|
20
24
|
instructions: [PUBLISHING.md](PUBLISHING.md).
|
|
21
25
|
|
|
22
26
|
## What it does
|
|
23
27
|
|
|
24
|
-
- **Shelf**
|
|
28
|
+
- **Shelf** 鈥?scans the archive shelf (the first registered workspace by
|
|
25
29
|
default, which is `D:\BookLib` on this deployment), plus any extra
|
|
26
30
|
`libraryDirs`, for supported book files.
|
|
27
|
-
- **Copies external books**
|
|
31
|
+
- **Copies external books** 鈥?a book opened or imported from outside the
|
|
28
32
|
archive shelf is copied into `archiveDir` first. Identical files are reused;
|
|
29
33
|
a name collision gets a ` (2)` suffix rather than overwriting anything.
|
|
30
|
-
- **Public-domain search**
|
|
34
|
+
- **Public-domain search** 鈥?the **Search books** tab queries Project Gutenberg
|
|
31
35
|
(Gutendex, with the Gutenberg website search as a fallback), a Chinese-only
|
|
32
36
|
Project Gutenberg catalog (`lang=zh`), Chinese Wikisource, Chinese Wikibooks,
|
|
33
37
|
and Standard Ebooks, then saves the chosen book (EPUB, or an HTML book for
|
|
@@ -46,24 +50,24 @@ instructions: [PUBLISHING.md](PUBLISHING.md).
|
|
|
46
50
|
can be added with the **+** button. The built-in Chinese catalogs cover
|
|
47
51
|
traditional Chinese Gutenberg titles and Wikisource; other catalogs are
|
|
48
52
|
mostly English.
|
|
49
|
-
- **Reader**
|
|
53
|
+
- **Reader** 鈥?parses the book into chapters, sanitizes HTML, and renders a
|
|
50
54
|
comfortable serif reading page with per-book progress. EPUB keeps its OPF
|
|
51
55
|
spine, headings, lists, tables, images and TOC; PDF/Text/Markdown/HTML/FB2/
|
|
52
56
|
DOCX are normalized into readable chapters.
|
|
53
|
-
- **Ask while selecting**
|
|
54
|
-
field to the left of
|
|
55
|
-
|
|
57
|
+
- **Ask while selecting** 鈥?the floating selection bar contains a question
|
|
58
|
+
field to the left of **瑙i噴**. Type a specific question and press Enter or
|
|
59
|
+
**瑙i噴**, or leave it blank for a direct explanation. The question is sent
|
|
56
60
|
together with the book, chapter, selection, and nearby context; the right
|
|
57
61
|
rail opens and streams the answer.
|
|
58
|
-
- **Follow-ups**
|
|
62
|
+
- **Follow-ups** 鈥?keep the whole Q&A thread in the panel and send the previous
|
|
59
63
|
turns to the model, so pronouns and earlier details stay in context. You can
|
|
60
64
|
stop the stream, copy the answer, or use quick asks (translate / example /
|
|
61
65
|
background).
|
|
62
|
-
- **Per-book annotations**
|
|
66
|
+
- **Per-book annotations** 鈥?every completed explanation and its follow-ups are
|
|
63
67
|
saved on the Host under the archive directory. Opening a book opens the right
|
|
64
68
|
annotation rail with that book's saved records; click a record to reopen its
|
|
65
69
|
Q&A thread and continue asking. Records survive browser reloads and restarts.
|
|
66
|
-
- **Paper mode**
|
|
70
|
+
- **Paper mode** 鈥?a separate paper library for English PDFs, with virtual
|
|
67
71
|
folders (create, drag papers in, rename), paragraph-level translation into a
|
|
68
72
|
JSON translation file, manual correction, retranslation, whole-paper
|
|
69
73
|
translation saved as a new Chinese paper, and a bilingual compare view.
|
|
@@ -85,17 +89,17 @@ instructions: [PUBLISHING.md](PUBLISHING.md).
|
|
|
85
89
|
translation box is resizable from its bottom edge, auto-fits its text on
|
|
86
90
|
first open, remembers its height/collapsed state, and can be collapsed
|
|
87
91
|
individually or all at once. Translation text supports AI explanation.
|
|
88
|
-
- **Zoom**
|
|
92
|
+
- **Zoom** 鈥?Ctrl/Cmd + mouse wheel changes the reading font size in both books
|
|
89
93
|
and papers; the paper compare view also zooms its source/translation text.
|
|
90
|
-
- **AI panels**
|
|
91
|
-
individually or with one
|
|
92
|
-
- **Find in book**
|
|
94
|
+
- **AI panels** 鈥?explanations are expanded by default and can be collapsed
|
|
95
|
+
individually or with one 鈥淐ollapse all鈥?action.
|
|
96
|
+
- **Find in book** 鈥?`Ctrl/Cmd+F` opens a full-book search across every
|
|
93
97
|
chapter, including PDF/HTML/DOCX books. Results show chapter, occurrence and
|
|
94
98
|
a text snippet; clicking one jumps to the chapter and highlights every match.
|
|
95
99
|
The reader toolbar shows the shortcut next to the search button. Simplified
|
|
96
|
-
Chinese queries also match traditional text (
|
|
97
|
-
- **Keyboard**
|
|
98
|
-
`Alt
|
|
100
|
+
Chinese queries also match traditional text (`闄堟枃榫檂 finds `闄虫枃榫峘).
|
|
101
|
+
- **Keyboard** 鈥?`Ctrl/Cmd+Shift+E` explains the current selection,
|
|
102
|
+
`Alt+鈫恅 / `Alt+鈫抈 move between chapters, `Esc` closes search/rail.
|
|
99
103
|
|
|
100
104
|
## Supported formats
|
|
101
105
|
|
|
@@ -107,7 +111,7 @@ instructions: [PUBLISHING.md](PUBLISHING.md).
|
|
|
107
111
|
| `.md` / `.markdown` | Headings, paragraphs, lists, quotes, code blocks |
|
|
108
112
|
| `.html` / `.htm` / `.xhtml` | Sanitized HTML body |
|
|
109
113
|
| `.fb2` | FictionBook XML |
|
|
110
|
-
| `.docx` | Word paragraphs and Heading 1
|
|
114
|
+
| `.docx` | Word paragraphs and Heading 1鈥? chapters |
|
|
111
115
|
| `.mobi` / `.azw3` / `.azw` | Convert to EPUB or PDF first (for example with Calibre) |
|
|
112
116
|
|
|
113
117
|
PDF extraction uses a vendored PDF.js runtime under `vendor/pdfjs/`; the package
|
|
@@ -172,3 +176,4 @@ explanations over SSE.
|
|
|
172
176
|
Plugin code is released under the [MIT License](LICENSE). The bundled PDF.js
|
|
173
177
|
runtime keeps its own Apache-2.0 license under `vendor/pdfjs/LICENSE`; bundled
|
|
174
178
|
fonts keep the licenses in `vendor/pdfjs/standard_fonts/`.
|
|
179
|
+
|
package/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
window.__ModuleLoader__.load({
|
|
2
|
-
id: '
|
|
2
|
+
id: 'dsh-ai-book-shelf',
|
|
3
3
|
factory(require) {
|
|
4
4
|
const React = require('react')
|
|
5
5
|
const h = React.createElement
|
|
@@ -4443,7 +4443,7 @@ window.__ModuleLoader__.load({
|
|
|
4443
4443
|
|
|
4444
4444
|
ctx.effect(() => {
|
|
4445
4445
|
const tag = document.createElement('style')
|
|
4446
|
-
tag.dataset.plugin = '
|
|
4446
|
+
tag.dataset.plugin = 'dsh-ai-book-shelf'
|
|
4447
4447
|
tag.textContent = CSS
|
|
4448
4448
|
document.head.append(tag)
|
|
4449
4449
|
return () => tag.remove()
|
package/cordis.patch.yml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-ai-book-shelf",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.2",
|
|
4
4
|
"description": "AI Book Shelf: read books and papers in Harness, search full text, explain and discuss with AI, translate papers and compare bilingual text.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh-plugin",
|