exp:expurlexport
Export the URL translator, the wildcards and the redirects as a URL map (CSV, JSON, .xlsx, .ods, Apache or nginx rules).
Script bin/php/expurlexport.php, code in kernel/private/classes/commands/expurlexport.php. Run it from the installation root, as the user the web server runs as:
./console exp:expurlexport --help
./console exp:url:export --help
php bin/php/expurlexport.php --helpHelp text
Export the URL translator, the wildcards and the redirects as a URL map
Writes the global URL aliases (with --include-node-aliases also the custom aliases of nodes), the URL
wildcards and the redirects of exp_url_redirect in any format exp:url:import reads (and .ods); a
redirect's -s filter is the siteaccess it belongs to. Importing the file again gives the same entries.
./console exp:url:export --output=var/tmp/url-map.xlsx
./console exp:url:export --kind=wildcard,redirect --format=nginx
./console exp:url:export --kind=redirect -s site --language=ger-DE --format=jsonOptions
| Option | Value | Help |
|---|---|---|
--format | required | import: the format of the file (csv, json, xlsx, ods, apache, nginx; default from its name or content); export: the format to write (default from --output, else csv); batches, undo, from-sitemap, from-404, suggest, test: text (default) or json (the machine output exp-url/1) |
--kind | required | Only these kinds: alias (the URL translator), wildcard, redirect (a comma list or repeated; default all) |
--language | required | import: the language of rows without one (default the siteaccess's); export: only this language |
--output | required | The file to write (default the standard output; needed for xlsx and ods) |
--include-node-aliases | Also the custom URL aliases of nodes (target node:<id>), not only the URL translator's | |
--output-format | required | import, export: what the command prints, text (default) or json (the machine output exp-url/1); --format is the file's format there; from-sitemap, from-404, suggest: the format of the file written (csv, json, xlsx, ods, apache, nginx; default from --output, else csv) |
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/expurlexport.php, kernel/private/classes/commands/expurlexport.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.