@apprun/shiqu 0.6.5 → 0.8.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.
Files changed (31) hide show
  1. package/NOTICE +5 -2
  2. package/README.md +71 -106
  3. package/data/export-fonts/NotoSansCJKsc-Regular.otf +0 -0
  4. package/data/export-fonts/OFL.txt +92 -0
  5. package/data/export-fonts/README.md +8 -0
  6. package/dist/client/assets/{es-B0vSJwvP.js → es-uh-GOicn.js} +1 -1
  7. package/dist/client/assets/index-BIsu-Bxs.js +17 -0
  8. package/dist/client/assets/index-DRwygcbT.css +1 -0
  9. package/dist/client/assets/reader-pdf-B-dCuB6F.js +4 -0
  10. package/dist/client/assets/reader-png-B1iE7LNk.js +1 -0
  11. package/dist/client/assets/reader-zip-kwzPi4VM.js +16 -0
  12. package/dist/client/index.html +2 -2
  13. package/dist/client/offline.html +3 -1
  14. package/dist/client/sw.js +1 -1
  15. package/dist/server/cli.js +6627 -3682
  16. package/docker/seed.sql +1 -5
  17. package/drizzle/0012_generation_authorization.sql +111 -0
  18. package/drizzle/0013_reader_state_transitions.sql +132 -0
  19. package/drizzle/0014_reader_input_identity.sql +2 -0
  20. package/drizzle/0015_image_fault_checkpoints.sql +28 -0
  21. package/drizzle/0016_legacy_input_faults.sql +2 -0
  22. package/drizzle/0017_command_receipt_links.sql +51 -0
  23. package/drizzle/0018_consolidate_story_storage.sql +13 -0
  24. package/drizzle/0019_refuse_pre_consolidation_apps.sql +9 -0
  25. package/package.json +10 -1
  26. package/skills/shiqu/SKILL.md +72 -0
  27. package/dist/client/assets/index-B0URXv2Q.css +0 -1
  28. package/dist/client/assets/index-y4BxCnhg.js +0 -17
  29. package/dist/client/assets/reader-pdf-AMLMoode.js +0 -4
  30. package/dist/client/assets/reader-png-UKUNKgFB.js +0 -1
  31. package/dist/client/assets/reader-zip-CYrTAeJC.js +0 -16
package/NOTICE CHANGED
@@ -11,12 +11,15 @@ rights that their respective rights holders have not granted.
11
11
 
12
12
  For the bundled book collection, see data/library/source-notices.md and
13
13
  data/library/catalog.json, together with notices in the original downloads.
14
- The Wikisource and Kanripo transcription contributions retain CC BY-SA 4.0,
15
- including the historical Zhongli excerpt in lib/content.ts. See data/library/licenses/CC-BY-SA-4.0.txt. Original authors and
14
+ The Wikisource and Kanripo transcription contributions retain CC BY-SA 4.0.
15
+ See data/library/licenses/CC-BY-SA-4.0.txt. Original authors and
16
16
  upstream contributors are credited in the catalog and original downloads.
17
17
  Project Gutenberg downloads retain their own accompanying notices and terms.
18
18
 
19
19
  Third-party dependency license texts and notices remain applicable. The
20
+ CLI offline exporter bundles Noto Sans CJK SC under the SIL Open Font License;
21
+ see data/export-fonts/OFL.txt and data/export-fonts/README.md.
22
+ The
20
23
  Standard desktop edition also includes the Node.js distribution's LICENSE
21
24
  alongside the bundled Node executable.
22
25
 
package/README.md CHANGED
@@ -1,144 +1,109 @@
1
1
  # 拾趣 · Shiqu
2
2
 
3
- Turn Chinese classics into your own illustrated storybooks. Read in your browser, generate with a logged-in Codex CLI, OpenAI API, or Gemini, and keep stories, images, and reading progress on your computer.
3
+ 用拾趣,把中国古典故事变成你自己的连环画。支持电脑与手机阅读,以及 PDF、PNG 长图和 ZIP 导出。故事、图片和阅读进度保存在你的电脑上。
4
4
 
5
- ## CLI or desktop app?
5
+ [在线阅读拾趣好故事 →](https://yysun.github.io/awesome-shiqu/)
6
6
 
7
- **Choose the desktop app for everyday use; choose the CLI if you already have Node 24, prefer a terminal, or need scripted startup.**
7
+ ## 快速开始制作
8
8
 
9
- | Your situation | Recommended entry point |
10
- | --- | --- |
11
- | You want graphical settings, library and queue management, and no separate Node installation | Desktop app: includes Node 24 and service controls |
12
- | You already have Node 24 and want one-command startup without installing a desktop app | CLI: `npx @apprun/shiqu`; keep the terminal running and press Ctrl+C to stop |
13
- | You want generation and reading access to continue after closing the control window | Desktop app: stays in the system tray until you stop the service or quit the app |
14
- | You need startup parameters, environment overrides, or non-interactive operation | CLI: prepare provider configuration and a library path in advance |
15
- | You use Linux, an Intel Mac, or Windows ARM64 | CLI: install Node 24 yourself; no desktop installer is provided for these platforms. Windows supports API providers or read-only mode |
16
- | You want phone access on the same Wi-Fi | Both entries: CLI prints phone QR codes on startup; desktop shows them in its control window |
17
- | You need built-in internet tunnel controls | Desktop app: requires a separate cloudflared installation. CLI has no built-in internet tunnel |
18
-
19
- **Shared features:** Both entry points provide the same browser interface for story creation, production and acceptance requirements, generation queues, pause/resume, reading, library organization, and PDF / PNG / ZIP export. The desktop window adds library, queue, settings, and service controls; full reading and story creation happen in the browser. Both support OpenAI API, Gemini, and read-only mode. Codex generation is supported on macOS / Linux and requires a separately installed, logged-in Codex CLI; the Shiqu CLI and Codex CLI are different tools.
20
-
21
- **Shared settings and data:** Under the same local user account, both entry points reuse saved provider settings and API keys. With the same library directory, they share stories, images, and reading progress. Neither requires the other to be running.
22
-
23
- ### Switching between CLI and desktop
9
+ 三种方式,任选一种:
24
10
 
25
- 1. **Stop the current service.** Press Ctrl+C in the CLI, or stop the service / quit the desktop app. Closing the desktop window alone does not stop the service.
26
- 2. **Use matching versions and the same library directory.** Check the CLI version with `npx @apprun/shiqu --version`; use `npx @apprun/shiqu@<version>` to select a published version matching the desktop app. Explicit `--data-dir` / `SHIQU_DATA_DIR` overrides apply only to that invocation and do not change the saved directory.
27
- 3. **Start the other entry point.** Saved provider settings and keys are reused. Changes to shared settings take effect in an already-running service only after it restarts.
11
+ ### 1. npx:一条命令启动
28
12
 
29
- **Only one service can run against a library at a time, even on different ports.** Switching entry points needs no data copy. Choosing another directory opens another library; it does not move or merge data. Back up before upgrading or downgrading, as older versions may not read newer settings or data. See the [full user guide](https://github.com/yysun/shiqu/blob/main/.docs/user-guide.md).
30
-
31
- ## Run
32
-
33
- Requires **Node 24** (recommended: 24.22.1) and its bundled npm / npx. No separate pnpm installation is needed:
13
+ 需要 **Node 24**:
34
14
 
35
15
  ```bash
36
16
  npx @apprun/shiqu
37
17
  ```
38
18
 
39
- On first use, npx may ask to download the package; confirm to continue. Open the printed URL, normally `http://127.0.0.1:3000`, or scan a terminal QR code from a phone on the same trusted Wi-Fi. LAN access is enabled by default. Keep the terminal running; stop with Ctrl+C. No checkout, build, Docker, or desktop app is needed.
40
-
41
- If you already use pnpm, `pnpm dlx @apprun/shiqu` starts the same app. You can also install it globally with pnpm for a permanent `shiqu` command:
42
-
43
- ```bash
44
- pnpm add -g @apprun/shiqu
45
- shiqu --help
46
- ```
47
-
48
- ## First-run provider setup
19
+ 按提示选择书库和生成服务,打开终端打印的网址即可使用。同一可信 Wi-Fi 下,手机可扫描终端二维码接着读。保持终端运行,按 Ctrl+C 停止。[CLI 使用说明](https://github.com/yysun/shiqu/blob/main/.docs/user-guide.md#cli-启动)
49
20
 
50
- No environment variables are required for interactive setup. After finding or choosing a library, the CLI reuses saved settings. If none are configured, choose **Codex / OpenAI API / Gemini / Read only**. Enter API keys at the hidden terminal prompt; model prompts accept the saved/default value on Enter. Codex needs an installed, logged-in CLI instead of an API key. Windows supports the API providers and read-only mode.
21
+ ### 2. Desktop:下载安装
51
22
 
52
- Settings and provider-specific keys are shared with the desktop app in the separate private `desktop.sqlite`, outside story libraries. Saved configurations do not prompt again. Keys are plaintext protected by local filesystem permissions (0700 directory / 0600 database on Unix); do not share settings backups. Keys never appear in HTTP responses or settings views.
53
-
54
- ```bash
55
- npx @apprun/shiqu --configure
56
- npx @apprun/shiqu --reset-providers
57
- ```
23
+ 内置 Node,无需另装运行环境。支持 Apple Silicon Mac(macOS 13.5+)和 Windows 10/11 x64。
58
24
 
59
- `--configure` selects/edits a profile, retains that profile's saved key on blank input, saves only a completed setup, and exits. Switching profiles preserves other providers' models/keys. `--reset-providers` removes saved provider settings and keys, preserving libraries/network settings and all stories. It reopens setup in a terminal, or exits with guidance when non-interactive. Already-running servers keep their startup snapshot until restarted.
25
+ [下载 macOS DMG](https://github.com/yysun/shiqu/releases/latest/download/shiqu-standard-macos-arm64.dmg) · [下载 Windows 安装程序](https://github.com/yysun/shiqu/releases/latest/download/shiqu-standard-windows-x64-setup.exe) · [版本与校验文件](https://github.com/yysun/shiqu/releases/latest)
60
26
 
61
- OpenAI uses the official Responses API for text and Images API for illustrations, including saved reference images. Defaults: `gpt-6.1-sol` / `gpt-image-2.5-sunburst`; access/quota depend on your API project. OpenAI API billing is separate from Codex subscription quota. Public webpage URL discovery remains Gemini-only. Read-only never dispatches generation.
27
+ 打开拾趣,在「设置」中选择生成服务,保存并启动,再点击「在浏览器打开」。安装包未签名,首次打开的系统提示见[桌面版入门](https://github.com/yysun/shiqu/blob/main/.docs/user-guide.md#桌面版入门)。
62
28
 
63
- ### Invocation-only overrides
29
+ ### 3. Skill:让 Codex 帮你制作
64
30
 
65
- Environment variables or an explicitly selected env file override saved configuration without being imported or persisted:
31
+ 需要 **Node 24**。运行一次,安装供当前用户各项目使用的技能:
66
32
 
67
- ```dotenv
68
- SHIQU_AI_PROVIDER=openai
69
- OPENAI_API_KEY=your-key
70
- # Optional model overrides:
71
- OPENAI_TEXT_MODEL=gpt-6.1-sol
72
- OPENAI_IMAGE_MODEL=gpt-image-2.5-sunburst
33
+ ```bash
34
+ npx @apprun/shiqu skill install --scope global
73
35
  ```
74
36
 
75
- Other choices: `SHIQU_AI_PROVIDER=codex` after `codex login`, `SHIQU_AI_PROVIDER=gemini` with `GEMINI_API_KEY`, or `SHIQU_AI_PROVIDER=readonly` with no key.
37
+ 然后在 Codex 中说:
76
38
 
77
- ```bash
78
- npx @apprun/shiqu --config /path/to/shiqu.env
39
+ ```text
40
+ $shiqu 从《庄子》中找一个关于善意与误解的故事,用水墨写意。
41
+ 先给我候选和制作方案,确认后再生成插图,完成后导出离线预览和公开 ZIP。
79
42
  ```
80
43
 
81
- No `.env` is loaded automatically. Existing shell variables beat the selected file; CLI flags beat both. Non-interactive startup requires saved settings or a complete provider override, and a discoverable/explicit library path. No prompt waits indefinitely. The package includes `.env.example` with optional settings.
44
+ 无需启动桌面或浏览器服务。[提示词示例](https://github.com/yysun/shiqu/blob/main/.docs/use-as-skill.md) · [技能安装与配置](https://github.com/yysun/shiqu/blob/main/.docs/user-guide.md#无服务-cli-与-codex-技能)
82
45
 
83
- ## Create, review, and read stories
46
+ 生成服务可选 Codex、OpenAI API 或 Gemini,也可选择只读。Codex 需 macOS / Linux,并另行安装和登录 Codex CLI;OpenAI API 与 Gemini 使用各自 API 密钥并单独计费。[如何选择后端](https://github.com/yysun/shiqu/blob/main/.docs/user-guide.md#如何选择后端)
84
47
 
85
- 1. Choose one of the 24 books. Select a standalone story directly, extract candidates from up to 24 selected chapters, or search by theme. Theme search shows candidates one at a time while the picker stays open; selecting a story or leaving stops further discovery. Saved candidates and reading progress can be resumed. An incomplete-results notice means some stories could not be judged, not that they failed the theme.
86
- 2. After the original and a verified summary are ready, choose an art style and **brief / balanced / detailed** narrative detail. The frame estimate is not a fixed count: the model plans from the original, and review can add, remove, or replace frames before drawing.
87
- 3. Set production requirements for the adaptation and, optionally, acceptance requirements (one per line, up to 20). Start production explicitly. Review gives a verdict and evidence for each criterion; actionable failures enter repair, while conflicts or criteria that cannot be judged from the written storyboard stop drawing. Inspect the reason and revise the requirements rather than repeatedly resuming.
88
- 4. Production continues in the background after confirmation. Pause/resume controls are shared across windows. Automatic repair stops after 20 rounds or no effective change; inspect the saved issues, continue repair, or edit and save for a fresh review. Explicitly skipping issues is recorded and does not mean acceptance passed.
89
- 5. Read on your computer or phone. Rename a story independently without regenerating it. Once every illustration is ready, export PDF, a PNG overview, or a ZIP containing story JSON, storyboard Markdown, source text, full-resolution WebP images, and saved prompt records. Exports do not make generation requests.
48
+ ## CLI 命令
90
49
 
91
- The production and acceptance editors let you inspect current system-rule previews, copy recorded actual prompts, and view saved acceptance results. Previews include unsaved edits and are not execution history; inherited records identify their source version, and missing historical records are not fabricated. Changing only acceptance requirements preserves the storyboard and reusable images for a new review; subsequent repair may still invalidate affected images. Written-storyboard acceptance is not a visual inspection of generated artwork. Prompt records may contain source text and custom requirements; check them before sharing.
50
+ 以下命令均加上前缀 `npx @apprun/shiqu`。不带子命令时启动浏览器服务;带子命令时直接操作本地书库。执行书库命令前,先停止占用同一书库的服务。
92
51
 
93
- Set default production credits, a public work link/contact, source licensing, and reuse conditions under **我的 → 署名与转载**, or edit one story under **故事设置**. New stories copy the defaults; each export also resolves blank fields against the latest defaults without rewriting the saved story. Explicit story fields win. Unsigned downloads require confirmation, including repeated downloads; a failed defaults read stops export rather than using stale information. WebP signature size is adjustable from 12–48 original-image pixels, defaulting to 24px; PDF/PNG layout and clean source images remain unchanged.
52
+ | 命令 | 用途 |
53
+ | --- | --- |
54
+ | `help --json` | 查看命令目录、参数、JSON 输入与示例 |
55
+ | `init`, `status` | 显式初始化书库,或检查书库完整性与数量统计 |
56
+ | `catalog`, `books`, `themes`, `styles` | 列出书籍、主题和画风 |
57
+ | `books contents BOOK_ID --query TEXT` | 浏览或搜索书籍的本地目录,查询条件可省略 |
58
+ | `stories list`, `stories get ID`, `stories current ID` | 查看故事列表、故事详情与当前版本 |
59
+ | `stories create --input FILE` | 保存新故事的选题条件 |
60
+ | `stories setup`, `stories search`, `stories choose`, `stories confirm` | 设置要求、查找候选、选择故事与确认制作 |
61
+ | `run ID`, `stories run ID` | 制作指定故事;`--until` 可选 candidates、prepared、reviewed 或 completed |
62
+ | `stories edit ID --input FILE` | 使用 `stories revisions ID` 返回的 token 保存修改版本 |
63
+ | `stories pause`, `stories resume`, `stories stop` | 暂停、恢复或停止故事制作 |
64
+ | `stories retry`, `stories override` | 重试当前故障,或明确跳过审核问题 |
65
+ | `stories rename`, `stories delete`, `stories restore`, `stories favorite`, `stories reference` | 改名、删除、恢复、收藏故事,或设置本书参考图 |
66
+ | `stories revisions`, `stories prompts`, `stories review-history`, `stories source` | 查看版本、提示词、审核记录与原文 |
67
+ | `stories reselect`, `stories replace`, `stories cancel-reselection` | 发起、应用或取消重新选题 |
68
+ | `preview ID --output FILE` | 导出可独立打开的离线 HTML 预览 |
69
+ | `export ID --format FORMAT --output FILE` | 导出 json、md、zip、pdf 或 png |
70
+ | `skill show`, `skill install`, `skill check`, `skill update` | 查看、安装、检查或更新 Codex 技能 |
71
+ | `config get`, `config set`, `config reset` | 查看、保存或重置共享生成服务配置 |
72
+ | `backup DIR`, `verify-backup DIR`, `restore DIR`, `diagnostics FILE` | 备份、校验、恢复书库,或导出脱敏诊断 |
73
+ | `api METHOD reader/ROUTE` | 在当前进程调用允许的 reader 接口 |
74
+
75
+ 只有显式 `run` 执行 AI 生成,其他命令只查看或保存状态。故事操作需传入故事 ID;选题操作还需 `--generation N`。JSON 输入使用 `--input FILE`,或用 `--input -` 从标准输入读取。各命令的必填字段与恢复规则见 `help --json`。
76
+
77
+ 用 `--data-dir DIR` 指定书库。ZIP、PDF、PNG 要求当前版本全部图片完成,导出路径必须尚不存在。恢复书库需显式指定尚不存在的 `--data-dir DIR`。[完整命令流程](https://github.com/yysun/shiqu/blob/main/.docs/user-guide.md#直接使用命令) · [备份、恢复与诊断](https://github.com/yysun/shiqu/blob/main/.docs/user-guide.md#书库维护命令)
78
+
79
+ ### 浏览器服务启动参数
80
+
81
+ | 参数 | 用途 |
82
+ | --- | --- |
83
+ | `--port PORT`, `--host ADDRESS` | HTTP 端口(默认 3000)与监听地址(默认 0.0.0.0);仅限本机访问时使用 `--host 127.0.0.1` |
84
+ | `--data-dir DIR`, `--config FILE` | 指定书库目录,或加载指定的环境配置文件 |
85
+ | `--configure`, `--reset-providers` | 配置或清除已保存的生成服务设置与密钥 |
86
+ | `--backup DIR`, `--verify-backup DIR`, `--restore DIR`, `--diagnostics FILE` | 维护命令的参数形式,每次单独执行一项 |
87
+ | `--help`, `--version` | 查看启动帮助或当前版本 |
94
88
 
95
- ZIPs include `提示词.md`, `提示词.json`, and `系统提示词.md`. Identical recorded system rules are stored once and referenced from individual calls; distinct historical rules and actual inputs are retained. The archive also preserves credits, AI disclosure, public WebP XMP, and image hashes for integrity checks, not proof of ownership. **Review the entire ZIP before sharing or submitting it:** prompt inputs and custom requirements are included by default. Reference images are represented by saved paths, not bundled files. Deduplication does not guarantee every text file fits a reading site's 1 MiB limit.
89
+ ## 更多说明
96
90
 
97
- Use the star button on an illustrated page to select **one reference image per book**, separate from the bookmark for story favorites. Later image requests for that book, including a new story's first frame, prefer the star; without it, later frames use their own story's first image. Replacing or removing the star does not redraw saved images or change requests already in flight.
91
+ [使用指南](https://github.com/yysun/shiqu/blob/main/.docs/user-guide.md) · [手机阅读](https://github.com/yysun/shiqu/blob/main/.docs/user-guide.md#在手机上阅读) · [制作与导出](https://github.com/yysun/shiqu/blob/main/.docs/user-guide.md#制作与阅读故事) · [常见问题](https://github.com/yysun/shiqu/blob/main/.docs/user-guide.md#常见问题)
98
92
 
99
- See the [full creation and reading guide](https://github.com/yysun/shiqu/blob/main/.docs/user-guide.md#制作与阅读故事). Generation uses your configured provider's quota or API billing; quality and completeness still need human review.
93
+ ## 开发者
100
94
 
101
- ## Options and data
95
+ 源码开发使用 **Node 24.22.1** 与 **pnpm 11.25.0**:
102
96
 
103
97
  ```bash
104
- npx @apprun/shiqu --port 3100 --data-dir ./my-library
105
- pnpm dlx @apprun/shiqu --host 127.0.0.1
106
- npx @apprun/shiqu --version
98
+ nvm install
99
+ nvm use
100
+ corepack enable pnpm
101
+ pnpm run setup
102
+ pnpm dev
107
103
  ```
108
104
 
109
- | Option | Environment | Default |
110
- | --- | --- | --- |
111
- | `--port` | `PORT` | `3000` |
112
- | `--host` | `SHIQU_BIND_IP` | `0.0.0.0` (LAN access) |
113
- | `--data-dir` | `SHIQU_DATA_DIR` | Saved desktop library; otherwise find or ask below |
114
- | `--config` | — | No env file |
115
-
116
- Library selection:
117
-
118
- 1. An explicit `--data-dir` wins over `SHIQU_DATA_DIR` from the shell or selected env file.
119
- 2. Otherwise reuse the library directory saved in the shared CLI / desktop settings, creating it if necessary. Provider settings and keys are reused separately during provider setup; they are not stored in the story library.
120
- 3. Without shared saved settings, import a prior CLI `cli-library.json` directory if present, otherwise look for an existing database in the desktop default library directory.
121
- 4. If none is found, ask which directory to use or create. Enter accepts the suggested desktop default. Cancel/EOF creates no library; non-interactive first use must supply `--data-dir`.
122
-
123
- Suggested desktop-compatible defaults:
124
-
125
- - macOS: `~/Library/Application Support/com.shiqu.desktop/library`
126
- - Linux: `${XDG_DATA_HOME:-~/.local/share}/com.shiqu.desktop/library`
127
- - Windows: `%APPDATA%\com.shiqu.desktop\library`
128
-
129
- Confirmed library choices now live in the shared settings database; legacy `cli-library.json` choices are imported when needed and the old file is retained. Desktop and CLI use the same directory when either configures it first. Explicit `--data-dir` / `SHIQU_DATA_DIR` overrides are invocation-only. New settings databases created by `--configure` do not treat the unconfirmed default library path as a saved choice.
130
- Relative paths resolve from the launch directory. Both entries use the same SQLite/media format; use matching versions and stop one before starting the other. A busy library is rejected even on a different port. Database and media survive package updates and npm-cache cleanup. Back up the entire library while stopped.
131
-
132
- Older CLI releases used `shiqu/library` rather than `com.shiqu.desktop/library` (Windows used LOCALAPPDATA, falling back to APPDATA). Existing data is never moved or merged automatically; pass the old directory with `--data-dir` to continue using it. CLI and desktop now share saved credentials; explicit invocation overrides remain separate and are not saved.
133
-
134
- Version 0.6.0 migrates legacy summary fields and adds book-reference storage without regenerating existing stories. Back up the entire stopped library before upgrading, refresh old browser tabs, and keep CLI and desktop versions matched. Older binaries may not read the upgraded schema; restore a pre-upgrade backup when rolling back.
135
-
136
- Version 0.6.5 adds default publication settings without rewriting existing stories or images. Stop all services using the library and back it up before upgrading; refresh browser tabs afterward. ZIP exports now include saved prompts and custom requirements by default, so check the contents again before sharing. Missing historical prompt records are not reconstructed.
137
-
138
- The CLI listens on `0.0.0.0` by default and prints LAN URLs and phone QR codes when a network interface is available. Every connected device shares the library and generation permissions; use a trusted LAN. Use `--host 127.0.0.1` (or `SHIQU_BIND_IP=127.0.0.1`) for local-only access without phone QR codes. Keep the computer awake while reading from a phone. This CLI does not provide the desktop app's internet tunnel or native control window.
139
-
140
- ## Sources and license
105
+ 桌面 UI 预览用 `pnpm desktop:preview`,源码目录的 CLI 帮助用 `pnpm cli help --json`。[开发指南](https://github.com/yysun/shiqu/blob/main/.docs/development.md) · [桌面开发与打包](https://github.com/yysun/shiqu/blob/main/desktop/README.md)
141
106
 
142
- The package includes all 24 classical texts, their catalog, and source notices, so first use needs no separate book download. Original project code is Apache-2.0; book sources retain their applicable terms. See `LICENSE`, `NOTICE`, `data/library/source-notices.md`, and `data/library/catalog.json`. Generated stories and illustrations do not inherit the code license automatically.
107
+ ## 来源与许可
143
108
 
144
- [Project and full documentation](https://github.com/yysun/shiqu)
109
+ 项目原创代码与文档采用 [Apache-2.0](https://github.com/yysun/shiqu/blob/main/LICENSE),另见 [NOTICE](https://github.com/yysun/shiqu/blob/main/NOTICE)。古典原文遵循各自的[来源许可](https://github.com/yysun/shiqu/blob/main/data/library/source-notices.md)。生成的故事与插图不会自动适用代码许可,分享前请检查[署名与转载说明](https://github.com/yysun/shiqu/blob/main/.docs/user-guide.md#署名与转载)及 [ZIP 内容](https://github.com/yysun/shiqu/blob/main/.docs/user-guide.md#zip-内容与提示词分享)。
@@ -0,0 +1,92 @@
1
+ This Font Software is licensed under the SIL Open Font License,
2
+ Version 1.1.
3
+
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+ -----------------------------------------------------------
8
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
9
+ -----------------------------------------------------------
10
+
11
+ PREAMBLE
12
+ The goals of the Open Font License (OFL) are to stimulate worldwide
13
+ development of collaborative font projects, to support the font
14
+ creation efforts of academic and linguistic communities, and to
15
+ provide a free and open framework in which fonts may be shared and
16
+ improved in partnership with others.
17
+
18
+ The OFL allows the licensed fonts to be used, studied, modified and
19
+ redistributed freely as long as they are not sold by themselves. The
20
+ fonts, including any derivative works, can be bundled, embedded,
21
+ redistributed and/or sold with any software provided that any reserved
22
+ names are not used by derivative works. The fonts and derivatives,
23
+ however, cannot be released under any other type of license. The
24
+ requirement for fonts to remain under this license does not apply to
25
+ any document created using the fonts or their derivatives.
26
+
27
+ DEFINITIONS
28
+ "Font Software" refers to the set of files released by the Copyright
29
+ Holder(s) under this license and clearly marked as such. This may
30
+ include source files, build scripts and documentation.
31
+
32
+ "Reserved Font Name" refers to any names specified as such after the
33
+ copyright statement(s).
34
+
35
+ "Original Version" refers to the collection of Font Software
36
+ components as distributed by the Copyright Holder(s).
37
+
38
+ "Modified Version" refers to any derivative made by adding to,
39
+ deleting, or substituting -- in part or in whole -- any of the
40
+ components of the Original Version, by changing formats or by porting
41
+ the Font Software to a new environment.
42
+
43
+ "Author" refers to any designer, engineer, programmer, technical
44
+ writer or other person who contributed to the Font Software.
45
+
46
+ PERMISSION & CONDITIONS
47
+ Permission is hereby granted, free of charge, to any person obtaining
48
+ a copy of the Font Software, to use, study, copy, merge, embed,
49
+ modify, redistribute, and sell modified and unmodified copies of the
50
+ Font Software, subject to the following conditions:
51
+
52
+ 1) Neither the Font Software nor any of its individual components, in
53
+ Original or Modified Versions, may be sold by itself.
54
+
55
+ 2) Original or Modified Versions of the Font Software may be bundled,
56
+ redistributed and/or sold with any software, provided that each copy
57
+ contains the above copyright notice and this license. These can be
58
+ included either as stand-alone text files, human-readable headers or
59
+ in the appropriate machine-readable metadata fields within text or
60
+ binary files as long as those fields can be easily viewed by the user.
61
+
62
+ 3) No Modified Version of the Font Software may use the Reserved Font
63
+ Name(s) unless explicit written permission is granted by the
64
+ corresponding Copyright Holder. This restriction only applies to the
65
+ primary font name as presented to the users.
66
+
67
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
68
+ Software shall not be used to promote, endorse or advertise any
69
+ Modified Version, except to acknowledge the contribution(s) of the
70
+ Copyright Holder(s) and the Author(s) or with their explicit written
71
+ permission.
72
+
73
+ 5) The Font Software, modified or unmodified, in part or in whole,
74
+ must be distributed entirely under this license, and must not be
75
+ distributed under any other license. The requirement for fonts to
76
+ remain under this license does not apply to any document created using
77
+ the Font Software.
78
+
79
+ TERMINATION
80
+ This license becomes null and void if any of the above conditions are
81
+ not met.
82
+
83
+ DISCLAIMER
84
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
85
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
86
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
87
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
88
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
89
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
90
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
91
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
92
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,8 @@
1
+ # Offline export font
2
+
3
+ `NotoSansCJKsc-Regular.otf` is the Noto CJK Simplified Chinese regular font from
4
+ https://github.com/notofonts/noto-cjk/tree/main/Sans/OTF/SimplifiedChinese.
5
+ Its SIL Open Font License is retained in `OFL.txt`.
6
+
7
+ The CLI registers this bundled font for Chinese export text so offline ZIP watermarks,
8
+ PDF and PNG do not depend on an operating system's installed CJK fonts.