asda?‰PNG IHDR ? f ??C1 sRGB ??é gAMA ±?üa pHYs ? ??o¨d GIDATx^íüL”÷e÷Y?a?("Bh?_ò???¢§?q5k?*:t0A-o??¥]VkJ¢M??f?±8\k2íll£1]q?ù???T 3 ]$ @ s d Z ddlZddlZddlZdZdZdddZG dd deZG d d d e Z G dd de ZG d d de Ze dkrddlZejej ZejedZee ejejdk dS )a@ 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. Doctests: 1. Check execution: >>> import io >>> infile = io.StringIO('Hello *{author}*') >>> outfile = io.StringIO() >>> asciidoc = AsciiDocAPI() >>> asciidoc.options('--no-header-footer') >>> asciidoc.attributes['author'] = 'Joe Bloggs' >>> asciidoc.execute(infile, outfile, backend='html4') >>> print(outfile.getvalue())
Hello Joe Bloggs
>>> asciidoc.attributes['author'] = 'Bill Smith' >>> infile = io.StringIO('Hello _{author}_') >>> outfile = io.StringIO() >>> asciidoc.execute(infile, outfile, backend='docbook') >>> print(outfile.getvalue())