Quay lại BookField

BookField định dạng package

wbpkg

Package mà BookField có thể xác thực, cài đặt và đọc

Ảnh chụp phiên bản

workbook.toml
schema_version = 4
.wbpkg/manifest.json
schemaVersion = 5
reader_manifest.json
schemaVersion = 3
reader.rdoc
schemaVersion = 3
Reader SQLite schema
db_schema_version = 17

Tóm tắt

Package mà BookField có thể xác thực, cài đặt và đọc

Một ranh giới cài đặt duy nhất cho một work và một edition. manifest.json là contract công khai mà BookField đọc trước import. Legacy packageKind và presentation fields không thuộc package shape hiện tại.

Vùng chứa có thể cài đặt

Một ranh giới cài đặt duy nhất cho một work và một edition.

Manifest v5

manifest.json là contract công khai mà BookField đọc trước import. Legacy packageKind và presentation fields không thuộc package shape hiện tại.

ReaderDoc v3

ReaderDoc content được chuẩn bị cho import, nên reader không parse EPUB, HTML hoặc CSS lúc runtime.

Cây điều hướng

navigationTree quyết định entry point và mục lục cấp package của reader.

Chỉ mục locator

Khi canonical docs hoặc schema files thay đổi, hãy cập nhật source trước, rồi làm mới public snapshot và phần giải thích này.

Kế hoạch học

Authored study plans chỉ nằm trong manifest.json khi package có schedule data.

Bố cục package

Các file canonical trong wbpkg

Package paths là POSIX paths tương đối từ package root. Text packages chứa ReaderDoc files dưới reader/, còn image, audio hoặc video only packages có thể bỏ reader/.

.wbpkg
manifest.json
reader/{assetId}/reader_manifest.json
reader/{assetId}/reader.rdoc
images/{assetId}.{ext}
images/{assetId}-thumb.{ext}
media/{assetId}.{ext}
locator/{profileId}.json

Manifest contract

Manifest v5 định nghĩa install contract

manifest.json là contract công khai mà BookField đọc trước import. Legacy packageKind và presentation fields không thuộc package shape hiện tại.

packageId / packageVersion

manifest.json là contract công khai mà BookField đọc trước import. Legacy packageKind và presentation fields không thuộc package shape hiện tại.

work / edition

Một ranh giới cài đặt duy nhất cho một work và một edition.

assets

Package paths là POSIX paths tương đối từ package root. Text packages chứa ReaderDoc files dưới reader/, còn image, audio hoặc video only packages có thể bỏ reader/.

navigationTree

navigationTree quyết định entry point và mục lục cấp package của reader.

studyPlans

Authored study plans chỉ nằm trong manifest.json khi package có schedule data.

bindings

Khi canonical docs hoặc schema files thay đổi, hãy cập nhật source trước, rồi làm mới public snapshot và phần giải thích này.

Tạo package

Tách production tooling khỏi public package boundary

  1. 1

    Chuẩn bị source content

    Chuẩn bị source content, metadata, media và authored schedules hoặc references.

  2. 2

    Tạo wbpkg

    Tạo installable package với manifest metadata, ReaderDoc content, media, navigation và locator files.

  3. 3

    Xác minh trước khi chia sẻ

    Kiểm tra package structure và schema compatibility trước distribution.

Reader import

BookField đọc installed package cục bộ

  1. 1

    Xác thực

    BookField kiểm tra package shape và từ chối unsupported hoặc malformed packages.

  2. 2

    Giải nén

    Supported package assets được unpack vào app-owned local storage.

  3. 3

    Import vào SQLite

    ReaderDoc payloads, navigation, locator indexes, search records và schedules được đăng ký cho offline use.

Tương thích

Quy tắc giữ packages dễ dự đoán

  • Từ chối legacy packageKind values.
  • Từ chối legacy presentation fields.
  • Từ chối non-canonical package paths.
  • Từ chối malformed structured references.
  • Không đưa source EPUB files vào installable wbpkg.

Canonical references

Chính sách cập nhật

Trang công khai này là implementation-facing overview, không phải canonical schema source. Canonical docs và schema files nằm cùng BookField source materials.

Source docs và schema files

  • 00-spec-index.md

    Trang công khai này là implementation-facing overview, không phải canonical schema source. Canonical docs và schema files nằm cùng BookField source materials.

  • 04-manifest-json-schema.md

    manifest.json là contract công khai mà BookField đọc trước import. Legacy packageKind và presentation fields không thuộc package shape hiện tại.

  • 08-reader-app-design.md

    BookField đọc installed package cục bộ

  • schemas/manifest-v5.schema.json / readerdoc-v3.schema.json

    Trang công khai này là implementation-facing overview, không phải canonical schema source. Canonical docs và schema files nằm cùng BookField source materials.

Khi canonical docs hoặc schema files thay đổi, hãy cập nhật source trước, rồi làm mới public snapshot và phần giải thích này.

Lập kế hoạch BookField package distribution

Quay lại product overview hoặc trao đổi xem wbpkg distribution flow có hợp với content model của bạn không.