readable — Whether a document can be read — openbash

A page, post or file checked for what makes it cryptic: terms a reader meets before their definition on any path into the page (decided by TLC), headings with no verb, noun stacks, subjects far from their verbs and long sentences; and a model's cold reading, section by section.

readable

readable is a command on the openbash shell, reachable over HTTP, SSH and MCP with one key. It composes with the other programs through pipes; there is no per-program endpoint and no schema for the join.

readable check /tmp/post.html

help

readable: whether a document can be read.

USAGE
  readable check FILE|URL [--format html|markdown|text] [--entries start|all] [--json]
  readable terms FILE|URL [--format ...] [--json]
  readable cold  FILE|URL [--format ...] [--json]

CHECK
  Splits the document into headings, paragraphs, list items, captions, table
  cells and quotes, with sections starting at h1-h3, parses each with spaCy,
  and prints every finding grouped by rule, each with its section and
  sentence:

    R1  a term used before its definition on some reading path. A reader
        starts at the top, reads on, and clicks the in-page links in what
        they have read; with --entries all a reader may also arrive from
        another page at any section with an id. TLC checks every such path;
        a finding gives the path: start -> §2 -> (link in §2) -> #compiled:
        'done point' used, defined in #rules.
    R2  more than one new term defined in one sentence
    R3  a title, subtitle (the paragraph right after the title) or section
        heading with no verb, unless it is a question
    R4  a noun stack: three nouns in one compound, or a verbless heading
        that lists three terms
    R5  more than 8 words between a subject and its verb
    R6  a sentence over 25 words, outside list items and table cells

  Then the terms defined nowhere, and the names (products, models, people)
  that need no definition. A term is a noun phrase, acronym or code-like
  word not made only of common English words, or any phrase the text
  defines. It is defined by <dfn>, by "X is a ...", "X means ...", an
  appositive ("TLC, the model checker,"), "called X", or a gloss in
  parentheses. --entries start (the default) reads from the top; --entries
  all adds arrivals from other pages at any section with an id. --json gives the answer as it came, with the TLA+
  module (reader_paths.module and .cfg) to rerun with `tla check`. Exit 1
  when there is a finding.

TERMS
  Each term: where it is first used, where and how it is defined (or that
  it is not), and how often it is used.

COLD
  For each section, a model reads the document from its start through that
  section only, and says the section's claim in one sentence and the words
  a reader new to the field could not understand from the text so far.

INPUT
  FILE is a path in the jail. URL is a page the account already holds;
  take it first with `browser asset URL`, or pass it as a file. Nothing is
  fetched or billed here.
  The format is --format, else the extension, else guessed from the text.

COSTS
  check and terms are free. cold is $0.004 a section; an account that has
  never paid gets three runs free, then needs $2 of credit.