mirror of
https://github.com/subutux/rmapy.git
synced 2025-12-08 14:43:24 +00:00
@@ -113,6 +113,14 @@ class ZipDocument(object):
|
||||
rm: A list of :class:rmapy.document.RmPage in this zip.
|
||||
|
||||
"""
|
||||
def __init__(self, _id=None, doc=None, file=None):
|
||||
"""Create a new instance of a ZipDocument
|
||||
|
||||
Args:
|
||||
_id: Can be left empty to generate one
|
||||
doc: a raw pdf, epub or rm (.lines) file.
|
||||
file: a zipfile to convert from
|
||||
"""
|
||||
# {"extraMetadata": {},
|
||||
# "fileType": "pdf",
|
||||
# "pageCount": 0,
|
||||
@@ -121,7 +129,7 @@ class ZipDocument(object):
|
||||
# "margins": 180,
|
||||
# "textScale": 1,
|
||||
# "transform": {}}
|
||||
content = {
|
||||
self.content = {
|
||||
"extraMetadata": {
|
||||
# "LastBrushColor": "Black",
|
||||
# "LastBrushThicknessScale": "2",
|
||||
@@ -159,7 +167,7 @@ class ZipDocument(object):
|
||||
}
|
||||
}
|
||||
|
||||
metadata = {
|
||||
self.metadata = {
|
||||
"deleted": False,
|
||||
"lastModified": "1568368808000",
|
||||
"metadatamodified": False,
|
||||
@@ -172,22 +180,14 @@ class ZipDocument(object):
|
||||
"VissibleName": "New Document"
|
||||
}
|
||||
|
||||
pagedata = "b''"
|
||||
self.pagedata = "b''"
|
||||
|
||||
zipfile = BytesIO()
|
||||
pdf = None
|
||||
epub = None
|
||||
rm: List[RmPage] = []
|
||||
ID = None
|
||||
self.zipfile = BytesIO()
|
||||
self.pdf = None
|
||||
self.epub = None
|
||||
self.rm: List[RmPage] = []
|
||||
self.ID = None
|
||||
|
||||
def __init__(self, _id=None, doc=None, file=None):
|
||||
"""Create a new instance of a ZipDocument
|
||||
|
||||
Args:
|
||||
_id: Can be left empty to generate one
|
||||
doc: a raw pdf, epub or rm (.lines) file.
|
||||
file: a zipfile to convert from
|
||||
"""
|
||||
if not _id:
|
||||
_id = str(uuid4())
|
||||
self.ID = _id
|
||||
|
||||
Reference in New Issue
Block a user