MediaWiki API ヘルプ
ãã®ãã¼ã¸ã¯èªåçæããã MediaWiki API ã®èª¬æææ¸ãã¼ã¸ã§ãã
èª¬æææ¸ã¨ä¾: https://www.mediawiki.org/wiki/API
action=parse
- ãã®ã¢ã¸ã¥ã¼ã«ã¯èªã¿åãã®æ¨©éãå¿ è¦ã¨ãã¾ãã
- Source: MediaWiki
- License: GPL-2.0-or-later
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:
- Specify a page or revision, using page, pageid, or oldid.
- Specify content explicitly, using text, title, revid, and contentmodel.
- Specify only a summary to parse. prop should be given an empty value.
- title
æååãå±ãããã¼ã¸ã®ãã¼ã¸åããããçç¥ããå ´åãå¿ ã contentmodel ãæå®ããªããã°ãªãã¾ãããã¾ãããã®å ´å API ããã¼ã¸åã¨ãã¦ä½¿ç¨ããã¾ãã
- text
æ§æè§£æããæååãã³ã³ãã³ãã»ã¢ãã«ãå¶å¾¡ããããã«ã¯title ã¾ã㯠contentmodel ã使ç¨ãã¦ãã ããã
- revid
Revision ID, for
{{REVISIONID}}and similar variables.- Type: integer
- summary
æ§æè§£æããè¦ç´
- page
ãã®ãã¼ã¸ã®å å®¹ãæ§æè§£æãã¾ããtext ããã³ title ã¨ã¯åæã«ä½¿ç¨ã§ãã¾ããã
- pageid
ãã®ãã¼ã¸ã®å å®¹ãæ§æè§£æãããpage ããªã¼ãã¼ã©ã¤ããã¾ãã
- Type: integer
- redirects
ãã page ã pageid ã«è»¢éãã¼ã¸ãæå®ãããå ´åãããã解決ããã
- Type: boolean (details)
- oldid
ãã®çã®å å®¹ãæ§æè§£æãããpage ããã³ pageid ããªã¼ãã¼ã©ã¤ããã¾ãã
- Type: integer
- prop
ã©ã®æ å ±ãåå¾ããã:
- text
- ã¦ã£ãããã¹ãã®è§£æãããããã¹ããæä¾ãã¾ãã
- langlinks
- è§£æãããã¦ã£ãããã¹ãã«ãããè¨èªãªã³ã¯ãæä¾ãã¾ãã
- categories
- æ§æè§£æãããã¦ã£ãããã¹ãã®ã«ãã´ãªãæä¾ãã¾ãã
- categorieshtml
- ã«ãã´ãªã®HTMLãã¼ã¸ã§ã³ãæä¾ãã¾ãã
- links
- æ§æè§£æãããã¦ã£ãããã¹ãå ã§å é¨ãªã³ã¯ãæä¾ãã¾ãã
- templates
- æ§æè§£æãããã¦ã£ãããã¹ãã§ãã³ãã¬ã¼ããæä¾ãã¾ãã
- images
- æ§æè§£æãããã¦ã£ãããã¹ãã®ç»åãæä¾ãã¾ãã
- externallinks
- æ§æè§£æãããã¦ã£ãããã¹ãå ã§å¤é¨ãªã³ã¯ãæä¾ãã¾ãã
- sections
- æ§æè§£æãããã¦ã£ãããã¹ãå ã®ã»ã¯ã·ã§ã³ãæä¾ãã¾ãã
- revid
- æ§æè§£æããããã¼ã¸ã®çIDã追å ãã¾ãã
- displaytitle
- æ§æè§£æãããã¦ã£ãããã¹ãã®ã¿ã¤ãã«ã追å ãã¾ãã
- headhtml
- ãã¼ã¸ã®è§£æããã
<head>ãä¸ããã - 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
- ãã¼ã¸ã«åºæã®JavaScriptã®è¨å®å¤æ°ãæä¾ãã¾ããé©ç¨ããã«ã¯ã
mw.config.set()ã使ç¨ãã¾ãã - encodedjsconfigvars
- JSONæååã¨ãã¦ãã¼ã¸ã«åºæã®JavaScriptã®è¨å®å¤æ°ãæä¾ãã¾ãã
- indicators
- ãã¼ã¸ä¸ã§ä½¿ç¨ããããã¼ã¸ã®ã¹ãã¼ã¿ã¹ã¤ã³ã¸ã±ã¼ã¿ã®HTMLãæä¾ãã¾ãã
- iwlinks
- æ§æè§£æãããã¦ã£ãããã¹ãå ã§ã¦ã£ãéãªã³ã¯ãæä¾ãã¾ãã
- wikitext
- æ§æè§£æããããªãªã¸ãã«ã®wikiããã¹ããæä¾ãã¾ãã
- 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
- çå
容ã®XMLæ§æè§£æããªã¼ (requires content model
wikitext) - parsewarnings
- Gives the warnings that occurred while parsing content.
- headitems
- 廿¢äºå®ã§ãã ãã¼ã¸ã®
<head>ã®ä¸ã«å ¥ãã¦ã¢ã¤ãã ãæä¾ãã¾ãã
- å¤ (|ãããã¯å¥ã®æååã§åºåã): 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
ãããæ§æè§£æããåã«ãå ¥åã®ä¸ã§äºåä¿åã®å¤æãå®è¡ãã¦ãã ãããããã¹ãã§ä½¿ç¨ããå ´åã®ã¿æå¹ã§ãã
- Type: boolean (details)
- 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.
- Type: boolean (details)
- effectivelanglinks
- 廿¢äºå®ã§ãã
ã¨ã¯ã¹ãã³ã·ã§ã³ã«ãã£ã¦ä¾çµ¦ãããè¨èªãªã³ã¯ãå«ã¾ãã¦ãã¾ã (for use with prop=langlinks).
- Type: boolean (details)
- section
ãã®ç¯çªå·ã®å 容ã®ã¿ãæ§æè§£æãã¾ãã
new ã®ã¨ãããã¼ã¸ã«æ°ããç¯ã追å ãããã®ããã« text ã¨sectiontitle ãè§£æãã¾ãã
new 㯠text ãæå®ããã¨ãã®ã¿è¨±å¯ããã¾ãã
- sectiontitle
section ã new ã®ã¨ãã®ãæ°ããç¯ã®ç¯åã
ãã¼ã¸ç·¨éã¨ã¯ç°ãªãããã㯠summary ãçç¥ã¾ãã¯ç©ºã®ã¨ãã«ã¯ãã©ã¼ã«ããã¯ãã¾ããã
- disablepp
- 廿¢äºå®ã§ãã
disablelimitreport ã代ããã«ä½¿ç¨ãã¦ãã ããã
- Type: boolean (details)
- disablelimitreport
æ§æè§£æã®åºåã§å¶éã¬ãã¼ã (New PP limit report) ãçç¥ããã
- Type: boolean (details)
- disableeditsection
æ§æè§£æã®åºåã§ç¯ãªã³ã¯ãçç¥ããã
- Type: boolean (details)
- disabletidy
æ§æè§£æã®åºåã«HTMLã®ã¯ãªã¼ã³ã¢ãã (ä¾ãã°æ´é ) ãé©ç¨ããªãã
- Type: boolean (details)
- disablestylededuplication
Do not deduplicate inline stylesheets in the parser output.
- Type: boolean (details)
- generatexml
- 廿¢äºå®ã§ãã
Generate XML parse tree (requires content model
wikitext; replaced by prop=parsetree).- Type: boolean (details)
- preview
ãã¬ãã¥ã¼ã¢ã¼ãã§ã®ãã¼ã¹
- Type: boolean (details)
- sectionpreview
Parse in section preview mode (enables preview mode too).
- Type: boolean (details)
- disabletoc
Omit table of contents in output.
- Type: boolean (details)
- useskin
Apply the selected skin to the parser output. May affect the following properties: langlinks, headitems, modules, jsconfigvars, indicators.
- å¤ (次ã®å¤ã®ãããã1ã¤): monobookãtimelessãvector
- contentformat
Content serialization format used for the input text. Only valid when used with text.
- å¤ (次ã®å¤ã®ãããã1ã¤): 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.
- å¤ (次ã®å¤ã®ãããã1ã¤): wikitextãjavascriptãjsonãcssãtext
- ãã¼ã¸ããã¼ã¹
- api.php?action=parse&page=Project:Sandbox [ãµã³ãããã¯ã¹ã§éã]
- ã¦ã£ãããã¹ãããã¼ã¹
- api.php?action=parse&text={{Project:Sandbox}}&contentmodel=wikitext [ãµã³ãããã¯ã¹ã§éã]
- Parse wikitext, specifying the page title.
- api.php?action=parse&text={{PAGENAME}}&title=Test [ãµã³ãããã¯ã¹ã§éã]
- è¦ç´ãæ§æè§£æãã¾ãã
- api.php?action=parse&summary=Some+[[link]]&prop= [ãµã³ãããã¯ã¹ã§éã]