Exemplo n.º 1
0
files = [
    'index', 'documentation', 'tutorial', 'dbengine', 'metadata',
    'sqlconstruction', 'datamapping', 'unitofwork', 'adv_datamapping', 'types',
    'pooling', 'plugins', 'docstrings'
]

title = 'SQLAlchemy 0.3 Documentation'
version = '0.3.6'

root = toc.TOCElement('', 'root', '', version=version, doctitle=title)

shutil.copy('./content/index.html', './output/index.html')
shutil.copy('./content/docstrings.html', './output/docstrings.html')
shutil.copy('./content/documentation.html', './output/documentation.html')

read_markdown.parse_markdown_files(root, files)
docstrings = gen_docstrings.make_all_docs()
doc_files = gen_docstrings.create_docstring_toc(docstrings, root)

pickle.dump(docstrings, file('./output/compiled_docstrings.pickle', 'w'))
pickle.dump(root, file('./output/table_of_contents.pickle', 'w'))

template_dirs = ['./templates', './output']
output = os.path.dirname(os.getcwd())

lookup = TemplateLookup(template_dirs,
                        output_encoding='utf-8',
                        module_directory='./modules')


def genfile(name, outname):
Exemplo n.º 2
0
    "runtime",
    "namespaces",
    "inheritance",
    "filtering",
    "unicode",
    "caching",
]

title = "Mako Documentation"

root = toc.TOCElement("", "root", "", version=version, doctitle=title)

shutil.copy("./content/index.html", "./output/index.html")
shutil.copy("./content/documentation.html", "./output/documentation.html")

read_markdown.parse_markdown_files(root, files)

pickle.dump(root, file("./output/table_of_contents.pickle", "w"))

template_dirs = ["./templates", "./output"]
output = os.path.dirname(os.getcwd())

lookup = TemplateLookup(template_dirs, output_encoding="utf-8")


def genfile(name, toc):
    infile = name + ".html"
    outname = os.path.join(os.getcwd(), "../", name + ".html")
    outfile = file(outname, "w")
    print infile, "->", outname
    outfile.write(lookup.get_template(infile).render())
Exemplo n.º 3
0
    to_gen = [options.file]
else:
    to_gen = files + post_files

title='SQLAlchemy 0.4 Documentation'
version = options.version


root = toc.TOCElement('', 'root', '', version=version, doctitle=title)

shutil.copy('./content/index.html', './output/index.html')
shutil.copy('./content/docstrings.html', './output/docstrings.html')
shutil.copy('./content/documentation.html', './output/documentation.html')

if not options.docstrings:
    read_markdown.parse_markdown_files(root, [f for f in files if f in to_gen])

if not options.file or options.docstrings:
    docstrings = gen_docstrings.make_all_docs()
    doc_files = gen_docstrings.create_docstring_toc(docstrings, root)

    pickle.dump(docstrings, file('./output/compiled_docstrings.pickle', 'w'))

if not options.docstrings:
    read_markdown.parse_markdown_files(root, [f for f in post_files if f in to_gen])

if not options.file or options.docstrings:
    pickle.dump(root, file('./output/table_of_contents.pickle', 'w'))
    
template_dirs = ['./templates', './output']
output = os.path.dirname(os.getcwd())