Exemplo n.º 1
0
    def __init__(self, collection=False, title=''):
        self.collection = collection
        self.spine_list = []

        self.article = None
        self.article_doi = None

        self.all_dois = [
        ]  # Used to create unique id and rights in collections
        #self.all_articles = []

        #Metadata elements
        self.pub_id = None
        self.contributors = OrderedSet()  # 0+ Authors/Editors/Reviewers
        self.coverage = OrderedSet()  # 0+ Not used yet
        self.dates = OrderedSet()  # 0+ Publication date (probably)
        self.descriptions = OrderedSet()  # 0+ Long descriptions (abstracts)
        self.format = 'application/epub+zip'  # 1  Always epub
        self.languages = OrderedSet()  # 1+ All languages present in doc
        self.publishers = OrderedSet()  # 0+ All publishers of content
        self.relation = OrderedSet()  # 0+ Not used yet
        self.rights = OrderedSet()  # 1  License, details TBD
        self.rights_associations = {}  # Keeps track per-article
        self.source = OrderedSet()  # 0+ Not used yet
        self.subjects = OrderedSet()  # 0+ Subjects covered in doc
        self.title = None  # 1  Title of publication
        self.type = 'text'  # 1  Always text

        if self.collection:  # Collections receive assigned titles
            self.title = title
Exemplo n.º 2
0
    def __init__(self, collection=False, title=''):
        self.collection = collection

        #Special navigation structures: List of Equations/Figures/Tables
        self.equations_list = []
        self.figures_list = []
        self.tables_list = []

        self.article = None
        self.article_doi = None
        self.all_dois = []  # Used to create UID

        #These are the limited forms of metadata that might make it in to the
        #navigation document. Both are used for EPUB2, only the title is used
        #for EPUB3
        self.title = title
        self.contributors = OrderedSet()

        #The nav structure is a list of navpoint trees. Each navpoint may have
        #children navpoints. This structure will be converted to the appropriate
        #xml/xhtml structure and written to file when required.
        self.nav = []
        self.nav_depth = 0

        self._play_order = 0
        self._auto_id = 0