用于维基标记的 Python 模块

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/154592/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-03 19:34:05  来源:igfitidea点击:

Python module for wiki markup

pythonwikimarkup

提问by Brian M. Hunt

Is there a Pythonmodule for converting wiki markupto other languages (e.g. HTML)?

是否有Python转换wiki markup为其他语言的模块(例如HTML)?

A similar question was asked here, What's the easiest way to convert wiki markup to html, but no Pythonmodules are mentioned.

此处提出了一个类似的问题,将 wiki 标记转换为 html 的最简单方法是什么,但没有Python提到任何模块。

Just curious. :) Cheers.

只是好奇。:) 干杯。

采纳答案by tghw

Django uses the following libraries for markup:

Django 使用以下库进行标记:

You can see how they're used in Django.

您可以看到它们在 Django 中的使用方式

回答by Swaroop C H

mwlibprovides ways of converting MediaWiki formatted text into HTML, PDF, DocBook and OpenOffice formats.

mwlib提供了将 MediaWiki 格式文本转换为 HTML、PDF、DocBook 和 OpenOffice 格式的方法。

回答by zuber

You should look at a good parser for Creolesyntax: creole.py. It can convert Creole (which is "a common wiki markup language to be used across different wikis") to HTML.

您应该查看一个很好的克里奥尔语法解析器:creole.py。它可以将克里奥尔语(这是“一种在不同 wiki 中使用的通用 wiki 标记语言”)转换为 HTML。

回答by jedie

with python-creole you can convert html to creole and creole to html... So you can convert other markups to html and then to creole...

使用python-creole,您可以将html转换为creole,将creole转换为html...因此您可以将其他标记转换为html,然后再转换为creole...

https://code.google.com/p/python-creole/

https://code.google.com/p/python-creole/