MediaWiki master
parse.php File Reference

Parse some wikitext. More...

Go to the source code of this file.

Classes

class  CLIParser
 Maintenance script to parse some wikitext. More...
 

Variables

 $maintClass = CLIParser::class
 

Detailed Description

Parse some wikitext.

Wikitext can be given by stdin or using a file. The wikitext will be parsed using 'CLIParser' as a title. This can be overridden with –title option.

Example1:

$ php parse.php --title foo
''[[foo]]''^D
<p><i><strong class="selflink">foo</strong></i>
</p>

Example2:

$ echo "'''bold'''" > /tmp/foo.txt
$ php parse.php /tmp/foo.txt
<p><b>bold</b>
</p>$

Example3:

$ cat /tmp/foo | php parse.php
<p><b>bold</b>
</p>$
Note
GPL-2.0-or-later
Author
Antoine Musso <hashar at free dot fr>
Note
GPL-2.0-or-later

Definition in file parse.php.

Variable Documentation

◆ $maintClass

$maintClass = CLIParser::class

Definition at line 142 of file parse.php.