Refactoring the way we create blank files.
This commit is contained in:
parent
97d1b1ebe5
commit
6e5c28c9c4
2 changed files with 96 additions and 7 deletions
|
|
@ -37,9 +37,7 @@ class sahlifile:
|
|||
else:
|
||||
location = self.blank_location()
|
||||
slides = self.blank_slides()
|
||||
filedata = [
|
||||
self.blank_filedata()
|
||||
]
|
||||
filedata = []
|
||||
self.sahli = {
|
||||
'location': location,
|
||||
'slides': slides,
|
||||
|
|
@ -55,9 +53,62 @@ class sahlifile:
|
|||
}
|
||||
|
||||
def blank_location(self):
|
||||
"blank location structure"
|
||||
"""blank location structure"""
|
||||
return ''
|
||||
|
||||
def blank_picture(self):
|
||||
"""Blank picture structure"""
|
||||
return {
|
||||
'file': '',
|
||||
'name': '',
|
||||
'amiga': False,
|
||||
'filetype': 'image',
|
||||
'width': '1600',
|
||||
'author': '',
|
||||
'font': 'Propaz',
|
||||
'color': [0, 0, 0, 255],
|
||||
'bg': [255, 255, 255, 255],
|
||||
'line1': '',
|
||||
'line2': '',
|
||||
'text': ''
|
||||
}
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
def blank_amiga_ascii(self):
|
||||
"""blank amiga ascii"""
|
||||
return {
|
||||
'file': '',
|
||||
'name': '',
|
||||
'amiga': True,
|
||||
'filetype': 'plain',
|
||||
'width': '80',
|
||||
'author': '',
|
||||
'font': 'Propaz',
|
||||
'color': [250, 250, 250, 255],
|
||||
'bg': [0, 0, 0, 255],
|
||||
'line1': '',
|
||||
'line2': '',
|
||||
'text': ''
|
||||
}
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
def blank_ansi(self):
|
||||
"""blank PC Ansi"""
|
||||
return {
|
||||
'file': '',
|
||||
'name': '',
|
||||
'amiga': False,
|
||||
'filetype': 'ansi',
|
||||
'width': '80',
|
||||
'author': '',
|
||||
'font': 'Propaz',
|
||||
'color': [255, 255, 255, 255],
|
||||
'bg': [0, 0, 0, 255],
|
||||
'line1': '',
|
||||
'line2': '',
|
||||
'text': ''
|
||||
}
|
||||
|
||||
def blank_filedata(self):
|
||||
"""Blank filedata structure"""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue