exp:exptemplateconvertdiff
Available since Exponential 6.0.15 (in development, not in a release yet).
Summary
Print the conversion of one template to another engine on stdout, without writing anything (--file, --to-engine, --from-engine)
Usage
./console exp:exptemplateconvertdiff [options] php bin/php/exptemplateconvertdiff.php [options] ./console exp:template:convert:diff [options]
Aliases
exp:template:convert:diff
Help
The output of ./console help exp:exptemplateconvertdiff (the script run with --help), without the standard options:
Usage: bin/php/exptemplateconvertdiff.php [OPTION]... Print the conversion of one template to another engine, without writing anything The engine of --file follows from its ending unless --from-engine is given. The converted text goes to stdout, the NOTE lines of what could not be converted exactly to stderr; with --against=<file> the converted text is compared with that file (a target written before and perhaps edited by hand) and the differences are printed as a unified diff. ./console exp:template:convert:diff --file=design/<design>/templates/<name>.tpl --to-engine=twig ./console exp:template:convert:diff --file=<name>.tpl --to-engine=twig --against=<name>.twig Exit code: 0 converted (no differences with --against); 1 notes, a check failed, or differences; 2 wrong options; 3 the conversion is not available. Options: --file=VALUE the template to convert --from-engine=VALUE its engine: tpl, stpl or twig (default: from the file ending) --to-engine=VALUE the engine to convert it to: tpl, stpl or twig --against=VALUE compare the conversion with this file and print a unified diff
Options
| Option | Value | Description |
|---|---|---|
| --file | required | the template to convert |
| --from-engine | required | its engine: tpl, stpl or twig (default: from the file ending) |
| --to-engine | required | the engine to convert it to: tpl, stpl or twig |
| --against | required | compare the conversion with this file and print a unified diff |
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/exptemplateconvertdiff.php, kernel/private/classes/commands/exptemplateconvertdiff.php
See also
Generated example: exp:exptemplateconvertdiff
Added to the reference for Exponential 6.0.15.
Contributors
- Graham Brookins Updated
Comments
Add a comment