mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-29 15:37:59 +01:00
Merge branch 'next' of http://github.com/erkin/ponysay into next
This commit is contained in:
commit
d9c7113095
2 changed files with 7 additions and 4 deletions
|
@ -607,7 +607,7 @@ class PonysayTool():
|
|||
for c in 'ABCDEFGHIJKLMN OPQRSTUVWXYZ':
|
||||
test = test.replace(c, '')
|
||||
if (len(test) == 0) and (len(key) > 0):
|
||||
data.append((key, makeset(value)))
|
||||
data.append((key, makeset(value.replace(' ', ''))))
|
||||
everything.append(ponyfile[:-5], data)
|
||||
import cPickle
|
||||
with open(ponydir + 'metadata', 'wb') as file:
|
||||
|
@ -758,7 +758,9 @@ class PonysayTool():
|
|||
comment = ('\n' + comment + '\n').replace('\n$$$\n', '\n\\$$$\n')[:-1]
|
||||
|
||||
meta = []
|
||||
for key in self.data:
|
||||
keys = [key for key in data]
|
||||
keys.sort()
|
||||
for key in keys:
|
||||
if (key == 'comment') or (len(self.data[key].strip()) == 0):
|
||||
continue
|
||||
values = self.data[key].strip()
|
||||
|
@ -767,6 +769,7 @@ class PonysayTool():
|
|||
|
||||
meta.append('WIDTH: ' + str(self.ponywidth))
|
||||
meta.append('HEIGHT: ' + str(self.ponyheight))
|
||||
# TODO auto fill in BALLOON {TOP,BOTTOM}
|
||||
meta.append(comment)
|
||||
meta = '\n'.join(meta)
|
||||
ponydata = '$$$\n' + meta + '\n$$$\n' + '\n'.join(self.image)
|
||||
|
@ -784,7 +787,7 @@ class PonysayTool():
|
|||
'''
|
||||
GNU Emacs alike text area
|
||||
'''
|
||||
class TextArea:
|
||||
class TextArea: # TODO support small screens
|
||||
'''
|
||||
Constructor
|
||||
|
||||
|
|
|
@ -631,7 +631,7 @@ class Ponysay():
|
|||
table = [(get_test(cell[:cell.index('=')],
|
||||
cell[cell.index('=') + 1:]
|
||||
)
|
||||
for cell in clause.lower().split('+'))
|
||||
for cell in clause.lower().replace('_', '').replace(' ', '').split('+'))
|
||||
for clause in restriction
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in a new issue