word-count

command
v0.6.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

word-count is an example mdpress plugin that counts words in each chapter.

Protocol:

  • Reads a JSON request from stdin on each hook invocation.
  • Writes a JSON response to stdout with optional content modifications.
  • Logs statistics to stderr; mdpress captures stderr and emits it as debug logs.

Supported flags:

--mdpress-info   Print plugin metadata as JSON and exit.
--mdpress-hooks  Print the list of hook phases this plugin handles and exit.

Example book.yaml entry:

plugins:
  - name: word-count
    path: ./plugins/word-count
    config:
      warn_threshold: 500

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL