mirror of
https://github.com/erkin/ponysay
synced 2024-11-16 08:27:58 +00:00
final touches on extra ponies
This commit is contained in:
parent
19f2a5a8a4
commit
d3ddf64433
1 changed files with 9 additions and 4 deletions
13
ponysay
13
ponysay
|
@ -282,8 +282,6 @@ class Ponysay():
|
|||
quoters = self.__quoters()
|
||||
|
||||
for ponydir in ponydirs: # Loop ponydirs
|
||||
print('\033[1mponies located in ' + ponydir + '\033[21m')
|
||||
|
||||
_ponies = os.listdir(ponydir)
|
||||
ponies = []
|
||||
for pony in _ponies:
|
||||
|
@ -292,6 +290,10 @@ class Ponysay():
|
|||
self.__ucsise(ponies)
|
||||
ponies.sort()
|
||||
|
||||
if len(ponies) == 0:
|
||||
continue
|
||||
print('\033[1mponies located in ' + ponydir + '\033[21m')
|
||||
|
||||
width = UCS.dispLen(max(ponies, key = UCS.dispLen)) + 2 # Get the longest ponyfilename lenght + 2 spaces
|
||||
|
||||
x = 0
|
||||
|
@ -314,13 +316,16 @@ class Ponysay():
|
|||
quoters = self.__quoters()
|
||||
|
||||
for ponydir in ponydirs: # Loop ponydirs
|
||||
print('\033[1mponies located in ' + ponydir + '\033[21m')
|
||||
|
||||
_ponies = os.listdir(ponydir)
|
||||
ponies = []
|
||||
for pony in _ponies:
|
||||
if (len(pony) > 5) and (pony[-5:] == '.pony'):
|
||||
ponies.append(pony[:-5])
|
||||
|
||||
if len(ponies) == 0:
|
||||
continue
|
||||
print('\033[1mponies located in ' + ponydir + '\033[21m')
|
||||
|
||||
pseudolinkmap = {}
|
||||
self.__ucsise(ponies, pseudolinkmap) ##TODO
|
||||
pairs = []
|
||||
|
|
Loading…
Reference in a new issue