refactoring - app.py, files moved to different folders
This commit is contained in:
parent
91d3f885c0
commit
8a2665ed4d
26 changed files with 287 additions and 302 deletions
18
toxygen/stickers/stickers.py
Normal file
18
toxygen/stickers/stickers.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import os
|
||||
import util.util as util
|
||||
|
||||
|
||||
def load_stickers():
|
||||
"""
|
||||
:return list of stickers
|
||||
"""
|
||||
result = []
|
||||
d = util.get_stickers_directory()
|
||||
keys = [x[1] for x in os.walk(d)][0]
|
||||
for key in keys:
|
||||
path = d + key + '/'
|
||||
files = filter(lambda f: f.endswith('.png'), os.listdir(path))
|
||||
files = map(lambda f: str(path + f), files)
|
||||
result.extend(files)
|
||||
|
||||
return result
|
Loading…
Add table
Add a link
Reference in a new issue