4.4.2.1. sphinx.builders.epub.EpubBuilder¶
-
class
sphinx.builders.epub.EpubBuilder(app)[source]¶ Builder that outputs epub files.
It creates the metainfo files container.opf, toc.ncx, mimetype, and META-INF/container.xml. Afterwards, all necessary files are zipped to an epub file.
4.4.2.1.1. Methods¶
__init__(app) |
|
add_sidebars(pagename, ctx) |
|
add_visible_links(tree[, show_urls]) |
Add visible link targets for external links |
build(docnames[, summary, method]) |
Main build method. |
build_all() |
Build all source files. |
build_container(outdir, outname) |
Write the metainfo file META-INF/cointainer.xml. |
build_content(outdir, outname) |
Write the metainfo file content.opf It contains bibliographic data, a file list and the spine (the reading order). |
build_epub(outdir, outname) |
Write the epub file. |
build_mimetype(outdir, outname) |
Write the metainfo file mimetype. |
build_navpoints(nodes) |
Create the toc navigation structure. |
build_specific(filenames) |
Only rebuild as much as needed for changes in the filenames. |
build_toc(outdir, outname) |
Write the metainfo file toc.ncx. |
build_update() |
Only rebuild what was changed or added since last build. |
cleanup() |
|
compile_all_catalogs() |
|
compile_catalogs(catalogs, message) |
|
compile_specific_catalogs(specified_files) |
|
compile_update_catalogs() |
|
content_metadata(files, spine, guide) |
Create a dictionary with all metadata for the content.opf file properly escaped. |
copy_download_files() |
|
copy_extra_files() |
|
copy_image_files() |
Copy image files to destination directory. |
copy_image_files_pil() |
Copy images using the PIL. |
copy_static_files() |
|
create_template_bridge() |
Return the template bridge configured. |
dump_inventory() |
|
dump_search_index() |
|
esc(name) |
Replace all characters not allowed in text an attribute values. |
finish() |
|
fix_fragment(prefix, fragment) |
Return a href/id attribute with colons replaced by hyphens. |
fix_genindex(tree) |
Fix href attributes for genindex pages. |
fix_ids(tree) |
Replace colons with hyphens in href and id attributes. |
gen_additional_pages() |
|
gen_indices() |
|
get_builder_config(option, default) |
Return a builder specific option. |
get_doc_context(docname, body, metatags) |
Collect items for the template context of a page. |
get_outdated_docs() |
|
get_outfilename(pagename) |
|
get_refnodes(doctree, result) |
Collect section titles, their depth in the toc and the refuri. |
get_relative_uri(from_, to[, typ]) |
Return a relative URI between two source filenames. |
get_target_uri(docname[, typ]) |
|
get_theme_config() |
|
get_toc() |
Get the total table of contents, containing the master_doc and pre and post files not managed by sphinx. |
handle_finish() |
Create the metainfo files and finally the epub. |
handle_page(pagename, addctx[, ...]) |
Create a rendered page. |
index_page(pagename, doctree, title) |
|
init() |
|
init_highlighter() |
|
init_templates() |
|
init_translator_class() |
|
insert_subnav(node, subnav) |
Insert nested navpoints for given node. |
is_vector_graphics(filename) |
Does the filename extension indicate a vector graphic format? |
load_indexer(docnames) |
|
make_id(name[, id_cache]) |
Return a unique id for name. |
new_navpoint(node, level[, incr]) |
Create a new entry in the toc from the node at given level. |
post_process_images(doctree) |
Pick the best candidate for an image and link down-scaled images to their high res version. |
prepare_writing(docnames) |
|
render_partial(node) |
Utility: Render a lone doctree node. |
toc_add_files(refnodes) |
Add the master_doc, pre and post files to a list of refnodes. |
toc_metadata(level, navpoints) |
Create a dictionary with all metadata for the toc.ncx file properly escaped. |
write(build_docnames, updated_docnames[, method]) |
|
write_buildinfo() |
|
write_doc(docname, doctree) |
Write one document file. |
write_doc_serialized(docname, doctree) |
|
write_domain_indices() |
|
write_genindex() |