Jump to content

Manual:GetText.php: Difference between revisions

From mediawiki.org
Content deleted Content added
m run.php
m Dark mode fix.
 
Line 12: Line 12:
== Options/Arguments == <!--T:9-->
== Options/Arguments == <!--T:9-->
</translate>
</translate>
{| class="wikitable" style="width: 75%; border:1px solid #338800; background-color:#FEFEFE;"
{| class="wikitable" style="width: 75%; border:1px solid #338800"
|-
|-
! width="15%" | <translate><!--T:10--> Option/Argument</translate>
! width="15%" | <translate><!--T:10--> Option/Argument</translate>
Line 26: Line 26:


<translate>
<translate>

== Usage == <!--T:5-->
== Usage == <!--T:5-->
</translate>
</translate>

Latest revision as of 11:58, 27 September 2025

MediaWiki version:
1.16

Details

[edit | edit source]

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

[edit | edit source]
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

[edit | edit source]
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

[edit | edit source]
Terminal

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

See also

[edit | edit source]