Merge branch 'next' of http://github.com/erkin/ponysay into next

This commit is contained in:
Pablo Lezaeta 2012-11-06 13:47:37 -03:00
commit 11441e0f8c
9 changed files with 41 additions and 7 deletions

View file

@ -35,6 +35,8 @@ Version 3.0
Pony metadata options added: --info, ++info and --restrict. Pony metadata options added: --info, ++info and --restrict.
fillycelestia and filliestia has been moved to extraponies.
Version 2.9.1 Version 2.9.1

View file

@ -1055,11 +1055,32 @@ if the balloon is not printed.
The number of lines at the end of the pony image that should be skipped if the The number of lines at the end of the pony image that should be skipped if the
balloon is not printed. balloon is not printed.
@item POSE
@vindex @var{POSE}
@cindex master file
@cindex slave file
@cindex extras
One word (preferably) to distinguish the pony files from other pony files with the
same @var{MASTER}. Master files should try to specify this tag but are not required
to, however, non-master files (slave files) are required to specify this tag.
@b{This tag is important for the extras feature to function.}
@item BASED ON
@vindex @var{BASED ON}
Either the name of a pony that the pony is based. If the original pony is not
from MLP:FiM, the name a value that pony's MEDIA tag can used inside brackets,
for example @code{(Tumblr)}, after the original pony's name. If the pony is not
based on any pony the value @code{(original)} can be used. If the ponies is
based on multiple ponies, make a comma separated list.
@item MASTER @item MASTER
@vindex @var{MASTER} @vindex @var{MASTER}
@cindex ponyquotes
@cindex quotes
This tag refers to the pony file that is not named with extra attributes. For example, This tag refers to the pony file that is not named with extra attributes. For example,
all files where Shining Armour is the (sole) speaking pony the this tag should be all files where Shining Armor is the (sole) speaking pony the this tag should be
@code{shiningarmor}, except for in @file{shiningarmor.pony} where this tag may be omitted. @code{shiningarmor}, except for in @file{shiningarmor.pony} where this tag may be omitted.
@b{This tag is important for the ponyquotes feature to function.}
@item SOURCE @item SOURCE
@vindex @var{SOURCE} @vindex @var{SOURCE}
@ -1351,7 +1372,7 @@ In the rest of the free space, the pony select in the list is centered. You can
the pony, in case it is too big, by using the arrows keys with @kbd{control} held down, the pony, in case it is too big, by using the arrows keys with @kbd{control} held down,
or using the @kbd{W}, @kbd{A}, @kbd{S}, @kbd{D} keys (for QWERTY and QWERTZ layout,) or using the @kbd{W}, @kbd{A}, @kbd{S}, @kbd{D} keys (for QWERTY and QWERTZ layout,)
or with the @kbd{<} (or @kbd{Ä}), @kbd{A}, @kbd{O}, @kbd{E} keys (for Dvorak and Svorak or with the @kbd{<} (or @kbd{Ä}), @kbd{A}, @kbd{O}, @kbd{E} keys (for Dvorak and Svorak
layout.) To recenter the pony press @kbd{C-l} (@kb{dl} with @kbd{control} held down.) layout.) To recenter the pony press @kbd{C-l} (@kbd{dl} with @kbd{control} held down.)
Browse between ponies using the arrow keys or with @kbd{C-n} and @kbd{C-p}, for next Browse between ponies using the arrow keys or with @kbd{C-n} and @kbd{C-p}, for next
pony and previous pony, respectivily. Additionally, @kbd{Q} can be used list quotes pony and previous pony, respectivily. Additionally, @kbd{Q} can be used list quotes
@ -2855,6 +2876,8 @@ Setup option @option{--sysconf-dir} with default value @file{/etc} added,
New manditory setup option @option{--freedom}. New manditory setup option @option{--freedom}.
@item @item
Pony metadata options added: @option{--info}, @option{++info} and @option{--restrict}. Pony metadata options added: @option{--info}, @option{++info} and @option{--restrict}.
@item
@file{fillycelestia} and @file{filliestia} has been moved to @file{extraponies}.
@end itemize @end itemize

