mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-22 12:27:59 +01:00
everything seems to work
This commit is contained in:
parent
5d36c0edbe
commit
6b51b06e2d
1 changed files with 15 additions and 15 deletions
30
ponysay
30
ponysay
|
@ -1631,63 +1631,63 @@ usekms = Ponysay.isUsingKMS()
|
|||
'''
|
||||
The directories where pony files are stored, ttyponies/ are used if the terminal is Linux VT (also known as TTY) and not with KMS
|
||||
'''
|
||||
set = set()
|
||||
appendset = set()
|
||||
ponydirs = []
|
||||
if linuxvt and not usekms: _ponydirs = [HOME + '/.local/share/ponysay/ttyponies/', '/usr/share/ponysay/ttyponies/']
|
||||
else: _ponydirs = [HOME + '/.local/share/ponysay/ponies/', '/usr/share/ponysay/ponies/']
|
||||
for ponydir in _ponydirs:
|
||||
if os.path.isdir(ponydir) and (ponydir not in set):
|
||||
if os.path.isdir(ponydir) and (ponydir not in appendset):
|
||||
ponydirs.append(ponydir)
|
||||
set.add(ponydirs)
|
||||
appendset.add(ponydir)
|
||||
|
||||
|
||||
'''
|
||||
The directories where pony files are stored, extrattyponies/ are used if the terminal is Linux VT (also known as TTY) and not with KMS
|
||||
'''
|
||||
set = set()
|
||||
appendsetset = set()
|
||||
extraponydirs = []
|
||||
if linuxvt and not usekms: _extraponydirs = [HOME + '/.local/share/ponysay/extrattyponies/', '/usr/share/ponysay/extrattyponies/']
|
||||
else: _extraponydirs = [HOME + '/.local/share/ponysay/extraponies/', '/usr/share/ponysay/extraponies/']
|
||||
for extraponydir in _extraponydirs:
|
||||
if os.path.isdir(extraponydir) and (extraponydir not in set):
|
||||
if os.path.isdir(extraponydir) and (extraponydir not in appendset):
|
||||
extraponydirs.append(extraponydir)
|
||||
set.add(extraponydirs)
|
||||
appendset.add(extraponydir)
|
||||
|
||||
|
||||
'''
|
||||
The directories where quotes files are stored
|
||||
'''
|
||||
set = set()
|
||||
appendset = set()
|
||||
quotedirs = []
|
||||
_quotedirs = [HOME + '/.local/share/ponysay/quotes/', '/usr/share/ponysay/quotes/']
|
||||
for quotedir in _quotedirs:
|
||||
if os.path.isdir(quotedir) and (quotedir not in set):
|
||||
if os.path.isdir(quotedir) and (quotedir not in appendset):
|
||||
quotedirs.append(quotedir)
|
||||
set.add(quotedirs)
|
||||
appendset.add(quotedir)
|
||||
|
||||
|
||||
'''
|
||||
The directories where balloon style files are stored
|
||||
'''
|
||||
set = set()
|
||||
appendset = set()
|
||||
balloondirs = []
|
||||
_balloondirs = [HOME + '/.local/share/ponysay/balloons/', '/usr/share/ponysay/balloons/']
|
||||
for balloondir in _balloondirs:
|
||||
if os.path.isdir(balloondir) and (balloondir not in set):
|
||||
if os.path.isdir(balloondir) and (balloondir not in appendset):
|
||||
balloondirs.append(balloondir)
|
||||
set.add(balloondir)
|
||||
appendset.add(balloondir)
|
||||
|
||||
|
||||
'''
|
||||
ucsmap files
|
||||
'''
|
||||
set = set()
|
||||
appendset = set()
|
||||
ucsmaps = []
|
||||
_ucsmaps = [HOME + '/.local/share/ponysay/ucsmap', '/usr/share/ponysay/ucsmap']
|
||||
for ucsmap in _ucsmaps:
|
||||
if os.path.isdir(ucsmap) and (ucsmap not in set):
|
||||
if os.path.isdir(ucsmap) and (ucsmap not in appendset):
|
||||
ucsmaps.append(ucsmap)
|
||||
set.add(ucsmap)
|
||||
appendset.add(ucsmap)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue