没有任何数据可供显示
| 开源项目社区 | 当前位置 : |
|
| www.trustie.net/open_source_projects | 主页 > 开源项目社区 > python-markdown2 |
|
python-markdown2
|
| 1 | 0 | 211 |
| 贡献者 | 讨论 | 代码提交 |
Markdown is a light text markup format and a processor to convert that to HTML. The originator describes it as follows:
Markdown is a text-to-HTML conversion tool for web writers.
Markdown allows you to write using an easy-to-read,
easy-to-write plain text format, then convert it to
structurally valid XHTML (or HTML).
-- http://daringfireball.net/projects/markdown/
This project provides a converter written in Python that closely matches the behaviour of the original Perl-implemented Markdown.pl. There is another Python markdown.py (see link at right), but markdown2.py is faster (see PerformanceNotes) and, to my knowledge, more correct (see TestingNotes).
Basic Python Module Usage>>> import markdown2
>>> markdown2.markdown("*boo!*") # or use `html = markdown_path(PATH)`
u'boo!
\n'
>>> markdowner = Markdown()
>>> markdowner.convert("*boo!*")
u'boo!
\n'
>>> markdowner.convert("**boom!**")
u'boom!
\n'Basic Command-Line Usage$ cat foo.txt
boo!
$ python markdown2.py foo.txt
boo!
$ python markdown2.py -h
...detailed command-line usage...Please see the Change Log for recent work.
标签:
