ZealDocsets.Index (zeal_docsets v0.1.7)

Copy Markdown View Source

Builds the SQLite search index (docSet.dsidx) for a Zeal/Dash docset.

The index is a SQLite database with a single searchIndex table:

CREATE TABLE searchIndex(
  id   INTEGER PRIMARY KEY,
  name TEXT,
  type TEXT,
  path TEXT
);

Each row maps a named entry to a type and a relative HTML path (including anchor). Zeal uses this index to power its search bar.

Entry types indexed

  • Module — one entry per module page (main.page-module).
  • Command — Mix tasks listed in api-reference.html.
  • Function — public functions in module summary sections.
  • Type — typespecs in module summary sections.
  • Callback — behaviour callbacks in module summary sections.
  • Macro — macros in module summary sections.
  • Guide — extra pages (main.page-extra), such as tutorials and guides.

Function/type/callback/macro entries are named with their fully-qualified Module.member/arity (e.g. Postgrex.Types.define/3), so that Dash/Zeal can resolve qualified lookups like Postgrex.Types.define.

Summary

Functions

Builds the docSet.dsidx SQLite index at db_path from the mirrored documentation in docs_root for package.

Functions

build!(db_path, docs_root, package)

@spec build!(Path.t(), Path.t(), String.t()) :: :ok

Builds the docSet.dsidx SQLite index at db_path from the mirrored documentation in docs_root for package.

Removes any existing database at db_path before creating a fresh one. Raises on filesystem or SQLite errors.