mirror of
https://github.com/erkin/ponysay.git
synced 2025-04-01 01:05:26 +02:00
ucs name support complete
This commit is contained in:
parent
d179b3c180
commit
44a3fbca3b
1 changed files with 8 additions and 3 deletions
11
ponysay
11
ponysay
|
@ -155,14 +155,13 @@ class Ponysay():
|
||||||
if pony in map:
|
if pony in map:
|
||||||
ponies.append(map[pony])
|
ponies.append(map[pony])
|
||||||
if links is not None:
|
if links is not None:
|
||||||
links[map[pony]] = pony + '.pony'
|
links[map[pony]] = pony
|
||||||
else:
|
else:
|
||||||
for j in range(0, len(ponies)):
|
for j in range(0, len(ponies)):
|
||||||
if ponies[j] in map:
|
if ponies[j] in map:
|
||||||
ponies[j] = map[ponies[j]]
|
ponies[j] = map[ponies[j]]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'''
|
'''
|
||||||
Returns one file with full path, names is filter for names, also accepts filepaths
|
Returns one file with full path, names is filter for names, also accepts filepaths
|
||||||
'''
|
'''
|
||||||
|
@ -251,6 +250,7 @@ class Ponysay():
|
||||||
return termsize
|
return termsize
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
## Listing methods
|
## Listing methods
|
||||||
##
|
##
|
||||||
|
@ -304,7 +304,12 @@ class Ponysay():
|
||||||
ponies.append(pony[:-5])
|
ponies.append(pony[:-5])
|
||||||
pseudolinkmap = {}
|
pseudolinkmap = {}
|
||||||
self.__ucsise(ponies, pseudolinkmap) ##TODO
|
self.__ucsise(ponies, pseudolinkmap) ##TODO
|
||||||
pairs = [(pony, os.path.realpath(ponydir + pony + '.pony') if os.path.islink(ponydir + pony + '.pony') else None) for pony in ponies]
|
pairs = []
|
||||||
|
for pony in ponies:
|
||||||
|
if pony in pseudolinkmap:
|
||||||
|
pairs.append((pony, pseudolinkmap[pony] + '.pony'));
|
||||||
|
else:
|
||||||
|
pairs.append((pony, os.path.realpath(ponydir + pony + '.pony') if os.path.islink(ponydir + pony + '.pony') else None))
|
||||||
|
|
||||||
ponymap = {}
|
ponymap = {}
|
||||||
for pair in pairs:
|
for pair in pairs:
|
||||||
|
|
Loading…
Add table
Reference in a new issue