exp:exphelp
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.
Script bin/php/exphelp.php, code in kernel/private/classes/commands/exphelp.php. Run it from the installation root, as the user the web server runs as:
./console exp:exphelp --help
./console exp:help --help
php bin/php/exphelp.php --helpHelp text
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
| Option | Value | Help |
|---|---|---|
--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 |
Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).
Related
Generated by ./console exp:help:examples from bin/php/exphelp.php, kernel/private/classes/commands/exphelp.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.