aboutsummaryrefslogtreecommitdiff
path: root/ponysay
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-08-22 03:48:25 +0200
committerMattias Andrée <maandree@operamail.com>2012-08-22 03:48:25 +0200
commit44a3fbca3b9ed1a2504a3f297682e74891bea1ba (patch)
tree52179d8a9dd103017c89f2a4c76593a12f952897 /ponysay
parentd179b3c18007d5e7c7326d3d2ae3b5f43cd88a70 (diff)
downloadponysay-44a3fbca3b9ed1a2504a3f297682e74891bea1ba.tar.gz
ponysay-44a3fbca3b9ed1a2504a3f297682e74891bea1ba.tar.bz2
ponysay-44a3fbca3b9ed1a2504a3f297682e74891bea1ba.zip
ucs name support complete
Diffstat (limited to 'ponysay')
-rwxr-xr-xponysay11
1 files changed, 8 insertions, 3 deletions
diff --git a/ponysay b/ponysay
index b1911ce..c120ca3 100755
--- a/ponysay
+++ b/ponysay
@@ -155,14 +155,13 @@ class Ponysay():
if pony in map:
ponies.append(map[pony])
if links is not None:
- links[map[pony]] = pony + '.pony'
+ links[map[pony]] = pony
else:
for j in range(0, len(ponies)):
if ponies[j] in map:
ponies[j] = map[ponies[j]]
-
'''
Returns one file with full path, names is filter for names, also accepts filepaths
'''
@@ -251,6 +250,7 @@ class Ponysay():
return termsize
+
##
## Listing methods
##
@@ -304,7 +304,12 @@ class Ponysay():
ponies.append(pony[:-5])
pseudolinkmap = {}
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 = {}
for pair in pairs: