미디어위키 API 도움말

이 페이지는 자동으로 생성된 미디어위키 API 도움말 문서입니다.

설명 문서 및 예시: https://www.mediawiki.org/wiki/API

action=parse

(main | parse)
  • 이 모듈은 read 권한을 요구합니다.
  • 출처: 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, 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.

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
위키텍스트의 구문 분석된 텍스트를 제공합니다.
langlinks
구문 분석된 위키텍스트의 언어 링크를 제공합니다.
categories
구문 분석된 위키텍스트의 분류를 제공합니다.
categorieshtml
분류의 HTML 버전을 제공합니다.
links
구문 분석된 위키텍스트의 내부 링크를 제공합니다.
templates
구문 분석된 위키텍스트의 틀을 제공합니다.
images
구문 분석된 위키텍스트의 그림을 제공합니다.
externallinks
구문 분석된 위키텍스트의 외부 링크를 제공합니다.
sections
구문 분석된 위키텍스트의 문단을 제공합니다.
revid
구문 분석된 페이지의 판 ID를 추가합니다.
displaytitle
구문 분석된 위키텍스트의 제목을 추가합니다.
headitems
사용되지 않습니다. 문서의 <head> 안에 넣을 항목을 제공합니다.
headhtml
문서의 구문 분석된 <head>를 제공합니다.
modules
문서에 사용되는 ResourceLoader 모듈을 제공합니다. 불러오려면, mw.loader.using()을 사용하세요. jsconfigvars 또는 encodedjsconfigvarsmodules와 함께 요청해야 합니다.
jsconfigvars
문서에 특화된 자바스크립트 구성 변수를 제공합니다. 적용하려면 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
구문 분석된 위키텍스트의 인터위키 링크를 제공합니다.
wikitext
구문 분석된 위키텍스트 원문을 제공합니다.
properties
구문 분석된 위키텍스트에 정의된 다양한 속성을 제공합니다.
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)
값 (|로 구분): text, langlinks, categories, categorieshtml, links, templates, images, externallinks, sections, revid, displaytitle, headitems, headhtml, modules, jsconfigvars, encodedjsconfigvars, indicators, iwlinks, wikitext, properties, limitreportdata, limitreporthtml, parsetree
기본값: text|langlinks|categories|links|templates|images|externallinks|sections|revid|displaytitle|iwlinks|properties
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
사용되지 않습니다.

disablelimitreport를 대신 사용합니다.

유형: 부울 (자세한 정보)
disablelimitreport

파서 출력에서 제한 보고서("NewPP limit report")를 제외합니다.

유형: 부울 (자세한 정보)
disableeditsection

파서 출력에서 문단 편집 링크를 제외합니다.

유형: 부울 (자세한 정보)
disabletidy

파서 출력에서 HTML 정리(예: tidy)를 수행하지 않습니다.

유형: 부울 (자세한 정보)
generatexml
사용되지 않습니다.

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

유형: 부울 (자세한 정보)
preview

미리 보기 모드에서 구문 분석을 합니다.

유형: 부울 (자세한 정보)
sectionpreview

문단 미리 보기 모드에서 구문 분석을 합니다. (미리 보기 모드도 활성화함)

유형: 부울 (자세한 정보)
disabletoc

출력에서 목차를 제외합니다.

유형: 부울 (자세한 정보)
contentformat

Content serialization format used for the input text. Only valid when used with text.

다음 값 중 하나: application/json, text/x-wiki, text/javascript, 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.

다음 값 중 하나: GadgetDefinition, wikitext, javascript, json, css, text, Scribunto
templatesandboxprefix

Template sandbox prefix, as with Special:TemplateSandbox.

Separate values with | or alternative. 값들의 최대 수는 50입니다. (봇의 경우 500)
templatesandboxtitle

Parse the page using templatesandboxtext in place of the contents of the page named here.

templatesandboxtext

Parse the page using this page content in place of the page named by templatesandboxtitle.

templatesandboxcontentmodel

templatesandboxtext의 콘텐츠 모델.

다음 값 중 하나: GadgetDefinition, wikitext, javascript, json, css, text, Scribunto
templatesandboxcontentformat

templatesandboxtext의 콘텐츠 포맷.

다음 값 중 하나: application/json, text/x-wiki, text/javascript, text/css, text/plain