擅长:python、mysql、java
<p>这个问题很古老。。。无论如何,<code>asciidoc</code>是在Python中实现的,它还包括可以用作Python程序模块的<code>asciidocapi.py</code>。模块docstring说:</p>
<pre><code>asciidocapi - AsciiDoc API wrapper class.
The AsciiDocAPI class provides an API for executing asciidoc. Minimal example
compiles `mydoc.txt` to `mydoc.html`:
import asciidocapi
asciidoc = asciidocapi.AsciiDocAPI()
asciidoc.execute('mydoc.txt')
- Full documentation in asciidocapi.txt.
- See the doctests below for more examples.
</code></pre>
<p>为了简化,它实现了<code>AsciiDocAPI</code>类,初始化时该类搜索<code>asciidoc</code>脚本并将其作为模块导入场景后面。这样,您可以在Python中更自然地使用它,并且可以避免使用<code>subprocess.call()</code>。在</p>