Jump to content

Manual:GetText.php: Difference between revisions

From mediawiki.org
Content deleted Content added
Update commands to use run.php
m run.php
Line 46: Line 46:
</translate>
</translate>
{{terminal|text=<nowiki>
{{terminal|text=<nowiki>
$ php maintenance/run.php getText "page title" | sed -e '...' | php maintenance/edit.php "page title"
$ php maintenance/run.php getText "page title" | sed -e '...' | php maintenance/run.php edit "page title"
</nowiki>
</nowiki>
}}
}}

Revision as of 02:51, 31 December 2024

MediaWiki version:
1.16

Details

getText.php file is a maintenance script that outputs content of a given page (wikitext) to stdout. It could be used for scripting.

Options/Arguments

Option/Argument Description Required?
<title> Page title Required
--revision Revision ID Optional
--show-private Show the text even if it's not available to the public Optional

Usage

php maintenance/run.php getText <title> [ --revision| --show-private ]
Terminal
In MediaWiki version MediaWiki 1.39 and earlier, you must invoke maintenance scripts using php maintenance/scriptName.php instead of php maintenance/run.php scriptName.

Advanced usage

Terminal

If page title contains whitespace, it should be enclosed in double quotes ("), as shown in example.

See also