1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## fix_asciidoc_api_doc.dpatch by Alexander Wirt <formorer@debian.org>
4
## All lines beginning with `## DP:' are a description of the patch.
8
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' asciidoc-8.6.3~/asciidocapi.py asciidoc-8.6.3/asciidocapi.py
9
--- asciidoc-8.6.3~/asciidocapi.py 2010-02-06 04:19:59.000000000 +0100
10
+++ asciidoc-8.6.3/asciidocapi.py 2010-11-28 14:09:07.002140339 +0100
12
The AsciiDocAPI class provides an API for executing asciidoc. Minimal example
13
compiles `mydoc.txt` to `mydoc.html`:
16
+ sys.path.append("/usr/share/asciidoc")
18
asciidoc = asciidocapi.AsciiDocAPI()
19
asciidoc.execute('mydoc.txt')
25
+ >>> sys.path.append("/usr/share/asciidoc")
26
>>> infile = StringIO.StringIO('Hello *{author}*')
27
>>> outfile = StringIO.StringIO()
28
>>> asciidoc = AsciiDocAPI()
30
2. Check error handling:
34
+ >>> sys.path.append("/usr/share/asciidoc")
35
>>> asciidoc = AsciiDocAPI()
36
>>> infile = StringIO.StringIO('---------')
37
>>> outfile = StringIO.StringIO()
38
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' asciidoc-8.6.3~/doc/asciidocapi.txt asciidoc-8.6.3/doc/asciidocapi.txt
39
--- asciidoc-8.6.3~/doc/asciidocapi.txt 2009-05-26 01:37:47.000000000 +0200
40
+++ asciidoc-8.6.3/doc/asciidocapi.txt 2010-11-28 14:10:00.369795845 +0100
44
-------------------------------------------------------------------------------
46
+sys.path.append("/usr/share/asciidoc")
47
from asciidocapi import AsciiDocAPI
48
asciidoc = AsciiDocAPI()
49
asciidoc.execute('mydoc.txt')
51
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
52
Type "help", "copyright", "credits" or "license" for more information.
53
>>> from asciidocapi import AsciiDocAPI
55
+>>> sys.path.append("/usr/share/asciidoc")
57
>>> infile = StringIO.StringIO('Hello *{author}*')
58
>>> outfile = StringIO.StringIO()