首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在wikipedia中将模板和wikitext展开为html (复制wikipedia)

在wikipedia中将模板和wikitext展开为html (复制wikipedia)
EN

Stack Overflow用户
提问于 2013-06-23 21:35:50
回答 1查看 917关注 0票数 0

嗨,我有一些定制的wikitext(其中也包括模板),需要转换为html。主要的问题是,我可以有任何维基百科模板和大多数解析器不做模板扩展,或需要模板下载前手。另一个复杂性是新的Lua模块(例如信息框模块使用#invoke),它破坏了一些实现。以下是我尝试过的几件事:

  1. 尝试了gwtwiki(bliki)软件,但Lua模块不受支持,并且在wikitext的html转换中也存在一些错误。

代码语言:javascript
复制
1. So are there any other software which can download templates(also Lua) through wiki api and parse wikitext effectively.
2. I tried using revid while getting templates to get away with Lua modules but the gwtwiki is still failing. Are there any other libraries that do wiki api download of templates and store locally. And then convert to html.

  1. 我已经找到了mediawiki的扩展模板api调用,但是要转换的(Wiki)文本是通过url参数发送的,并且文本的大小有内在的限制。是否有任何post方法执行此转换。
  2. 我尝试的另一件事是获取整个wikipedia的xml转储,并使用mediawiki软件复制页面/api/wiki。但是导入xml是件很麻烦的事。

代码语言:javascript
复制
1. Are there any guides to effectively do this.
2. ALso the Lua plugin fails if I do a simple Special:Import in my wiki after I did a Special:Export of a article in wikipedia.
3. After this import, the articles and modules exist in my sql dump but they donot seem to be linked. The buildall.php scripts takes forever.

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-06-23 22:49:51

所有可以作为MediaWiki请求执行的GET API查询也可以使用POST。

我认为您想要的API模块是action=parse。类似于:

网址:http://en.wikipedia.org/w/api.php

发布数据: action=parse&text=your文本

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17265566

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档