aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <s@jaseg.de>2013-09-16 16:37:15 +0200
committerjaseg <s@jaseg.de>2013-09-16 16:37:15 +0200
commit26bf093af79166b502724c2ca4f8fa5924205ec2 (patch)
treee2c983ad00ce390cc00ca14ade87c8e5050b6f1e
parentea24fc5026cc85ba363c9a6496789a018498ece4 (diff)
downloadponysay-26bf093af79166b502724c2ca4f8fa5924205ec2.tar.gz
ponysay-26bf093af79166b502724c2ca4f8fa5924205ec2.tar.bz2
ponysay-26bf093af79166b502724c2ca4f8fa5924205ec2.zip
Fixed setup stuff. Python setuptools really is a pain.
-rw-r--r--Makefile8
-rw-r--r--ponysay51
-rwxr-xr-xponysay-qotd27
-rw-r--r--ponysay.py78
-rw-r--r--ponysay/quotes/applebloom.quotes (renamed from quotes/applebloom.quotes)0
l---------ponysay/quotes/applebloomdance.quotes (renamed from quotes/applebloomdance.quotes)0
-rw-r--r--ponysay/quotes/applejack.quotes (renamed from quotes/applejack.quotes)0
l---------ponysay/quotes/applejackscarecrow.quotes (renamed from quotes/applejackscarecrow.quotes)0
-rw-r--r--ponysay/quotes/bigmac.quotes (renamed from quotes/bigmac.quotes)0
l---------ponysay/quotes/bigmacsleep.quotes (renamed from quotes/bigmacsleep.quotes)0
-rw-r--r--ponysay/quotes/bonbon.quotes (renamed from quotes/bonbon.quotes)0
l---------ponysay/quotes/bonbonlyra.quotes (renamed from quotes/bonbonlyra.quotes)0
l---------ponysay/quotes/bonbonstand.quotes (renamed from quotes/bonbonstand.quotes)0
-rw-r--r--ponysay/quotes/braeburn.quotes (renamed from quotes/braeburn.quotes)0
-rw-r--r--ponysay/quotes/carrot.quotes (renamed from quotes/carrot.quotes)0
l---------ponysay/quotes/carrottop.quotes (renamed from quotes/carrottop.quotes)0
-rw-r--r--ponysay/quotes/celestia.quotes (renamed from quotes/celestia.quotes)0
l---------ponysay/quotes/celestiasmall.quotes (renamed from quotes/celestiasmall.quotes)0
l---------ponysay/quotes/changelingqueen.quotes (renamed from quotes/changelingqueen.quotes)0
-rw-r--r--ponysay/quotes/cheerilee.quotes (renamed from quotes/cheerilee.quotes)0
l---------ponysay/quotes/cheerilee80.quotes (renamed from quotes/cheerilee80.quotes)0
-rw-r--r--ponysay/quotes/chrysalis.quotes (renamed from quotes/chrysalis.quotes)0
-rw-r--r--ponysay/quotes/derpy.quotes (renamed from quotes/derpy.quotes)0
l---------ponysay/quotes/derpybags.quotes (renamed from quotes/derpybags.quotes)0
l---------ponysay/quotes/derpycloud.quotes (renamed from quotes/derpycloud.quotes)0
l---------ponysay/quotes/derpysad.quotes (renamed from quotes/derpysad.quotes)0
l---------ponysay/quotes/derpysit.quotes (renamed from quotes/derpysit.quotes)0
l---------ponysay/quotes/derpystand.quotes (renamed from quotes/derpystand.quotes)0
l---------ponysay/quotes/derpystandwing.quotes (renamed from quotes/derpystandwing.quotes)0
-rw-r--r--ponysay/quotes/diamondtiara.quotes (renamed from quotes/diamondtiara.quotes)0
-rw-r--r--ponysay/quotes/discord.quotes (renamed from quotes/discord.quotes)0
l---------ponysay/quotes/discordamused.quotes (renamed from quotes/discordamused.quotes)0
l---------ponysay/quotes/discordpuppetmaster.quotes (renamed from quotes/discordpuppetmaster.quotes)0
-rw-r--r--ponysay/quotes/doctor.quotes (renamed from quotes/doctor.quotes)0
l---------ponysay/quotes/doctornohat.quotes (renamed from quotes/doctornohat.quotes)0
l---------ponysay/quotes/drhooves.quotes (renamed from quotes/drhooves.quotes)0
-rw-r--r--ponysay/quotes/fancypants.quotes (renamed from quotes/fancypants.quotes)0
l---------ponysay/quotes/fillydash.quotes (renamed from quotes/fillydash.quotes)0
l---------ponysay/quotes/fillydashfly.quotes (renamed from quotes/fillydashfly.quotes)0
l---------ponysay/quotes/fillyjack.quotes (renamed from quotes/fillyjack.quotes)0
l---------ponysay/quotes/fillyjacktravel.quotes (renamed from quotes/fillyjacktravel.quotes)0
l---------ponysay/quotes/fillypinkie.quotes (renamed from quotes/fillypinkie.quotes)0
l---------ponysay/quotes/fillypinkiecurly.quotes (renamed from quotes/fillypinkiecurly.quotes)0
l---------ponysay/quotes/fillyrarity.quotes (renamed from quotes/fillyrarity.quotes)0
l---------ponysay/quotes/fillyshy.quotes (renamed from quotes/fillyshy.quotes)0
l---------ponysay/quotes/fillytwilight.quotes (renamed from quotes/fillytwilight.quotes)0
-rw-r--r--ponysay/quotes/fluttershy.quotes (renamed from quotes/fluttershy.quotes)0
l---------ponysay/quotes/fluttershygala.quotes (renamed from quotes/fluttershygala.quotes)0
l---------ponysay/quotes/fluttershyshy.quotes (renamed from quotes/fluttershyshy.quotes)0
l---------ponysay/quotes/fluttershystare.quotes (renamed from quotes/fluttershystare.quotes)0
-rw-r--r--ponysay/quotes/gilda.quotes (renamed from quotes/gilda.quotes)0
l---------ponysay/quotes/gildastand.quotes (renamed from quotes/gildastand.quotes)0
l---------ponysay/quotes/goldenharvest.quotes (renamed from quotes/goldenharvest.quotes)0
-rw-r--r--ponysay/quotes/granny.quotes (renamed from quotes/granny.quotes)0
l---------ponysay/quotes/grannychair.quotes (renamed from quotes/grannychair.quotes)0
l---------ponysay/quotes/grannysleep.quotes (renamed from quotes/grannysleep.quotes)0
l---------ponysay/quotes/harpass.quotes (renamed from quotes/harpass.quotes)0
l---------ponysay/quotes/heartstrings.quotes (renamed from quotes/heartstrings.quotes)0
-rw-r--r--ponysay/quotes/ironwill.quotes (renamed from quotes/ironwill.quotes)0
l---------ponysay/quotes/ironwillwalk.quotes (renamed from quotes/ironwillwalk.quotes)0
-rw-r--r--ponysay/quotes/lily.quotes (renamed from quotes/lily.quotes)0
l---------ponysay/quotes/lulamoon.quotes (renamed from quotes/lulamoon.quotes)0
-rw-r--r--ponysay/quotes/luna.quotes (renamed from quotes/luna.quotes)0
l---------ponysay/quotes/lunafly.quotes (renamed from quotes/lunafly.quotes)0
-rw-r--r--ponysay/quotes/lyra.quotes (renamed from quotes/lyra.quotes)0
l---------ponysay/quotes/lyrabonbon.quotes (renamed from quotes/lyrabonbon.quotes)0
l---------ponysay/quotes/lyrasit.quotes (renamed from quotes/lyrasit.quotes)0
-rw-r--r--ponysay/quotes/nightmare.quotes (renamed from quotes/nightmare.quotes)0
l---------ponysay/quotes/oinkoinkoink.quotes (renamed from quotes/oinkoinkoink.quotes)0
-rw-r--r--ponysay/quotes/photofinish.quotes (renamed from quotes/photofinish.quotes)0
l---------ponysay/quotes/pinkacopter.quotes (renamed from quotes/pinkacopter.quotes)0
-rw-r--r--ponysay/quotes/pinkie.quotes (renamed from quotes/pinkie.quotes)0
l---------ponysay/quotes/pinkiebounce.quotes (renamed from quotes/pinkiebounce.quotes)0
l---------ponysay/quotes/pinkiecannon.quotes (renamed from quotes/pinkiecannon.quotes)0
l---------ponysay/quotes/pinkiecannonfront.quotes (renamed from quotes/pinkiecannonfront.quotes)0
l---------ponysay/quotes/pinkiecannonhappy.quotes (renamed from quotes/pinkiecannonhappy.quotes)0
l---------ponysay/quotes/pinkiechicken.quotes (renamed from quotes/pinkiechicken.quotes)0
l---------ponysay/quotes/pinkiecrazyface.quotes (renamed from quotes/pinkiecrazyface.quotes)0
l---------ponysay/quotes/pinkiefly.quotes (renamed from quotes/pinkiefly.quotes)0
l---------ponysay/quotes/pinkiegala.quotes (renamed from quotes/pinkiegala.quotes)0
l---------ponysay/quotes/pinkiegummy.quotes (renamed from quotes/pinkiegummy.quotes)0
l---------ponysay/quotes/pinkiegummydisguise.quotes (renamed from quotes/pinkiegummydisguise.quotes)0
l---------ponysay/quotes/pinkiehugfluttershy.quotes (renamed from quotes/pinkiehugfluttershy.quotes)0
l---------ponysay/quotes/pinkiehugsfluttershy.quotes (renamed from quotes/pinkiehugsfluttershy.quotes)0
l---------ponysay/quotes/pinkieoink.quotes (renamed from quotes/pinkieoink.quotes)0
l---------ponysay/quotes/pinkieparade.quotes (renamed from quotes/pinkieparade.quotes)0
l---------ponysay/quotes/pinkiepartycannon.quotes (renamed from quotes/pinkiepartycannon.quotes)0
l---------ponysay/quotes/pinkieprincess.quotes (renamed from quotes/pinkieprincess.quotes)0
l---------ponysay/quotes/pinkiesilly.quotes (renamed from quotes/pinkiesilly.quotes)0
l---------ponysay/quotes/pinkietongue.quotes (renamed from quotes/pinkietongue.quotes)0
l---------ponysay/quotes/pinkieumbrelahatfear.quotes (renamed from quotes/pinkieumbrelahatfear.quotes)0
l---------ponysay/quotes/pinkieumbrellahat.quotes (renamed from quotes/pinkieumbrellahat.quotes)0
l---------ponysay/quotes/pinkiewhoops.quotes (renamed from quotes/pinkiewhoops.quotes)0
l---------ponysay/quotes/pinkiewhoopseat.quotes (renamed from quotes/pinkiewhoopseat.quotes)0
l---------ponysay/quotes/pinkiewhoopsout.quotes (renamed from quotes/pinkiewhoopsout.quotes)0
-rw-r--r--ponysay/quotes/pipsqueak.quotes (renamed from quotes/pipsqueak.quotes)0
-rw-r--r--ponysay/quotes/rainbow.quotes (renamed from quotes/rainbow.quotes)0
l---------ponysay/quotes/rainbowdrag.quotes (renamed from quotes/rainbowdrag.quotes)0
l---------ponysay/quotes/rainbowfly.quotes (renamed from quotes/rainbowfly.quotes)0
l---------ponysay/quotes/rainbowgala.quotes (renamed from quotes/rainbowgala.quotes)0
l---------ponysay/quotes/rainbowhurricane.quotes (renamed from quotes/rainbowhurricane.quotes)0
l---------ponysay/quotes/rainbowsalute.quotes (renamed from quotes/rainbowsalute.quotes)0
l---------ponysay/quotes/rainbowshadowbolt.quotes (renamed from quotes/rainbowshadowbolt.quotes)0
l---------ponysay/quotes/rainbowsleep.quotes (renamed from quotes/rainbowsleep.quotes)0
-rw-r--r--ponysay/quotes/rarity.quotes (renamed from quotes/rarity.quotes)0
l---------ponysay/quotes/raritycomplaining.quotes (renamed from quotes/raritycomplaining.quotes)0
l---------ponysay/quotes/raritydrama.quotes (renamed from quotes/raritydrama.quotes)0
l---------ponysay/quotes/rarityelite.quotes (renamed from quotes/rarityelite.quotes)0
l---------ponysay/quotes/rarityfly.quotes (renamed from quotes/rarityfly.quotes)0
l---------ponysay/quotes/raritygala.quotes (renamed from quotes/raritygala.quotes)0
l---------ponysay/quotes/rarityponder.quotes (renamed from quotes/rarityponder.quotes)0
-rw-r--r--ponysay/quotes/rose.quotes (renamed from quotes/rose.quotes)0
l---------ponysay/quotes/roseluck.quotes (renamed from quotes/roseluck.quotes)0
-rw-r--r--ponysay/quotes/sapphire.quotes (renamed from quotes/sapphire.quotes)0
-rw-r--r--ponysay/quotes/scootaloo.quotes (renamed from quotes/scootaloo.quotes)0
-rw-r--r--ponysay/quotes/silverspoon.quotes (renamed from quotes/silverspoon.quotes)0
-rw-r--r--ponysay/quotes/soarin.quotes (renamed from quotes/soarin.quotes)0
l---------ponysay/quotes/soarinofficer.quotes (renamed from quotes/soarinofficer.quotes)0
-rw-r--r--ponysay/quotes/spike.quotes (renamed from quotes/spike.quotes)0
l---------ponysay/quotes/spikecrystal.quotes (renamed from quotes/spikecrystal.quotes)0
l---------ponysay/quotes/spikefloat.quotes (renamed from quotes/spikefloat.quotes)0
l---------ponysay/quotes/spikelove.quotes (renamed from quotes/spikelove.quotes)0
l---------ponysay/quotes/spikemustache.quotes (renamed from quotes/spikemustache.quotes)0
-rw-r--r--ponysay/quotes/spitfire.quotes (renamed from quotes/spitfire.quotes)0
-rw-r--r--ponysay/quotes/sweetie.quotes (renamed from quotes/sweetie.quotes)0
l---------ponysay/quotes/sweetiedrops.quotes (renamed from quotes/sweetiedrops.quotes)0
l---------ponysay/quotes/sweetiesing.quotes (renamed from quotes/sweetiesing.quotes)0
l---------ponysay/quotes/timeturner.quotes (renamed from quotes/timeturner.quotes)0
-rw-r--r--ponysay/quotes/trixie.quotes (renamed from quotes/trixie.quotes)0
l---------ponysay/quotes/trixieamulet.quotes (renamed from quotes/trixieamulet.quotes)0
l---------ponysay/quotes/trixielulamoon.quotes (renamed from quotes/trixielulamoon.quotes)0
l---------ponysay/quotes/trixiestage.quotes (renamed from quotes/trixiestage.quotes)0
l---------ponysay/quotes/trixiestand.quotes (renamed from quotes/trixiestand.quotes)0
-rw-r--r--ponysay/quotes/twilight.quotes (renamed from quotes/twilight.quotes)0
l---------ponysay/quotes/twilightcrazyfromball.quotes (renamed from quotes/twilightcrazyfromball.quotes)0
l---------ponysay/quotes/twilightcrystal.quotes (renamed from quotes/twilightcrystal.quotes)0
l---------ponysay/quotes/twilightrage.quotes (renamed from quotes/twilightrage.quotes)0
l---------ponysay/quotes/twilightspike.quotes (renamed from quotes/twilightspike.quotes)0
l---------ponysay/quotes/twilightthebearded.quotes (renamed from quotes/twilightthebearded.quotes)0
l---------ponysay/quotes/twilighttime.quotes (renamed from quotes/twilighttime.quotes)0
l---------ponysay/quotes/twilightzero.quotes (renamed from quotes/twilightzero.quotes)0
-rw-r--r--ponysay/quotes/twist.quotes (renamed from quotes/twist.quotes)0
-rw-r--r--ponysay/quotes/zecora.quotes (renamed from quotes/zecora.quotes)0
l---------ponysay/quotes/zecorabalance.quotes (renamed from quotes/zecorabalance.quotes)0
-rwxr-xr-xponystorm.py2
l---------ponythink1
-rwxr-xr-xsetup.py15
-rwxr-xr-xtermcenter22
148 files changed, 13 insertions, 191 deletions
diff --git a/Makefile b/Makefile
index 69c10e8..0917cd0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,11 @@
all: genponies
-genpngs: ponies/*
+genpngs:
mkdir genpngs
unpixelterm -d genpngs ponies/*.pony
-genponies: pngs/*
- mkdir genponies
- pixelterm -d genponies pngs/*.png
+genponies:
+ mkdir ponysay/ponies
+ pixelterm -d ponysay/ponies pngs/*.png
diff --git a/ponysay b/ponysay
deleted file mode 100644
index 65a0339..0000000
--- a/ponysay
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env python3
-
-import os, sys, random
-from os.path import dirname, realpath, exists
-import ponysay
-import argparse, textwrap
-
-if __name__ == '__main__':
- termwidth = 80
- try:
- termwidth = os.get_terminal_size()[0]
- except:
- pass
-
- parser = argparse.ArgumentParser(description='Cowsay with ponies')
- parser.add_argument('-p', '--pony', type=str, default='random', help='The name of the pony to be used. Use "-p list" to list all ponies, "-p random" (default) to use a random pony.')
- parser.add_argument('-q', '--quote', action='store_true', help='Use a random quote of the pony being displayed as text')
- parser.add_argument('-c', '--center', action='store_true', help='Use a random quote of the pony being displayed as text')
- parser.add_argument('-C', '--center-text', action='store_true', help='Center the text in the bubble')
- parser.add_argument('-w', '--width', type=int, default=termwidth, help='Terminal width. Use 0 for unlimited width. Default: autodetect')
- parser.add_argument('-b', '--balloon', type=str, default='cowsay', help='Balloon style to use. Use "-b list" to list available styles.')
- parser.add_argument('text', type=str, nargs='*', help='The text to be placed in the speech bubble')
- args = parser.parse_args()
-
- think = sys.argv[0].endswith('think')
- if args.pony == "list":
- print('\n'.join(sorted(ponysay.list_ponies() if not args.quote else ponysay.list_ponies_with_quotes())))
- sys.exit()
- if args.balloon == 'list':
- print('\n'.join([ s.replace('.think', '') for s in ponysay.balloonstyles.keys() if s.endswith('.think') == think ]))
- sys.exit()
- pony = args.pony
- if pony == "random":
- pony = random.choice(ponysay.list_ponies() if not args.quote else ponysay.list_ponies_with_quotes())
- text = ' '.join(args.text) or None
- if text == '-':
- text = '\n'.join(sys.stdin.readlines())
- if args.quote:
- text = ponysay.random_quote(pony)
-
- balloonstyle = None
- if think:
- balloonstyle = ponysay.balloonstyles[args.balloon+'.think']
- else:
- balloonstyle = ponysay.balloonstyles[args.balloon]
-
- print(ponysay.render_pony(pony, text,
- balloonstyle=balloonstyle,
- width=args.width or sys.maxint,
- center=args.center,
- centertext=args.center_text))
diff --git a/ponysay-qotd b/ponysay-qotd
deleted file mode 100755
index 134a895..0000000
--- a/ponysay-qotd
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env python3
-import random
-from socketserver import ThreadingMixIn, TCPServer, BaseRequestHandler
-import ponysay
-
-# Quote-Of-The-Day protocol implementation using ponysay backend
-# See RFC865 ( https://tools.ietf.org/html/rfc865 ) for details.
-# To prevent traffic amplification attacks we are only providing a TCP service.
-
-class ThreadingTCPServer(ThreadingMixIn, TCPServer): pass
-
-ponylist = ponysay.list_ponies_with_quotes()
-
-class QOTDHandler(BaseRequestHandler):
- def handle(self):
- pony = random.choice(ponylist)
- s = ponysay.render_pony(pony, ponysay.random_quote(pony),
- balloonstyle=ponysay.balloonstyles['cowsay'],
- center=True,
- centertext=False,
- width=120)
- self.request.sendall(bytes(s, "UTF-8"))
-
-if __name__ == "__main__":
- HOST, PORT = "", 8017
- server = ThreadingTCPServer((HOST, PORT), QOTDHandler)
- server.serve_forever()
diff --git a/ponysay.py b/ponysay.py
deleted file mode 100644
index adb92c0..0000000
--- a/ponysay.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/env python3
-
-import os, sys, random
-from os.path import dirname, realpath, exists
-from pkg_resources import resource_string, resource_listdir, resource_exists
-import argparse, textwrap
-try:
- import re2 as re
-except:
- import re
-
-# (oneline, multiline, bottom, top, linkl, linkr)
-# {one,multi}line := (left, right)
-# {left,right} := (top, middle, bottom)
-balloonstyles= {'cowsay': (((' ', '', '< '), (' ', '', '> ')), ((' /', '|', '\\ '), (' \\', '|', '/ ')), '-', '_', '\\', '/'),
- 'cowsay.think': (((' ', '', '( '), (' ', '', ') ')), ((' (', '(', '( '), (' )', ')', ') ')), '-', '_', 'o', 'o'),
- 'ascii': (((' /|', '', '\\ '), (' \\|', '', '/ ')), ((' /|', '|', '|\\'), (' \\|', '|', '|/')), '_', '_', '\\', '/'),
- 'ascii.think': (((' ((', '', '( '), (' ))', '', ') ')), ((' ((', '(', '(('), (' ))', ')', '))')), '_', '_', 'o', 'o'),
- 'unicode': ((('┌││', '', '│└ '), ('┐││', '', '│┘ ')), (('┌││', '│', '││└'), ('┐││', '│', '││┘')), '─', '─', '╲', '╱'),
- 'round': ((('╭││', '', '│╰ '), ('╮││', '', '│╯ ')), (('╭││', '│', '││╰'), ('╮││', '│', '││╯')), '─', '─', '╲', '╱'),
- 'linux-vt': ((('┌││', '', '│└ '), ('┐││', '', '│┘ ')), (('┌││', '│', '││└'), ('┐││', '│', '││┘')), '─', '─', '\\', '/')}
-
-def list_ponies(markQuotes=False):
- quotes = lambda n: ' (quotes)' if markQuotes and exists(ponypath+'/'+n+'.quotes') else ''
- return [ f[:-5]+quotes(f[:-5]) for f in resource_listdir(__name__, 'ponies') if not f.endswith('.quotes') ]
-
-def list_ponies_with_quotes():
- return [ f[:-7] for f in resource_listdir(__name__, 'ponies') if f.endswith('.quotes') ]
-
-def load_pony(name):
- return str(resource_string(__name__, 'ponies/'+name+'.pony'), 'utf-8').split('\n')
-
-def random_quote(name):
- quotepath='ponies/'+name+'.quotes'
- if resource_exists(__name__, quotepath):
- return random.choice(str(resource_string(__name__, quotepath), 'utf-8').split('\n\n'))
- else:
- return None
-
-def render_balloon(text, balloonstyle, minwidth=0, maxwidth=40, pad=str.center):
- if text is None:
- return []
- (oneline, multiline, bottom, top, linkl, linkr) = balloonstyle
- lines = [ ' '+wrapline+' ' for textline in text.center(minwidth).split('\n') for wrapline in textwrap.wrap(textline, maxwidth) ]
- width = max([ len(line) for line in lines ]+[minwidth])
- side = lambda top, middle, bottom: top + middle*(len(lines)-2) + bottom
- leftside, rightside = oneline if len(lines) == 1 else multiline
- topextra, bottomextra = len(leftside[0])-2, len(leftside[2])-2
- leftside, rightside = side(*leftside), side(*rightside)
- lines = [top*width] + [' '*width]*topextra + [ pad(line, width) for line in lines ] + [' '*width]*bottomextra + [bottom*width]
- return [ l+m+r for l,m,r in zip(leftside, lines, rightside) ]
-
-def render_pony(name, text, balloonstyle, width=80, center=False, centertext=False):
- pony = load_pony(name)
- balloon = link_l = link_r = ''
- if text:
- [link_l, link_r] = balloonstyle[-2:]
- for i,line in enumerate(pony):
- match = re.search('\$balloon([0-9]*)\$', line)
- if match:
- minwidth = int(match.group(1) or '0')
- pony[i:i+1] = render_balloon(text, balloonstyle, minwidth=minwidth, maxwidth=int(width/2), pad=str.center if centertext else str.ljust)
- break
- try:
- first = pony.index('$$$')
- second = pony[first+1:].index('$$$')
- pony[first:] = pony[first+1+second+1:]
- except:
- pass
- pony = [ line.replace('$\\$', link_l).replace('$/$', link_r) for line in pony ]
- indent = ''
- if center:
- ponywidth = max([ len(re.sub(r'\x1B\[[0-9;]+m|\$.*\$', '', line)) for line in pony ])
- indent = ' '*int((width-ponywidth)/2)
- wre = re.compile('((\x1B\[[0-9;]+m)*.){0,%s}' % width)
- reset = '\n'
- return indent+(reset+indent).join([ wre.search(line).group() for line in pony ])+reset
-
diff --git a/quotes/applebloom.quotes b/ponysay/quotes/applebloom.quotes
index f356526..f356526 100644
--- a/quotes/applebloom.quotes
+++ b/ponysay/quotes/applebloom.quotes
diff --git a/quotes/applebloomdance.quotes b/ponysay/quotes/applebloomdance.quotes
index 77acc38..77acc38 120000
--- a/quotes/applebloomdance.quotes
+++ b/ponysay/quotes/applebloomdance.quotes
diff --git a/quotes/applejack.quotes b/ponysay/quotes/applejack.quotes
index 90082f5..90082f5 100644
--- a/quotes/applejack.quotes
+++ b/ponysay/quotes/applejack.quotes
diff --git a/quotes/applejackscarecrow.quotes b/ponysay/quotes/applejackscarecrow.quotes
index 4d2313e..4d2313e 120000
--- a/quotes/applejackscarecrow.quotes
+++ b/ponysay/quotes/applejackscarecrow.quotes
diff --git a/quotes/bigmac.quotes b/ponysay/quotes/bigmac.quotes
index 118e677..118e677 100644
--- a/quotes/bigmac.quotes
+++ b/ponysay/quotes/bigmac.quotes
diff --git a/quotes/bigmacsleep.quotes b/ponysay/quotes/bigmacsleep.quotes
index 160ecbf..160ecbf 120000
--- a/quotes/bigmacsleep.quotes
+++ b/ponysay/quotes/bigmacsleep.quotes
diff --git a/quotes/bonbon.quotes b/ponysay/quotes/bonbon.quotes
index a5581c8..a5581c8 100644
--- a/quotes/bonbon.quotes
+++ b/ponysay/quotes/bonbon.quotes
diff --git a/quotes/bonbonlyra.quotes b/ponysay/quotes/bonbonlyra.quotes
index 63bb119..63bb119 120000
--- a/quotes/bonbonlyra.quotes
+++ b/ponysay/quotes/bonbonlyra.quotes
diff --git a/quotes/bonbonstand.quotes b/ponysay/quotes/bonbonstand.quotes
index 63bb119..63bb119 120000
--- a/quotes/bonbonstand.quotes
+++ b/ponysay/quotes/bonbonstand.quotes
diff --git a/quotes/braeburn.quotes b/ponysay/quotes/braeburn.quotes
index 7cd50b8..7cd50b8 100644
--- a/quotes/braeburn.quotes
+++ b/ponysay/quotes/braeburn.quotes
diff --git a/quotes/carrot.quotes b/ponysay/quotes/carrot.quotes
index df13f8e..df13f8e 100644
--- a/quotes/carrot.quotes
+++ b/ponysay/quotes/carrot.quotes
diff --git a/quotes/carrottop.quotes b/ponysay/quotes/carrottop.quotes
index 9d603ca..9d603ca 120000
--- a/quotes/carrottop.quotes
+++ b/ponysay/quotes/carrottop.quotes
diff --git a/quotes/celestia.quotes b/ponysay/quotes/celestia.quotes
index b6b4f21..b6b4f21 100644
--- a/quotes/celestia.quotes
+++ b/ponysay/quotes/celestia.quotes
diff --git a/quotes/celestiasmall.quotes b/ponysay/quotes/celestiasmall.quotes
index c2e2765..c2e2765 120000
--- a/quotes/celestiasmall.quotes
+++ b/ponysay/quotes/celestiasmall.quotes
diff --git a/quotes/changelingqueen.quotes b/ponysay/quotes/changelingqueen.quotes
index 6a698d7..6a698d7 120000
--- a/quotes/changelingqueen.quotes
+++ b/ponysay/quotes/changelingqueen.quotes
diff --git a/quotes/cheerilee.quotes b/ponysay/quotes/cheerilee.quotes
index ed6d146..ed6d146 100644
--- a/quotes/cheerilee.quotes
+++ b/ponysay/quotes/cheerilee.quotes
diff --git a/quotes/cheerilee80.quotes b/ponysay/quotes/cheerilee80.quotes
index 31726f5..31726f5 120000
--- a/quotes/cheerilee80.quotes
+++ b/ponysay/quotes/cheerilee80.quotes
diff --git a/quotes/chrysalis.quotes b/ponysay/quotes/chrysalis.quotes
index fb09aa6..fb09aa6 100644
--- a/quotes/chrysalis.quotes
+++ b/ponysay/quotes/chrysalis.quotes
diff --git a/quotes/derpy.quotes b/ponysay/quotes/derpy.quotes
index 6db4969..6db4969 100644
--- a/quotes/derpy.quotes
+++ b/ponysay/quotes/derpy.quotes
diff --git a/quotes/derpybags.quotes b/ponysay/quotes/derpybags.quotes
index bc0d1ec..bc0d1ec 120000
--- a/quotes/derpybags.quotes
+++ b/ponysay/quotes/derpybags.quotes
diff --git a/quotes/derpycloud.quotes b/ponysay/quotes/derpycloud.quotes
index bc0d1ec..bc0d1ec 120000
--- a/quotes/derpycloud.quotes
+++ b/ponysay/quotes/derpycloud.quotes
diff --git a/quotes/derpysad.quotes b/ponysay/quotes/derpysad.quotes
index bc0d1ec..bc0d1ec 120000
--- a/quotes/derpysad.quotes
+++ b/ponysay/quotes/derpysad.quotes
diff --git a/quotes/derpysit.quotes b/ponysay/quotes/derpysit.quotes
index bc0d1ec..bc0d1ec 120000
--- a/quotes/derpysit.quotes
+++ b/ponysay/quotes/derpysit.quotes
diff --git a/quotes/derpystand.quotes b/ponysay/quotes/derpystand.quotes
index bc0d1ec..bc0d1ec 120000
--- a/quotes/derpystand.quotes
+++ b/ponysay/quotes/derpystand.quotes
diff --git a/quotes/derpystandwing.quotes b/ponysay/quotes/derpystandwing.quotes
index bc0d1ec..bc0d1ec 120000
--- a/quotes/derpystandwing.quotes
+++ b/ponysay/quotes/derpystandwing.quotes
diff --git a/quotes/diamondtiara.quotes b/ponysay/quotes/diamondtiara.quotes
index be1726b..be1726b 100644
--- a/quotes/diamondtiara.quotes
+++ b/ponysay/quotes/diamondtiara.quotes
diff --git a/quotes/discord.quotes b/ponysay/quotes/discord.quotes
index 5b9d768..5b9d768 100644
--- a/quotes/discord.quotes
+++ b/ponysay/quotes/discord.quotes
diff --git a/quotes/discordamused.quotes b/ponysay/quotes/discordamused.quotes
index 998880c..998880c 120000
--- a/quotes/discordamused.quotes
+++ b/ponysay/quotes/discordamused.quotes
diff --git a/quotes/discordpuppetmaster.quotes b/ponysay/quotes/discordpuppetmaster.quotes
index 998880c..998880c 120000
--- a/quotes/discordpuppetmaster.quotes
+++ b/ponysay/quotes/discordpuppetmaster.quotes
diff --git a/quotes/doctor.quotes b/ponysay/quotes/doctor.quotes
index 347d379..347d379 100644
--- a/quotes/doctor.quotes
+++ b/ponysay/quotes/doctor.quotes
diff --git a/quotes/doctornohat.quotes b/ponysay/quotes/doctornohat.quotes
index 40d0b57..40d0b57 120000
--- a/quotes/doctornohat.quotes
+++ b/ponysay/quotes/doctornohat.quotes
diff --git a/quotes/drhooves.quotes b/ponysay/quotes/drhooves.quotes
index 40d0b57..40d0b57 120000
--- a/quotes/drhooves.quotes
+++ b/ponysay/quotes/drhooves.quotes
diff --git a/quotes/fancypants.quotes b/ponysay/quotes/fancypants.quotes
index 0ed95a4..0ed95a4 100644
--- a/quotes/fancypants.quotes
+++ b/ponysay/quotes/fancypants.quotes
diff --git a/quotes/fillydash.quotes b/ponysay/quotes/fillydash.quotes
index 1db2c3f..1db2c3f 120000
--- a/quotes/fillydash.quotes
+++ b/ponysay/quotes/fillydash.quotes
diff --git a/quotes/fillydashfly.quotes b/ponysay/quotes/fillydashfly.quotes
index 9f95da8..9f95da8 120000
--- a/quotes/fillydashfly.quotes
+++ b/ponysay/quotes/fillydashfly.quotes
diff --git a/quotes/fillyjack.quotes b/ponysay/quotes/fillyjack.quotes
index 4d2313e..4d2313e 120000
--- a/quotes/fillyjack.quotes
+++ b/ponysay/quotes/fillyjack.quotes
diff --git a/quotes/fillyjacktravel.quotes b/ponysay/quotes/fillyjacktravel.quotes
index 4d2313e..4d2313e 120000
--- a/quotes/fillyjacktravel.quotes
+++ b/ponysay/quotes/fillyjacktravel.quotes
diff --git a/quotes/fillypinkie.quotes b/ponysay/quotes/fillypinkie.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/fillypinkie.quotes
+++ b/ponysay/quotes/fillypinkie.quotes
diff --git a/quotes/fillypinkiecurly.quotes b/ponysay/quotes/fillypinkiecurly.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/fillypinkiecurly.quotes
+++ b/ponysay/quotes/fillypinkiecurly.quotes
diff --git a/quotes/fillyrarity.quotes b/ponysay/quotes/fillyrarity.quotes
index c7b969c..c7b969c 120000
--- a/quotes/fillyrarity.quotes
+++ b/ponysay/quotes/fillyrarity.quotes
diff --git a/quotes/fillyshy.quotes b/ponysay/quotes/fillyshy.quotes
index 4e5b9da..4e5b9da 120000
--- a/quotes/fillyshy.quotes
+++ b/ponysay/quotes/fillyshy.quotes
diff --git a/quotes/fillytwilight.quotes b/ponysay/quotes/fillytwilight.quotes
index 75ab338..75ab338 120000
--- a/quotes/fillytwilight.quotes
+++ b/ponysay/quotes/fillytwilight.quotes
diff --git a/quotes/fluttershy.quotes b/ponysay/quotes/fluttershy.quotes
index 6877cb3..6877cb3 100644
--- a/quotes/fluttershy.quotes
+++ b/ponysay/quotes/fluttershy.quotes
diff --git a/quotes/fluttershygala.quotes b/ponysay/quotes/fluttershygala.quotes
index 4e5b9da..4e5b9da 120000
--- a/quotes/fluttershygala.quotes
+++ b/ponysay/quotes/fluttershygala.quotes
diff --git a/quotes/fluttershyshy.quotes b/ponysay/quotes/fluttershyshy.quotes
index 4e5b9da..4e5b9da 120000
--- a/quotes/fluttershyshy.quotes
+++ b/ponysay/quotes/fluttershyshy.quotes
diff --git a/quotes/fluttershystare.quotes b/ponysay/quotes/fluttershystare.quotes
index 4e5b9da..4e5b9da 120000
--- a/quotes/fluttershystare.quotes
+++ b/ponysay/quotes/fluttershystare.quotes
diff --git a/quotes/gilda.quotes b/ponysay/quotes/gilda.quotes
index 4dad621..4dad621 100644
--- a/quotes/gilda.quotes
+++ b/ponysay/quotes/gilda.quotes
diff --git a/quotes/gildastand.quotes b/ponysay/quotes/gildastand.quotes
index 97582fc..97582fc 120000
--- a/quotes/gildastand.quotes
+++ b/ponysay/quotes/gildastand.quotes
diff --git a/quotes/goldenharvest.quotes b/ponysay/quotes/goldenharvest.quotes
index 9d603ca..9d603ca 120000
--- a/quotes/goldenharvest.quotes
+++ b/ponysay/quotes/goldenharvest.quotes
diff --git a/quotes/granny.quotes b/ponysay/quotes/granny.quotes
index 7948107..7948107 100644
--- a/quotes/granny.quotes
+++ b/ponysay/quotes/granny.quotes
diff --git a/quotes/grannychair.quotes b/ponysay/quotes/grannychair.quotes
index b9adbb7..b9adbb7 120000
--- a/quotes/grannychair.quotes
+++ b/ponysay/quotes/grannychair.quotes
diff --git a/quotes/grannysleep.quotes b/ponysay/quotes/grannysleep.quotes
index b9adbb7..b9adbb7 120000
--- a/quotes/grannysleep.quotes
+++ b/ponysay/quotes/grannysleep.quotes
diff --git a/quotes/harpass.quotes b/ponysay/quotes/harpass.quotes
index 319f626..319f626 120000
--- a/quotes/harpass.quotes
+++ b/ponysay/quotes/harpass.quotes
diff --git a/quotes/heartstrings.quotes b/ponysay/quotes/heartstrings.quotes
index 319f626..319f626 120000
--- a/quotes/heartstrings.quotes
+++ b/ponysay/quotes/heartstrings.quotes
diff --git a/quotes/ironwill.quotes b/ponysay/quotes/ironwill.quotes
index bb0e381..bb0e381 100644
--- a/quotes/ironwill.quotes
+++ b/ponysay/quotes/ironwill.quotes
diff --git a/quotes/ironwillwalk.quotes b/ponysay/quotes/ironwillwalk.quotes
index 313f8d1..313f8d1 120000
--- a/quotes/ironwillwalk.quotes
+++ b/ponysay/quotes/ironwillwalk.quotes
diff --git a/quotes/lily.quotes b/ponysay/quotes/lily.quotes
index d0a381f..d0a381f 100644
--- a/quotes/lily.quotes
+++ b/ponysay/quotes/lily.quotes
diff --git a/quotes/lulamoon.quotes b/ponysay/quotes/lulamoon.quotes
index a531bbd..a531bbd 120000
--- a/quotes/lulamoon.quotes
+++ b/ponysay/quotes/lulamoon.quotes
diff --git a/quotes/luna.quotes b/ponysay/quotes/luna.quotes
index ea95dc6..ea95dc6 100644
--- a/quotes/luna.quotes
+++ b/ponysay/quotes/luna.quotes
diff --git a/quotes/lunafly.quotes b/ponysay/quotes/lunafly.quotes
index 1f0c6e3..1f0c6e3 120000
--- a/quotes/lunafly.quotes
+++ b/ponysay/quotes/lunafly.quotes
diff --git a/quotes/lyra.quotes b/ponysay/quotes/lyra.quotes
index ffa25ae..ffa25ae 100644
--- a/quotes/lyra.quotes
+++ b/ponysay/quotes/lyra.quotes
diff --git a/quotes/lyrabonbon.quotes b/ponysay/quotes/lyrabonbon.quotes
index 63bb119..63bb119 120000
--- a/quotes/lyrabonbon.quotes
+++ b/ponysay/quotes/lyrabonbon.quotes
diff --git a/quotes/lyrasit.quotes b/ponysay/quotes/lyrasit.quotes
index 319f626..319f626 120000
--- a/quotes/lyrasit.quotes
+++ b/ponysay/quotes/lyrasit.quotes
diff --git a/quotes/nightmare.quotes b/ponysay/quotes/nightmare.quotes
index dc712a0..dc712a0 100644
--- a/quotes/nightmare.quotes
+++ b/ponysay/quotes/nightmare.quotes
diff --git a/quotes/oinkoinkoink.quotes b/ponysay/quotes/oinkoinkoink.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/oinkoinkoink.quotes
+++ b/ponysay/quotes/oinkoinkoink.quotes
diff --git a/quotes/photofinish.quotes b/ponysay/quotes/photofinish.quotes
index 7669800..7669800 100644
--- a/quotes/photofinish.quotes
+++ b/ponysay/quotes/photofinish.quotes
diff --git a/quotes/pinkacopter.quotes b/ponysay/quotes/pinkacopter.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkacopter.quotes
+++ b/ponysay/quotes/pinkacopter.quotes
diff --git a/quotes/pinkie.quotes b/ponysay/quotes/pinkie.quotes
index e9b12d3..e9b12d3 100644
--- a/quotes/pinkie.quotes
+++ b/ponysay/quotes/pinkie.quotes
diff --git a/quotes/pinkiebounce.quotes b/ponysay/quotes/pinkiebounce.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkiebounce.quotes
+++ b/ponysay/quotes/pinkiebounce.quotes
diff --git a/quotes/pinkiecannon.quotes b/ponysay/quotes/pinkiecannon.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkiecannon.quotes
+++ b/ponysay/quotes/pinkiecannon.quotes
diff --git a/quotes/pinkiecannonfront.quotes b/ponysay/quotes/pinkiecannonfront.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkiecannonfront.quotes
+++ b/ponysay/quotes/pinkiecannonfront.quotes
diff --git a/quotes/pinkiecannonhappy.quotes b/ponysay/quotes/pinkiecannonhappy.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkiecannonhappy.quotes
+++ b/ponysay/quotes/pinkiecannonhappy.quotes
diff --git a/quotes/pinkiechicken.quotes b/ponysay/quotes/pinkiechicken.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkiechicken.quotes
+++ b/ponysay/quotes/pinkiechicken.quotes
diff --git a/quotes/pinkiecrazyface.quotes b/ponysay/quotes/pinkiecrazyface.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkiecrazyface.quotes
+++ b/ponysay/quotes/pinkiecrazyface.quotes
diff --git a/quotes/pinkiefly.quotes b/ponysay/quotes/pinkiefly.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkiefly.quotes
+++ b/ponysay/quotes/pinkiefly.quotes
diff --git a/quotes/pinkiegala.quotes b/ponysay/quotes/pinkiegala.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkiegala.quotes
+++ b/ponysay/quotes/pinkiegala.quotes
diff --git a/quotes/pinkiegummy.quotes b/ponysay/quotes/pinkiegummy.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkiegummy.quotes
+++ b/ponysay/quotes/pinkiegummy.quotes
diff --git a/quotes/pinkiegummydisguise.quotes b/ponysay/quotes/pinkiegummydisguise.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkiegummydisguise.quotes
+++ b/ponysay/quotes/pinkiegummydisguise.quotes
diff --git a/quotes/pinkiehugfluttershy.quotes b/ponysay/quotes/pinkiehugfluttershy.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkiehugfluttershy.quotes
+++ b/ponysay/quotes/pinkiehugfluttershy.quotes
diff --git a/quotes/pinkiehugsfluttershy.quotes b/ponysay/quotes/pinkiehugsfluttershy.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkiehugsfluttershy.quotes
+++ b/ponysay/quotes/pinkiehugsfluttershy.quotes
diff --git a/quotes/pinkieoink.quotes b/ponysay/quotes/pinkieoink.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkieoink.quotes
+++ b/ponysay/quotes/pinkieoink.quotes
diff --git a/quotes/pinkieparade.quotes b/ponysay/quotes/pinkieparade.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkieparade.quotes
+++ b/ponysay/quotes/pinkieparade.quotes
diff --git a/quotes/pinkiepartycannon.quotes b/ponysay/quotes/pinkiepartycannon.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkiepartycannon.quotes
+++ b/ponysay/quotes/pinkiepartycannon.quotes
diff --git a/quotes/pinkieprincess.quotes b/ponysay/quotes/pinkieprincess.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkieprincess.quotes
+++ b/ponysay/quotes/pinkieprincess.quotes
diff --git a/quotes/pinkiesilly.quotes b/ponysay/quotes/pinkiesilly.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkiesilly.quotes
+++ b/ponysay/quotes/pinkiesilly.quotes
diff --git a/quotes/pinkietongue.quotes b/ponysay/quotes/pinkietongue.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkietongue.quotes
+++ b/ponysay/quotes/pinkietongue.quotes
diff --git a/quotes/pinkieumbrelahatfear.quotes b/ponysay/quotes/pinkieumbrelahatfear.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkieumbrelahatfear.quotes
+++ b/ponysay/quotes/pinkieumbrelahatfear.quotes
diff --git a/quotes/pinkieumbrellahat.quotes b/ponysay/quotes/pinkieumbrellahat.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkieumbrellahat.quotes
+++ b/ponysay/quotes/pinkieumbrellahat.quotes
diff --git a/quotes/pinkiewhoops.quotes b/ponysay/quotes/pinkiewhoops.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkiewhoops.quotes
+++ b/ponysay/quotes/pinkiewhoops.quotes
diff --git a/quotes/pinkiewhoopseat.quotes b/ponysay/quotes/pinkiewhoopseat.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkiewhoopseat.quotes
+++ b/ponysay/quotes/pinkiewhoopseat.quotes
diff --git a/quotes/pinkiewhoopsout.quotes b/ponysay/quotes/pinkiewhoopsout.quotes
index 736ccfe..736ccfe 120000
--- a/quotes/pinkiewhoopsout.quotes
+++ b/ponysay/quotes/pinkiewhoopsout.quotes
diff --git a/quotes/pipsqueak.quotes b/ponysay/quotes/pipsqueak.quotes
index 4980c31..4980c31 100644
--- a/quotes/pipsqueak.quotes
+++ b/ponysay/quotes/pipsqueak.quotes
diff --git a/quotes/rainbow.quotes b/ponysay/quotes/rainbow.quotes
index eedc42f..eedc42f 100644
--- a/quotes/rainbow.quotes
+++ b/ponysay/quotes/rainbow.quotes
diff --git a/quotes/rainbowdrag.quotes b/ponysay/quotes/rainbowdrag.quotes
index 1db2c3f..1db2c3f 120000
--- a/quotes/rainbowdrag.quotes
+++ b/ponysay/quotes/rainbowdrag.quotes
diff --git a/quotes/rainbowfly.quotes b/ponysay/quotes/rainbowfly.quotes
index 1db2c3f..1db2c3f 120000
--- a/quotes/rainbowfly.quotes
+++ b/ponysay/quotes/rainbowfly.quotes
diff --git a/quotes/rainbowgala.quotes b/ponysay/quotes/rainbowgala.quotes
index 1db2c3f..1db2c3f 120000
--- a/quotes/rainbowgala.quotes
+++ b/ponysay/quotes/rainbowgala.quotes
diff --git a/quotes/rainbowhurricane.quotes b/ponysay/quotes/rainbowhurricane.quotes
index 1db2c3f..1db2c3f 120000
--- a/quotes/rainbowhurricane.quotes
+++ b/ponysay/quotes/rainbowhurricane.quotes
diff --git a/quotes/rainbowsalute.quotes b/ponysay/quotes/rainbowsalute.quotes
index 1db2c3f..1db2c3f 120000
--- a/quotes/rainbowsalute.quotes
+++ b/ponysay/quotes/rainbowsalute.quotes
diff --git a/quotes/rainbowshadowbolt.quotes b/ponysay/quotes/rainbowshadowbolt.quotes
index 1db2c3f..1db2c3f 120000
--- a/quotes/rainbowshadowbolt.quotes
+++ b/ponysay/quotes/rainbowshadowbolt.quotes
diff --git a/quotes/rainbowsleep.quotes b/ponysay/quotes/rainbowsleep.quotes
index 1db2c3f..1db2c3f 120000
--- a/quotes/rainbowsleep.quotes
+++ b/ponysay/quotes/rainbowsleep.quotes
diff --git a/quotes/rarity.quotes b/ponysay/quotes/rarity.quotes
index 8dfec7b..8dfec7b 100644
--- a/quotes/rarity.quotes
+++ b/ponysay/quotes/rarity.quotes
diff --git a/quotes/raritycomplaining.quotes b/ponysay/quotes/raritycomplaining.quotes
index c7b969c..c7b969c 120000
--- a/quotes/raritycomplaining.quotes
+++ b/ponysay/quotes/raritycomplaining.quotes
diff --git a/quotes/raritydrama.quotes b/ponysay/quotes/raritydrama.quotes
index c7b969c..c7b969c 120000
--- a/quotes/raritydrama.quotes
+++ b/ponysay/quotes/raritydrama.quotes
diff --git a/quotes/rarityelite.quotes b/ponysay/quotes/rarityelite.quotes
index c7b969c..c7b969c 120000
--- a/quotes/rarityelite.quotes
+++ b/ponysay/quotes/rarityelite.quotes
diff --git a/quotes/rarityfly.quotes b/ponysay/quotes/rarityfly.quotes
index c7b969c..c7b969c 120000
--- a/quotes/rarityfly.quotes
+++ b/ponysay/quotes/rarityfly.quotes
diff --git a/quotes/raritygala.quotes b/ponysay/quotes/raritygala.quotes
index c7b969c..c7b969c 120000
--- a/quotes/raritygala.quotes
+++ b/ponysay/quotes/raritygala.quotes
diff --git a/quotes/rarityponder.quotes b/ponysay/quotes/rarityponder.quotes
index c7b969c..c7b969c 120000
--- a/quotes/rarityponder.quotes
+++ b/ponysay/quotes/rarityponder.quotes
diff --git a/quotes/rose.quotes b/ponysay/quotes/rose.quotes
index 1451749..1451749 100644
--- a/quotes/rose.quotes
+++ b/ponysay/quotes/rose.quotes
diff --git a/quotes/roseluck.quotes b/ponysay/quotes/roseluck.quotes
index c2bfe0b..c2bfe0b 120000
--- a/quotes/roseluck.quotes
+++ b/ponysay/quotes/roseluck.quotes
diff --git a/quotes/sapphire.quotes b/ponysay/quotes/sapphire.quotes
index 7b0f7b6..7b0f7b6 100644
--- a/quotes/sapphire.quotes
+++ b/ponysay/quotes/sapphire.quotes
diff --git a/quotes/scootaloo.quotes b/ponysay/quotes/scootaloo.quotes
index 091c2c6..091c2c6 100644
--- a/quotes/scootaloo.quotes
+++ b/ponysay/quotes/scootaloo.quotes
diff --git a/quotes/silverspoon.quotes b/ponysay/quotes/silverspoon.quotes
index be1726b..be1726b 100644
--- a/quotes/silverspoon.quotes
+++ b/ponysay/quotes/silverspoon.quotes
diff --git a/quotes/soarin.quotes b/ponysay/quotes/soarin.quotes
index da0eb64..da0eb64 100644
--- a/quotes/soarin.quotes
+++ b/ponysay/quotes/soarin.quotes
diff --git a/quotes/soarinofficer.quotes b/ponysay/quotes/soarinofficer.quotes
index ed30e8c..ed30e8c 120000
--- a/quotes/soarinofficer.quotes
+++ b/ponysay/quotes/soarinofficer.quotes
diff --git a/quotes/spike.quotes b/ponysay/quotes/spike.quotes
index d3cce2f..d3cce2f 100644
--- a/quotes/spike.quotes
+++ b/ponysay/quotes/spike.quotes
diff --git a/quotes/spikecrystal.quotes b/ponysay/quotes/spikecrystal.quotes
index 2041fbe..2041fbe 120000
--- a/quotes/spikecrystal.quotes
+++ b/ponysay/quotes/spikecrystal.quotes
diff --git a/quotes/spikefloat.quotes b/ponysay/quotes/spikefloat.quotes
index 2041fbe..2041fbe 120000
--- a/quotes/spikefloat.quotes
+++ b/ponysay/quotes/spikefloat.quotes
diff --git a/quotes/spikelove.quotes b/ponysay/quotes/spikelove.quotes
index 2041fbe..2041fbe 120000
--- a/quotes/spikelove.quotes
+++ b/ponysay/quotes/spikelove.quotes
diff --git a/quotes/spikemustache.quotes b/ponysay/quotes/spikemustache.quotes
index 2041fbe..2041fbe 120000
--- a/quotes/spikemustache.quotes
+++ b/ponysay/quotes/spikemustache.quotes
diff --git a/quotes/spitfire.quotes b/ponysay/quotes/spitfire.quotes
index 0addcc1..0addcc1 100644
--- a/quotes/spitfire.quotes
+++ b/ponysay/quotes/spitfire.quotes
diff --git a/quotes/sweetie.quotes b/ponysay/quotes/sweetie.quotes
index e311c38..e311c38 100644
--- a/quotes/sweetie.quotes
+++ b/ponysay/quotes/sweetie.quotes
diff --git a/quotes/sweetiedrops.quotes b/ponysay/quotes/sweetiedrops.quotes
index 63bb119..63bb119 120000
--- a/quotes/sweetiedrops.quotes
+++ b/ponysay/quotes/sweetiedrops.quotes
diff --git a/quotes/sweetiesing.quotes b/ponysay/quotes/sweetiesing.quotes
index 36ca8d9..36ca8d9 120000
--- a/quotes/sweetiesing.quotes
+++ b/ponysay/quotes/sweetiesing.quotes
diff --git a/quotes/timeturner.quotes b/ponysay/quotes/timeturner.quotes
index 40d0b57..40d0b57 120000
--- a/quotes/timeturner.quotes
+++ b/ponysay/quotes/timeturner.quotes
diff --git a/quotes/trixie.quotes b/ponysay/quotes/trixie.quotes
index 59b9e6e..59b9e6e 100644
--- a/quotes/trixie.quotes
+++ b/ponysay/quotes/trixie.quotes
diff --git a/quotes/trixieamulet.quotes b/ponysay/quotes/trixieamulet.quotes
index a531bbd..a531bbd 120000
--- a/quotes/trixieamulet.quotes
+++ b/ponysay/quotes/trixieamulet.quotes
diff --git a/quotes/trixielulamoon.quotes b/ponysay/quotes/trixielulamoon.quotes
index a531bbd..a531bbd 120000
--- a/quotes/trixielulamoon.quotes
+++ b/ponysay/quotes/trixielulamoon.quotes
diff --git a/quotes/trixiestage.quotes b/ponysay/quotes/trixiestage.quotes
index a531bbd..a531bbd 120000
--- a/quotes/trixiestage.quotes
+++ b/ponysay/quotes/trixiestage.quotes
diff --git a/quotes/trixiestand.quotes b/ponysay/quotes/trixiestand.quotes
index a531bbd..a531bbd 120000
--- a/quotes/trixiestand.quotes
+++ b/ponysay/quotes/trixiestand.quotes
diff --git a/quotes/twilight.quotes b/ponysay/quotes/twilight.quotes
index 165c275..165c275 100644
--- a/quotes/twilight.quotes
+++ b/ponysay/quotes/twilight.quotes
diff --git a/quotes/twilightcrazyfromball.quotes b/ponysay/quotes/twilightcrazyfromball.quotes
index 75ab338..75ab338 120000
--- a/quotes/twilightcrazyfromball.quotes
+++ b/ponysay/quotes/twilightcrazyfromball.quotes
diff --git a/quotes/twilightcrystal.quotes b/ponysay/quotes/twilightcrystal.quotes
index 75ab338..75ab338 120000
--- a/quotes/twilightcrystal.quotes
+++ b/ponysay/quotes/twilightcrystal.quotes
diff --git a/quotes/twilightrage.quotes b/ponysay/quotes/twilightrage.quotes
index 75ab338..75ab338 120000
--- a/quotes/twilightrage.quotes
+++ b/ponysay/quotes/twilightrage.quotes
diff --git a/quotes/twilightspike.quotes b/ponysay/quotes/twilightspike.quotes
index 75ab338..75ab338 120000
--- a/quotes/twilightspike.quotes
+++ b/ponysay/quotes/twilightspike.quotes
diff --git a/quotes/twilightthebearded.quotes b/ponysay/quotes/twilightthebearded.quotes
index 75ab338..75ab338 120000
--- a/quotes/twilightthebearded.quotes
+++ b/ponysay/quotes/twilightthebearded.quotes
diff --git a/quotes/twilighttime.quotes b/ponysay/quotes/twilighttime.quotes
index 75ab338..75ab338 120000
--- a/quotes/twilighttime.quotes
+++ b/ponysay/quotes/twilighttime.quotes
diff --git a/quotes/twilightzero.quotes b/ponysay/quotes/twilightzero.quotes
index 75ab338..75ab338 120000
--- a/quotes/twilightzero.quotes
+++ b/ponysay/quotes/twilightzero.quotes
diff --git a/quotes/twist.quotes b/ponysay/quotes/twist.quotes
index 798e4b2..798e4b2 100644
--- a/quotes/twist.quotes
+++ b/ponysay/quotes/twist.quotes
diff --git a/quotes/zecora.quotes b/ponysay/quotes/zecora.quotes
index bf84cd5..bf84cd5 100644
--- a/quotes/zecora.quotes
+++ b/ponysay/quotes/zecora.quotes
diff --git a/quotes/zecorabalance.quotes b/ponysay/quotes/zecorabalance.quotes
index 5475b5c..5475b5c 120000
--- a/quotes/zecorabalance.quotes
+++ b/ponysay/quotes/zecorabalance.quotes
diff --git a/ponystorm.py b/ponystorm.py
index dd93b42..53e13a0 100755
--- a/ponystorm.py
+++ b/ponystorm.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import random
-import ponysay
+from ponysay import ponysay
for i in range(0, 1000):
pony = random.choice(ponysay.list_ponies_with_quotes())
diff --git a/ponythink b/ponythink
deleted file mode 120000
index 31b2aba..0000000
--- a/ponythink
+++ /dev/null
@@ -1 +0,0 @@
-ponysay \ No newline at end of file
diff --git a/setup.py b/setup.py
index 7088f59..fc8d6d6 100755
--- a/setup.py
+++ b/setup.py
@@ -27,13 +27,14 @@ setup(name = 'ponysay',
author = 'jaseg',
author_email = 'ponysay@jaseg.net',
url = 'https://github.com/jaseg/ponysay',
- py_modules = ['ponysay'],
- data_files = [dir_copy('quotes', 'ponies'),
- dir_copy('genponies', 'ponies')],
- scripts = ['ponysay',
- 'ponythink',
- 'termcenter',
- 'ponysay-qotd'],
+ packages = ['ponysay'],
+ package_dir = {'ponysay': 'ponysay'},
+ package_data = {'ponysay': ['quotes/*.quotes', 'ponies/*.pony']},
+ entry_points = {'console_scripts': [
+ 'ponysay=ponysay:main',
+ 'ponythink=ponysay:main',
+ 'ponysay-qotd=ponysay:qotd_server',
+ 'termcenter=ponysay:termcenter']},
zip_safe = False,
classifiers = [
'Development Status :: 5 - Production/Stable',
diff --git a/termcenter b/termcenter
deleted file mode 100755
index 54fffa0..0000000
--- a/termcenter
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env python3
-
-import os,sys,time, itertools
-import argparse
-from subprocess import *
-try:
- import re2 as re
-except:
- import re
-
-parser = argparse.ArgumentParser(description='Center stuff on terminals')
-parser.add_argument('string', nargs='*', type=str)
-args = parser.parse_args()
-
-for e in [sys.stdin] + args.string:
- lines = [e] if isinstance(e, str) else e.readlines()
- if lines:
- width = max(map(len, map(lambda s: re.sub(r'\x1B\[[0-9;]+m|\$.*\$', '', s), lines)))
- pad = int((os.get_terminal_size()[0]- width)/2)
- for line in lines:
- print(' '*pad + re.sub(r'\$.*\$|\n', '', line))
-