View file

@ -29,7 +29,7 @@ candylicious
caramel caramel
carecake carecake
carrot+carrottop+goldenharvest carrot+carrottop+goldenharvest
celestia+fillistia+fillycelestia+celestiasmall celestia+celestiasmall
changeling changeling
cheerilee+cheerilee80 cheerilee+cheerilee80
cerberus cerberus

View file

@ -298,7 +298,7 @@ class PonysayTool():
if py < 0: if py < 0:
ponyprint = [] if -py > len(ponyprint) else ponyprint[-py:] ponyprint = [] if -py > len(ponyprint) else ponyprint[-py:]
elif py > 0: elif py > 0:
ponyprint = py * ['\n'] + ponyprint ponyprint = py * [''] + ponyprint
ponyprint = ponyprint[:len(ponyprint) if len(ponyprint) < termh else termh] ponyprint = ponyprint[:len(ponyprint) if len(ponyprint) < termh else termh]
def findcolumn(line, column): def findcolumn(line, column):
if Backend.len(line) >= column: if Backend.len(line) >= column:
@ -334,13 +334,21 @@ class PonysayTool():
cury = 0 cury = 0
for line in ponies[panely:]: for line in ponies[panely:]:
cury += 1 cury += 1
print('\033[%i;%iH\033[%im%s\033[0m' % (cury, panelx + 1, 1 if panely + cury - 1 == ponyindex else 0, (line + ' ' * panelw)[:panelw]), end='') if os.path.islink((ponydir + '/' + line + '.pony').replace('//', '/')):
line = '\033[34m%s\033[39m' % ((line + ' ' * panelw)[:panelw])
else:
line = (line + ' ' * panelw)[:panelw]
print('\033[%i;%iH\033[%im%s\033[0m' % (cury, panelx + 1, 1 if panely + cury - 1 == ponyindex else 0, line), end='')
elif printpanel >= 0: elif printpanel >= 0:
for index in (printpanel, ponyindex): for index in (printpanel, ponyindex):
cury = index - panely cury = index - panely
if (0 <= cury) and (cury < termh): if (0 <= cury) and (cury < termh):
line = ponies[cury + panely] line = ponies[cury + panely]
print('\033[%i;%iH\033[%im%s\033[0m' % (cury, panelx + 1, 1 if panely + cury - 1 == ponyindex else 0, (line + ' ' * panelw)[:panelw]), end='') if os.path.islink((ponydir + '/' + line + '.pony').replace('//', '/')):
line = '\033[34m%s\033[39m' % ((line + ' ' * panelw)[:panelw])
else:
line = (line + ' ' * panelw)[:panelw]
print('\033[%i;%iH\033[%im%s\033[0m' % (cury, panelx + 1, 1 if panely + cury - 1 == ponyindex else 0, line), end='')
sys.stdout.buffer.flush() sys.stdout.buffer.flush()
if stored is None: if stored is None:
@ -731,7 +739,8 @@ class PonysayTool():
standardfields = ['GROUP NAME', 'NAME', 'OTHER NAMES', 'APPEARANCE', 'KIND', standardfields = ['GROUP NAME', 'NAME', 'OTHER NAMES', 'APPEARANCE', 'KIND',
'GROUP', 'BALLOON', 'LINK', 'LINK ON', 'COAT', 'MANE', 'EYE', 'GROUP', 'BALLOON', 'LINK', 'LINK ON', 'COAT', 'MANE', 'EYE',
'AURA', 'DISPLAY', 'BALLOON TOP', 'BALLOON BOTTOM', 'MASTER', 'AURA', 'DISPLAY', 'BALLOON TOP', 'BALLOON BOTTOM', 'MASTER',
'SOURCE', 'MEDIA', 'LICENSE', 'FREE', 'comment'] 'EXTRA', 'BASED ON', 'SOURCE', 'MEDIA', 'LICENSE', 'FREE',
'comment']
for standard in standardfields: for standard in standardfields:
if standard in fields: if standard in fields:
del fields[fields.index(standard)] del fields[fields.index(standard)]

Binary file not shown.