Skip to the content
Documentation

exp:exphelpexamples

No ratings yet

Available since Exponential 6.0.15 (in development, not in a release yet).

Summary

Generate the reference examples of the help below doc/eng-us/examples/ from the code: template operators and functions, fetch functions, module views, policies, INI settings, datatypes, workflow events, cronjobs, console commands and extension points

Usage

./console exp:exphelpexamples [options]
php bin/php/exphelpexamples.php [options]
./console exp:help:examples [options]

Aliases

exp:help:examples

Help

The output of ./console help exp:exphelpexamples (the script run with --help), without the standard options:

Notice: This script uses 'use-extensions' => false, meaning extension settings are not loaded!
Usage: bin/php/exphelpexamples.php [OPTION]...
The generated reference examples of the help (doc/eng-us/examples/)

./console exp:help:examples                      write the pages of every area (only changed files are written)
./console exp:help:examples --area=datatypes     only this area (repeat with a comma: --area=datatypes,cronjobs)
./console exp:help:examples --check              compare only: exit 1 when a page is missing, different or stale
./console exp:help:examples --list               the areas and how many pages each has
./console exp:help:examples --language=ger-de    the same pages in a translation (doc/ger-de/beispiele/), with
                                                 their entries in doc/ger-de/.paths.json
./console exp:help:examples --language=ger-de --worklist=var/tmp/todo.json
                                                 also write the source texts that have no translation yet

A translation reads its text from doc/<language>/.examples/: strings.json (the fixed text of the pages) and
descriptions/*.json (the comments and descriptions quoted from the sources, by item). A text without a
translation is written in English and counted as untranslated.

The pages are read from the git-tracked sources of this installation (the template autoload files,
function_definition.php, module.php, operation_definition.php, the shipped INI files, the datatype and
workflow event classes, cronjob.ini and the command classes). The same sources always give the same pages.
Only pages marked "generated: exp:help:examples" are replaced or removed; nothing else below doc/ is
touched. Run "./console exp:help index" afterwards to rebuild the help index.
Exit code: 0 fine, 1 --check found differences, 2 error.


Options:
  --area=VALUE      Only these areas, comma separated (template-operators, template-functions, fetch-functions, module-views, policies, ini-settings, datatypes, workflow-events, cronjobs, commands, extension-points)
  --check           Compare the generated pages with the files and change nothing; exit 1 on a difference
  --list            List the areas with their page counts
  --out=VALUE       The output directory relative to the installation root (default doc/eng-us/examples, or the translation's directory)
  --language=VALUE  Write the pages in a translation: a language directory below doc/ (ger-de); default the English original
  --worklist=VALUE  With --language: write the source texts without a translation to this file, as a description catalogue to fill in

Options

Option Value Description
--area required Only these areas, comma separated (template-operators, template-functions, fetch-functions, module-views, policies, ini-settings, datatypes, workflow-events, cronjobs, commands, extension-points)
--check - Compare the generated pages with the files and change nothing; exit 1 on a difference
--list - List the areas with their page counts
--out required The output directory relative to the installation root (default doc/eng-us/examples, or the translation's directory)
--language required Write the pages in a translation: a language directory below doc/ (ger-de); default the English original
--worklist required With --language: write the source texts without a translation to this file, as a description catalogue to fill in

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/exphelpexamples.php, kernel/private/classes/commands/exphelpexamples.php

See also

Generated example: exp:exphelpexamples

Added to the reference for Exponential 6.0.15.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.