exp:exphelp
Available since Exponential 6.0.15 (in development, not in a release yet).
Summary
The help system on the command line: build and describe the index of doc/, search it, show a page's metadata, check its links and images
Usage
./console exp:exphelp [options] php bin/php/exphelp.php [options] ./console exp:help [options]
Aliases
exp:help
Help
The output of ./console help exp:exphelp (the script run with --help), without the standard options:
Usage: bin/php/exphelp.php [OPTION]...
The help system: the index of the documentation, its search and its link check
./console exp:help index build the index (if it is not current) and describe it
./console exp:help index --rebuild build it again, whatever is cached
./console exp:help index --list one line per page: id, type, category, audiences, title
./console exp:help index --no-images without fetching the pages' external images
./console exp:help search "clear cache" search the pages (--audience, --category, --type, --limit)
./console exp:help show guides/caches.md the metadata and headings of one page
./console exp:help check check the links and images of every page (--below=guides/)
./console exp:help pdf help/searching.md the page as a PDF file (--out=file.pdf, --base-url=https://host)
./console exp:help maps --language=ger-de check doc/ger-de/.paths.json and .dirnames.json; --fix writes the
union of both sides of a git conflict (and of --paths=, --dirnames=)
Only git-tracked files below doc/ (and the doc/ of the extensions in exphelp.ini ExtensionDocDirs[]) are
pages; nothing is changed except the cache in var/<site>/cache/exphelp. --json prints one JSON document.
index builds the index of every language of exphelp.ini [DocLanguages] (doc/eng-us/, doc/ger-de/ ...);
--language=ger-de limits it to one, and makes search, show, check and pdf read that language.
index also stores a copy of every https image a page shows (README.md's screenshots) in the cache's
images/, served by exphelp/image, so the admin's Content Security Policy allows them.
Exit code: 0 fine, 1 check found errors (with --strict also warnings) or nothing was found, 2 error.
Options:
--rebuild index: build the index again even when the cached one is current
--list index: list every page
--no-images index: do not fetch the external images of the pages (they stay links)
--keep-search index: keep a current search index instead of building it again (the background build a help page starts)
--json Print one JSON document instead of the text
--audience=VALUE search, index --list: only pages for this audience (editor, admin, developer, user)
--category=VALUE search, index --list: only pages of this category
--type=VALUE search, index --list: only pages of this type (guide, feature, bc, changelog ...)
--limit=VALUE search: the number of results (default 10)
--below=VALUE check, index --list: only the pages whose id starts with this (e.g. guides/)
--all check: also list the notices (links to files that are not help pages)
--strict check: exit 1 on warnings too
--out=VALUE pdf: the file to write (default: the page title as file name, in the current directory)
--base-url=VALUE pdf: scheme and host for the links and the page address (https://www.example.com)
--language=VALUE the documentation language: a directory of exphelp.ini [DocLanguages] Directories[] (eng-us, ger-de; the old en/us and de are accepted)
--fix maps: write .paths.json and .dirnames.json as the union of their entries, sorted
--paths=VALUE maps --fix: also merge the entries of this JSON file into .paths.json
--dirnames=VALUE maps --fix: also merge the entries of this JSON file into .dirnames.jsonOptions
| Option | Value | Description |
|---|---|---|
| --rebuild | - | index: build the index again even when the cached one is current |
| --list | - | index: list every page |
| --no-images | - | index: do not fetch the external images of the pages (they stay links) |
| --keep-search | - | index: keep a current search index instead of building it again (the background build a help page starts) |
| --json | - | Print one JSON document instead of the text |
| --audience | required | search, index --list: only pages for this audience (editor, admin, developer, user) |
| --category | required | search, index --list: only pages of this category |
| --type | required | search, index --list: only pages of this type (guide, feature, bc, changelog ...) |
| --limit | required | search: the number of results (default 10) |
| --below | required | check, index --list: only the pages whose id starts with this (e.g. guides/) |
| --all | - | check: also list the notices (links to files that are not help pages) |
| --strict | - | check: exit 1 on warnings too |
| --out | required | pdf: the file to write (default: the page title as file name, in the current directory) |
| --base-url | required | pdf: scheme and host for the links and the page address (https://www.example.com) |
| --language | required | the documentation language: a directory of exphelp.ini [DocLanguages] Directories[] (eng-us, ger-de; the old en/us and de are accepted) |
| --fix | - | maps: write .paths.json and .dirnames.json as the union of their entries, sorted |
| --paths | required | maps --fix: also merge the entries of this JSON file into .paths.json |
| --dirnames | required | maps --fix: also merge the entries of this JSON file into .dirnames.json |
Standard options
Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.
Source
bin/php/exphelp.php, kernel/private/classes/commands/exphelp.php
See also
Generated example: exp:exphelp
Added to the reference for Exponential 6.0.15.
Contributors
- Graham Brookins Updated
Comments
Add a comment