|
|
Line 1: |
Line 1: |
| {{DISPLAYTITLE:extensions/ContentTransfer/maintenance/executeTransfer.php}} | | {{DISPLAYTITLE:extensions/BlueSpiceUEModuleBookPDF/maintenance/dumpPDF.php}} |
| | |
| [[Setup:Installation_Guide/Advanced/Maintenance_scripts|{{Icon|bi bi-arrow-right-circle|||}} all maintenance scripts]] | | [[Setup:Installation_Guide/Advanced/Maintenance_scripts|{{Icon|bi bi-arrow-right-circle|||}} all maintenance scripts]] |
| == Reference == | | ==Reference== |
| BlueSpice Extension: [[Reference:ContentTransfer|ContentTransfer]] | | BlueSpice Extension: [[Reference:BlueSpiceUEModuleBookPDF|BlueSpiceUEMoudleBookPDF]] |
| | |
| == Usage ==
| |
|
| |
| There are three ways to specify pages which pages to transfer:
| |
| | |
| * <code>'''--category'''</code>: This option lets you transfer based on category:<syntaxhighlight lang="php">
| |
| php extensions/ContentTransfer/maintenance/executeTransfer.php --category=GlobalPage --targets=Target1,Target2,Target3
| |
| </syntaxhighlight>
| |
| * <code>'''--namespace'''</code>: This option lets you transfer based on namespace ID:<syntaxhighlight lang="php">
| |
| php extensions/ContentTransfer/maintenance/executeTransfer.php --namespace=10 --targets=Target1,Target2,Target3
| |
| </syntaxhighlight>
| |
| * <code>'''--pages'''</code> This option lets you explicitly specify which pages to transfer:<syntaxhighlight lang="php">
| |
| php extensions/ContentTransfer/maintenance/executeTransfer.php --pages=Page1,Demo:Page2,Page3 --targets=Target1,Target2,Target3
| |
| </syntaxhighlight>
| |
| | |
| == Configuration ==
| |
| The maintenance script can consume a JSON file with the necessary configuration. A sample JSON file is located at this path: <code>extensions/ContentTransfer/docs/transfer-config.json.example</code>. This file can be used to create a JSON configuration file somewhere, so that it is not necessary to type all options in the CLI each time.
| |
| | |
| For that, <code>--json-config</code> can be used. There can be a specified path to the file with the JSON configuration.
| |
| | |
| If you need to create your own JSON configuration file, copy the sample JSON file somewhere and edit it to set the necessary configuration.
| |
| | |
| For example, you have the file <code>/home/some_user/config/transfer-config.json</code>. Then it can be used like that:
| |
| <code>php extensions/ContentTransfer/maintenance/executeTransfer.php --json-config=/home/some_user/config/transfer-config.json</code>
| |
| You can specify either an absolute file path from the root or a relative path from the present working directory.
| |
| | |
| | |
| '''Note!'''
| |
| | |
| It is also possible to use a JSON file and additionally pass options from the CLI. In that case, the options from CLI will have greater priority and '''will override''' the same options from JSON file.
| |
| | |
| Example:
| |
| <code>php extensions/ContentTransfer/maintenance/executeTransfer.php --json-config=/home/some_user/config/transfer-config.json --pages=Page1,Demo:Page2,Page3 --targets=Target1,Target2,Target3</code>
| |
| Here, the script will read the configuration from the specified JSON file , but the '''“pages”''' and '''“targets”''' options '''will be overridden''' from the CLI (if they are presented in JSON). The same is true for the other options.
| |
| | |
| == Options ==
| |
| | |
| * <code>--user</code>: The context user of the "sending" wiki who will be used to transfer wiki pages. This is just about recording the transfer in the DB. Default: '''“MediaWiki default”'''
| |
| * <code>--only-modified</code>: If the page should be transferred only if it was modified since the last transfer. '''It's just a flag, it can be passed or not.'''
| |
| * <code>--modified-since</code>:Transfer the page only if it was modified since the specified date. The date must be specified in the format '''"DD.MM.YYYY"'''. Default: '''“”'''
| |
| * <code>--include-related</code>:If all related wiki pages should also be transferred (templates, files, links, and so on, which are used on the page to be transferred. '''It's just a flag, it can be passed or not.'''
| |
| * <code>--force</code>:Transfer the page even if it is protected on the receiving wiki. '''It's just a flag, it can be passed or not.'''
| |
| | |
| Also there is a <code>--dry</code> option (it's a flag too), which may be useful if a user just wants to take a look at transferring titles, but without actual changes in “receiving” wikis.
| |
| | |
| You can see a complete list of possible options with descriptions by the following command:
| |
| <code>php extensions/ContentTransfer/maintenance/executeTransfer.php --help</code>
| |
|
| |
|
| | ==Usage== |
| | ==Configuration == |
|
| |
|
| If there is a need to set a specific user for creating pages in the target wiki , it can be done that way:
| | ==Options== |
| <code>php extensions/ContentTransfer/maintenance/executeTransfer.php ... --targets=Target1=User1,Target2=User2,Target3...</code>
| |