File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 11# Python 代码实例
22
3+ - [ pypandoc] ( https://github.com/JustDoPython/python-examples/tree/master/taiyangxue/pypandoc ) : 神器 Pypandoc —— 实现电子书自由
34- [ python-thread] ( https://github.com/JustDoPython/python-examples/tree/master/taiyangxue/python-thread ) : 这么一搞,再也不怕线程打架了
45- [ python-op2] ( https://github.com/JustDoPython/python-examples/tree/master/taiyangxue/python-op2 ) : 只需一招,Python 将系统秒变在线版!
56- [ python-op] ( https://github.com/JustDoPython/python-examples/tree/master/taiyangxue/python-op ) : YYDS! Python 帮我扛起运营大旗!
Original file line number Diff line number Diff line change 1+ import pypandoc
2+
3+ input = "**Hello World!**"
4+ output = pypandoc .convert_text (input , 'html' , format = 'md' )
5+
6+ print (output )
7+
8+ input = """
9+ # Pandoc
10+
11+ Pandoc 是个牛X的工具
12+
13+ ## 用法
14+
15+ - `convert_text`
16+ - `convert_file`
17+ """
18+ output = pypandoc .convert_text (input , 'html' , format = 'md' )
19+ print (output )
20+
21+ output = pypandoc .convert_text (input , 'rst' , format = 'md' )
22+ print (output )
23+
24+ convert_test (input , 'epub' , format = 'md' , outputfile = 'test.epub' )
You can’t perform that action at this time.
0 commit comments