资源简介
AsciiDoc是一种文本文档格式,可以用于书写文档,文章,手册,书籍和UNIX手册。AsciiDoc文件可以使用asciidoc命令转换成HTML和DocBook文件格式。AsciiDoc结构先进:AsciiDoc语法和输出标签(几乎可以转换成任意的SGML/XML标记)都可以由用户自己定义和扩展。
代码片段和文件信息
#!/usr/bin/env python
‘‘‘
a2x - A toolchain manager for AsciiDoc (converts Asciidoc text files to other
file formats)
Copyright: Stuart Rackham (c) 2009
License: MIT
Email: srackham@gmail.com
‘‘‘
import os
import fnmatch
import HTMLParser
import re
import shutil
import subprocess
import sys
import traceback
import urlparse
import zipfile
import xml.dom.minidom
import mimetypes
PROG = os.path.basename(os.path.splitext(__file__)[0])
VERSION = ‘8.6.9‘
# AsciiDoc global configuration file directory.
# NOTE: CONF_DIR is “fixed up“ by Makefile -- don‘t rename or change syntax.
CONF_DIR = ‘/etc/asciidoc‘
######################################################################
# Default configuration file parameters.
######################################################################
# Optional environment variable dictionary passed to
# executing programs. If set to None the existing
# environment is used.
ENV = None
# External executables.
ASCIIDOC = ‘asciidoc‘
XSLTPROC = ‘xsltproc‘
DBLATEX = ‘dblatex‘ # pdf generation.
FOP = ‘fop‘ # pdf generation (--fop option).
W3M = ‘w3m‘ # text generation.
LYNX = ‘lynx‘ # text generation (if no w3m).
xmlLINT = ‘xmllint‘ # Set to ‘‘ to disable.
EPUBCHECK = ‘epubcheck‘ # Set to ‘‘ to disable.
# External executable default options.
ASCIIDOC_OPTS = ‘‘
DBLATEX_OPTS = ‘‘
FOP_OPTS = ‘‘
XSLTPROC_OPTS = ‘‘
BACKEND_OPTS = ‘‘
######################################################################
# End of configuration file parameters.
######################################################################
#####################################################################
# Utility functions
#####################################################################
OPTIONS = None # These functions read verbose and dry_run command options.
def errmsg(msg):
sys.stderr.write(‘%s: %s\n‘ % (PROGmsg))
def warning(msg):
errmsg(‘WARNING: %s‘ % msg)
def infomsg(msg):
print ‘%s: %s‘ % (PROGmsg)
def die(msg exit_code=1):
errmsg(‘ERROR: %s‘ % msg)
sys.exit(exit_code)
def trace():
“““Print traceback to stderr.“““
errmsg(‘-‘*60)
traceback.print_exc(file=sys.stderr)
errmsg(‘-‘*60)
def verbose(msg):
if OPTIONS.verbose or OPTIONS.dry_run:
infomsg(msg)
class AttrDict(dict):
“““
Like a dictionary except values can be accessed as attributes i.e. obj.foo
can be used in addition to obj[‘foo‘].
If self._default has been set then it will be returned if a non-existant
attribute is accessed (instead of raising an AttributeError).
“““
def __getattr__(self key):
try:
return self[key]
except KeyError k:
if self.has_key(‘_default‘):
return self[‘_default‘]
else:
raise AttributeError k
def __setattr__(self key value):
self[key] = value
def __delattr__(self key):
try: del
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 36995 2013-11-06 00:31 asciidoc-8.6.9\a2x.py
文件 8424 2012-09-27 23:34 asciidoc-8.6.9\asciidocapi.py
文件 17757 2012-12-31 04:35 asciidoc-8.6.9\asciidoc.conf
文件 254202 2013-11-06 21:33 asciidoc-8.6.9\asciidoc.py
文件 1145 2013-11-06 03:05 asciidoc-8.6.9\BUGS
文件 785 2012-09-27 23:34 asciidoc-8.6.9\BUGS.txt
文件 179857 2013-11-06 03:05 asciidoc-8.6.9\CHANGELOG
文件 153265 2013-11-06 00:29 asciidoc-8.6.9\CHANGELOG.txt
文件 124 2013-11-06 00:28 asciidoc-8.6.9\common.aap
文件 89892 2013-11-06 00:33 asciidoc-8.6.9\configure
文件 107 2013-11-06 00:31 asciidoc-8.6.9\configure.ac
文件 17982 2012-09-27 23:34 asciidoc-8.6.9\COPYING
文件 745 2012-09-27 23:34 asciidoc-8.6.9\COPYRIGHT
文件 626 2012-09-27 23:34 asciidoc-8.6.9\dblatex\asciidoc-dblatex.sty
文件 2335 2012-09-27 23:34 asciidoc-8.6.9\dblatex\asciidoc-dblatex.xsl
文件 1360 2012-09-27 23:34 asciidoc-8.6.9\dblatex\dblatex-readme.txt
文件 15998 2013-11-06 03:05 asciidoc-8.6.9\doc\a2x.1
文件 11789 2013-01-17 23:38 asciidoc-8.6.9\doc\a2x.1.txt
文件 2422 2012-09-27 23:34 asciidoc-8.6.9\doc\article-docinfo.xm
文件 37951 2013-11-06 03:06 asciidoc-8.6.9\doc\article.pdf
文件 3593 2012-09-27 23:34 asciidoc-8.6.9\doc\article.txt
文件 7748 2013-11-06 03:05 asciidoc-8.6.9\doc\asciidoc.1
文件 5923 2012-12-28 20:05 asciidoc-8.6.9\doc\asciidoc.1.txt
文件 6371 2012-12-28 20:05 asciidoc-8.6.9\doc\asciidocapi.txt
文件 171 2012-09-27 23:34 asciidoc-8.6.9\doc\asciidoc.conf
文件 9211 2012-09-27 23:34 asciidoc-8.6.9\doc\asciidoc.dict
文件 223171 2012-12-31 04:42 asciidoc-8.6.9\doc\asciidoc.txt
文件 2384 2012-09-27 23:34 asciidoc-8.6.9\doc\asciimathml.txt
文件 23443 2012-09-27 23:35 asciidoc-8.6.9\docbook45.conf
文件 17630 2013-11-06 03:06 asciidoc-8.6.9\doc\book.epub
文件 4628 2012-09-27 23:34 asciidoc-8.6.9\doc\book-multi.txt
............此处省略249个文件信息
- 上一篇:仿淘宝网html网页模板_学写静态网页模板参考
- 下一篇:旅游网页模板
评论
共有 条评论