8. Configuration data¶
Various configuration variables.
-
rp2epub.config.
DEFAULT_FILES
¶ Items that have to be added to the book’s manifest, no matter what; an array tuples of the form
(file,media-type,id,properties)
. Typical example: entry for the table of content file
-
rp2epub.config.
DOCTYPE_INFO
¶ A dictionary keyed by document types (as accepted by ReSpec); each value is a also a dictionary of the form:
uri_prefix
- String that may be used as a prefix in the document short name URI (as used at W3C), e.g.,
WD
subtitle
- The name of the document in Human term, e.g.,
W3C Working Draft
padding
- Padding CSS specification (ie, value of a
padding
CSS directives) that must be applied to the whole content of the file.
-
rp2epub.config.
ACCEPTED_MEDIA_TYPES
¶ Dictionary of media types that are accepted for inclusion in an epub file. The media types are used as keys, pointing at the suffix usually used (if needed)
-
rp2epub.config.
TO_TRANSFER
¶ List of (URL, localname) pairs for resources that must be downloaded for all books (e.g., w3c icon)
-
rp2epub.config.
PADDING_NEW_STYLE
¶ Dictionary, keyed through the version of the TR, indicating the paddig to be applied on the document. See
Utils.change_DOM()
for the bugs that need this extra action. At present, the keys are 2015 and 2016; the changes in the TR styles in 2016 induced new values.
-
rp2epub.config.
PADDING_OLD_STYLE
¶ Related to
PADDING_NEW_STYLE
: when using the 2015 version of TR documents the padding values for some type of documents (Member Submissions, CG and BG documents) is different from the usual ones. These are listed in this directory, keyed through the document type.
-
rp2epub.config.
EXTERNAL_REFERENCES
¶ Pairs of HTML element names and corresponding attributes that should be looked for in the source for content that may have to be downloaded to the book. (In general, only essentially relative references are considered for download, global references are not. There are some exceptions, e.g., W3C specific stylesheets or images.)
-
rp2epub.config.
DATE_FORMAT_STRING
¶ Format string to be used with date specific methods to ensure the required date format.
Source code: utils.py