Помош со Извршникот на МедијаВики

Ова е самосоздадена документациска страница за извршникот на МедијаВики.

Документација и примери: https://www.mediawiki.org/wiki/API

action=parse

(main | parse)
  • За овој модул се потребни права на читање.
  • Извор: MediaWiki
  • Лиценца: GPL-2.0+

Parses content and returns parser output.

See the various prop-modules of action=query to get information from the current version of a page.

There are several ways to specify the text to parse:

  1. Specify a page or revision, using page, pageid, or oldid.
  2. Specify content explicitly, using text, title, revid, and contentmodel.
  3. Specify only a summary to parse. prop should be given an empty value.
Параметри:
title

Title of page the text belongs to. If omitted, contentmodel must be specified, and API will be used as the title.

text

Text to parse. Use title or contentmodel to control the content model.

revid

Revision ID, for {{REVISIONID}} and similar variables.

Тип: цел број
summary

Опис за расчленување.

page

Parse the content of this page. Cannot be used together with text and title.

pageid

Parse the content of this page. Overrides page.

Тип: цел број
redirects

If page or pageid is set to a redirect, resolve it.

Тип: булов (подробно)
oldid

Parse the content of this revision. Overrides page and pageid.

Тип: цел број
prop

Which pieces of information to get:

text
Gives the parsed text of the wikitext.
langlinks
Gives the language links in the parsed wikitext.
categories
Gives the categories in the parsed wikitext.
categorieshtml
Gives the HTML version of the categories.
links
Gives the internal links in the parsed wikitext.
templates
Gives the templates in the parsed wikitext.
images
Gives the images in the parsed wikitext.
externallinks
Gives the external links in the parsed wikitext.
sections
Gives the sections in the parsed wikitext.
revid
Adds the revision ID of the parsed page.
displaytitle
Adds the title of the parsed wikitext.
headhtml
Gives parsed <head> of the page.
modules
Gives the ResourceLoader modules used on the page. To load, use mw.loader.using(). Either jsconfigvars or encodedjsconfigvars must be requested jointly with modules.
jsconfigvars
Gives the JavaScript configuration variables specific to the page. To apply, use mw.config.set().
encodedjsconfigvars
Gives the JavaScript configuration variables specific to the page as a JSON string.
indicators
Gives the HTML of page status indicators used on the page.
iwlinks
Gives interwiki links in the parsed wikitext.
wikitext
Gives the original wikitext that was parsed.
properties
Gives various properties defined in the parsed wikitext.
limitreportdata
Gives the limit report in a structured way. Gives no data, when disablelimitreport is set.
limitreporthtml
Gives the HTML version of the limit report. Gives no data, when disablelimitreport is set.
parsetree
The XML parse tree of revision content (requires content model wikitext)
parsewarnings
Gives the warnings that occurred while parsing content.
headitems
Застарен. Gives items to put in the <head> of the page.
Вредности (одделете ги со |): text, langlinks, categories, categorieshtml, links, templates, images, externallinks, sections, revid, displaytitle, headhtml, modules, jsconfigvars, encodedjsconfigvars, indicators, iwlinks, wikitext, properties, limitreportdata, limitreporthtml, parsetree, parsewarnings, headitems
По основно: text|langlinks|categories|links|templates|images|externallinks|sections|revid|displaytitle|iwlinks|properties|parsewarnings
wrapoutputclass

CSS class to use to wrap the parser output.

По основно: mw-parser-output
pst

Do a pre-save transform on the input before parsing it. Only valid when used with text.

Тип: булов (подробно)
onlypst

Do a pre-save transform (PST) on the input, but don't parse it. Returns the same wikitext, after a PST has been applied. Only valid when used with text.

Тип: булов (подробно)
effectivelanglinks
Застарен.

Includes language links supplied by extensions (for use with prop=langlinks).

Тип: булов (подробно)
section

Only parse the content of this section number.

When new, parse text and sectiontitle as if adding a new section to the page.

new is allowed only when specifying text.

sectiontitle

New section title when section is new.

Unlike page editing, this does not fall back to summary when omitted or empty.

disablepp
Застарен.

Use disablelimitreport instead.

Тип: булов (подробно)
disablelimitreport

Omit the limit report ("NewPP limit report") from the parser output.

Тип: булов (подробно)
disableeditsection

Omit edit section links from the parser output.

Тип: булов (подробно)
disabletidy

Do not run HTML cleanup (e.g. tidy) on the parser output.

Тип: булов (подробно)
generatexml
Застарен.

Generate XML parse tree (requires content model wikitext; replaced by prop=parsetree).

Тип: булов (подробно)
preview

Расчлени во прегледен режим.

Тип: булов (подробно)
sectionpreview

Расчлени во прегледен режим на поднасловот (го овозможува и прегледниот режим).

Тип: булов (подробно)
disabletoc

Изземи го преглед на содржината во изводот.

Тип: булов (подробно)
useskin

Apply the selected skin to the parser output. May affect the following properties: langlinks, headitems, modules, jsconfigvars, indicators.

Една вредност: vector, minervaneue, minerva
contentformat

Формат на серијализацијата на содржината во вносниот текст. Важи само кога се користи со text.

Една вредност: text/x-wiki, text/javascript, application/json, text/css, text/plain
contentmodel

Content model of the input text. If omitted, title must be specified, and default will be the model of the specified title. Only valid when used with text.

Една вредност: wikitext, javascript, json, css, text
mobileformat

Дај расчленувачки извод во формат погоден за мобилни уреди.

Тип: булов (подробно)
noimages

Оневозможи слики во мобилниот извод.

Тип: булов (подробно)
mainpage

Примени преобразби на главната мобилна страница.

Тип: булов (подробно)
Примери:
Расчлени страница.
api.php?action=parse&page=Project:Sandbox [open in sandbox]
Расчлени викитекст.
api.php?action=parse&text={{Project:Sandbox}}&contentmodel=wikitext [open in sandbox]
Расчлени страница, укажувајќи го насловот на страницата.
api.php?action=parse&text={{PAGENAME}}&title=Test [open in sandbox]
Расчлени опис.
api.php?action=parse&summary=Some+[[link]]&prop= [open in sandbox]