erkin / ponysay Goto Github PK
View Code? Open in Web Editor NEWPony rewrite of cowsay.
License: GNU General Public License v3.0
Pony rewrite of cowsay.
License: GNU General Public License v3.0
ponyquotes should be fully merged into the supermodule.
At this moment only TV ponys are allowed right or not?
I ask this since I have a Fyrefly (look like Rainbowdash, sma from the tumbr-es), Woona (Moonstuck) and I found another desktop pony from the Toy-line not showed in TV at this momment
this make me thinking bout this type of ponies
What type of ponies are allowed?
Reading the freedesktop spesification I noticed that app-thinks need to be installed in /usr/share/{app}/{app-think}
but at this point the ponysay are intalled in /usr/share/ponies AND /usr/share/ttyponies
if you want fallow the specification need install on /usr/share/ponysay/{ponies,ttyponies}
reding the Makefile and the {z,ba}sh-compleetion this need many changes
I suggest chanign this in-the-future (forget future-past correct word, sorry Xp) that the initial simlinks for ponyes are finished
I try to make a "git push origin master" w timeturner and ttyponies simlinkeds but not sure if my new internet probvider are the problem or I not have permision but every time I resive a 404 (mainly) or 4xx (different to 404) problem in connection
any can test t'is a permision issue if not, Give me the rest
PD: Yes I want help more to this project now, that I have the time
ponysay was not working for me without specifying the -f
ponysay hi
/usr/bin/ponysay: line 270: [: too many arguments
63: Could not find * cowfile!
Looking at the script the problem is this line
# Pony not a file? Search for it
if [ ! -f $pony ]; then
...
fi
$pony is set to * so this expands to everything in my current directory.
Surrounding it with double quotes fixed the problem.
If there is anypony here how use zsh and knows how to write auto-completion for it,
the zsh auto-completion should be updated to work as the fish or bash implementation.
This might be just a mac-build issue.
I'm compiling with "./configure --without-info --without-shared-cache --prefix=/usr/local/; make"
However, the generated ponysay.install file still includes the line
INSTALLDIR = '/usr'
because of this, once 'make install" is run, ponysay is installed to /usr/local/, but can't find any of the ponyfiles
It is fine when installed to '/usr/
This is on OSX 10.8
Before we can tag 2.1 there are some minor things that we should do:
Confirm Spanish manpage: commit: 972c174
Make sure no up to date system identifies the Python script as Python 2. I edited the shebang to python
instead of python3
because emacs did not recognise python3
withput .py
, however both are recognised as Python 3 in Arch.
This should be check for Gentoo and Ubuntu, as any other system if some is using
something else.
Info manual should be updated to describe the pony files and how ponyquotes works .[I'll take that one]
Packagers for GNU/Linux distribution binary package repositories should make sure /var/cache/ponysay is either emptied or complete removed before all files are removed. This is to make sure no bad kmsponies are lurking around when there format is updated, this can happen for this version and any future version.
In other words, a pre-installation hook is needed:
if [-d "/var/cache/ponysay" ]; then
rm -r "/var/cache/ponysay"`
fi
--256-colours
--256colours
--x-colours
-X
Forces uses of 256-colour ponies despite of actual terminal capabilities.
--tty-colours
--ttycolours
--vt-colours
-V
Forces used of TTY ponies (OSI P colours) despite of actual terminal capabilities.
--kms-colours
--kmscolours
-K
Forces used of KMS ponies despite of actual terminal capabilities.
--pony-only
--ponyonly
-o
Do not print the balloon and uses spaces instead of the link to the balloon
It may be good if the program supported the pony files to specify range of columns
the balloon must cover and whether to centre around it, fill to left or fill to right.
--colour (= --colour-balloon --colour-link colour-message)
--colour-balloon
--colour-bubble (= --colour-balloon)
--colour-link
--colour-message
--colour-msg (= --colour-message)
--colour-pony
Specify how to colour the different parts of the output. --colour-balloon=1;31 should colour the speech
balloon bold red. --colour-pony will be useless, except for if the pony happens to be in ASCII art.
With this you can create a script that remains you of important things. For if you have a scripted named
pony-message fortune | ponysay $(pony-message)
will give a fortune cookie, except if pony-message
has an output. If the output is for example --colour=31 bläbb
the pony will print bläbb
in red with a
red balloon and a red link to the balloon.
The tag 2.0-rc2
has now been created.
The program now consists of the C truncater, a Bash glue script and a Python 3 script with everything else.
To build the program you must first run ./configure
, to install the Spanish manpage run ./configure --with-man-es
.
New features:
If util-say
is installed the argument for -f
can be a .png file.
Improved TTY support utilising KMS, see PDF manual page 14.
If there are no problems we can create stable tag 2.0
(and update in ponysay.py
).
The spanish manpage needs to be updated with ponysay -L
(uppercase L).
The commit 6fcb65b introduced this bug when installing on gentoo.
After install of a package, (it seems like) gentoo runs some stuff to update info
.
And I get this message:
* Regenerating GNU info directory index...
* Processed 137 info files; 1 errors.
install-info: No such file or directory for /usr/share/info/ponythink.info.gz
from portage, I know nothing about info-stuff...
It would be nice if -f could be used multiple time to specify a set of ponies from which one is selected at random.
I tired of patching makefile for Debian compliance.
Firts of all there should be a way to install ponysay binary to /usr/games
.
Second, don't mindlesly call gcc for truncater. At least use something more robust like $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o truncater truncater.c
. I just want to do ./configure --prefix=/usr/games --without-tex --without-fish; make; make install
and be happy.
Also do something with your script mess. I mean, list.pl
, linklist.pl
, pq4ps
, pq4ps.pl
, pq4ps-list
, pq4ps-list.pl
. WTF? Perl is used for constructing sed command line. WTF? Shell script is used just for calling Perl script with the same name. WTF?
I love Perl and using it this way makes me cry. Really, you need only two scripts. One for list and second for that pq4ps stuff.
So on OSX 10.8 & on kubuntu 12.04LTS; I get this after installing 2.1.1
File "./ponysay", line 178
print(('\033[1m' + pony + '\033[21m' if (pony in quoters) else pony) + spacing, end='') # Print ponyfilename
^
SyntaxError: invalid syntax
And, yes I made sure I was on the bash shell
echo $SHELL
/bin/bash
I was reported a bug about being unable to install ponysay. It turned out to be caused by the lack of TeXinfo. More dependencies means less portability and more complication. What can we do about it?
For example; should we separate a "minimal install" and a "full install"?
Selectable balloon style, so you can get the nicest your terminal supports.
Place balloon to the right of the pony without additionally inserted lines.
It seems ponysay doesn't support cowsay's -n option? Giving multiple line messages? Is it possible to support this or is there erhaps some workaround?
EDIT:
oh, btw, I'm using ponysay v1.4.1 from the arch repository, if this is something already fixed in a newer version, sorry, just say, I'll try and update :)
Well, we use cowsay to print speech bubbles, so what? I think we can do that on our own.
And maybe modify the fileformat a bit to something more... better?
And one problem many ponies have today is that the line from the bubble is missing the ponys location.
For example:
$ git clone https://github.com/erkin/ponysay.git
[ output from cloning ]
$ cd ponysay/
$ mkdir ~/.local
$ make
$ DESTDIR=~/.local make install
This will result in successfull install of ponysay, but you won't get any ponies if you don't have any homeponies. Becouse /usr/share/ponysay/(ponies|ttyponies)
are hard-coded in ponysay.
I used the script-directory of ponysay to access ../lib/ponysay/(truncater|list.pl)
and that would work, but it looks kinda ugly to have a path with ..
in when doing ponysay -l
if we would use the same solution there.
Similar to how UCS names are supported, -f
and -q
should accept misspelled pony names, these should of cause not be listed by listing methods.
I get this upon running ./configure && make:
manuals/ponysay.texinfo:259: Misplaced {.
manuals/ponysay.texinfo:259: Misplaced }.
makeinfo: Removing output file `/home/svenstaro/svn-packages/ponysay/trunk/erkin-ponysay-06aa33b/ponysay.info' due to errors; use --force to preserve.
Ponysay is all over the place. Just look at the clone! We need to clean this up. It uses bash, Perl and C but also depends on cowsay while already being more powerful than it. Shouldn't we rewrite this thing in C++ or Python or something and make it clean?
There should be an option to limit the randomly selected pony (when -f
is not used or -q
has no ponies)
to those ponies whom fit the terminal. If this option is used with any of the pony listing options that list should
also be limited to those ponies.
I think the best way to do this is with a sorted list of widths and a sorted list of heights.
Enhancement that came up in issue #46
-f "Pinkie Pie" -e "Cannon"
is the same thing as -f pinkiepie_cannon
[the current name is pinkiecannon
]
That is how it is described in issue 46. However I think it is better if this feature uses a file structure in
/usr/share/ponysay/extras
where pinkiepie
is a directory which contains the file cannon
which contains
the text pinkiecannon
. pinkiecannon
is than looked up in the pony directories.
Multiple -e
can be used for a -f
and -e
applies to the last previous -f
.
-e
must not be without a -f
.
The argument parser must be extended with a feature to bind -e
to -f
for this.
If no -e
is used for -f
one is selected at random if the -f
has upper case.
When implementing this, also implement removal of space even if this feature is not used.
+q
can be added to support -e
for -q
, -q
is variadic and consumes all following arguments.
Mjölna and Jesús Pezuña (the ones I know of so far) have non-ASCII letters
in their names. What should we do in this cases, I see that we have three options:
option 0: ASCII:ise the names
option 1: Use UCS in names [that is, as spelled at the beginning of this issue]
option 2: ASCII:ise the names and create symlinks with UCS in names
I am for option 1.
How reproduce:
Open a terminal in tey standard size (In tha majority of Linux Terminals is 80x25)
run ponysay -f nightmare moon
see Nightmare moon in they worst aspect ever (Sided)
Solved by
opt1: Only put Nightmare moon in fullscreens terminals
opt2: Make the mare of the moon more small
opt3: Remove Nightmare by the usual form (Harmony elme...er..deleting)
If you have more options post this the options
I know tittle are a little...strange but here is the issue
usr/bin is for command binaries like ponysay and ponythink
usr/lib if for Libraries for the binaries in /usr/bin/ and /usr/sbin/
fallow this description ponysaytruncated is a helper for ponysay (the /bin) and cannot run/is uselles standaralone right?
this make more sence puth them in usr/lib and (optionaly) renamed to libponysaytruncater (I say optionaly, I not have problem for remain the same name and possible is best maintain the name)
For this reazon I ask this: Why originaly put ponysaytruncated in usr/bin ?
PD: I Read FHS only for etreme borriness...
I see this article http://mlp.wikia.com/wiki/Minuette and now Colgate is officialy called Minuete (thankd to colgate-palmolive copiraight), and I ask, you use fandom names or officials names or fandom names with symlink to officials names?
I confussed a little ()thank to Minuete/Colgate/Romana) and i want know you possition about this
PD: and ask if is possible add discord chrysalis and changeling to the ponysay???
PD2: list of ponys http://mlp.wikia.com/wiki/List_of_ponies
The ponies have a lot of holes in gnome-terminal: http://sycoso.telamitto.org/pictures/ponysay-gnome-terminal-broken.png
I'm running ubuntu 12.04 amd64.
They look normal in xterm and tty, though.
I pushed code that I havn't tested (I didn't think of the difference between [ and [[),
everything in ponysay was broken because of this in version 1.3 and 1.4,
@svenstaro You should upload version 1.4.1 to arch as soon as possible because the arch package stopped working properly because of this.
To make sure things like this does not happen again, and make installations from git always
work have create a new branch named develop
where code can be pushed an than pulled to master
when well tested.
Manuals, ponies files and the make file should be pushed to master
directly as they will not break the program.
/usr/bin/ponythink: line 240: /dev/shm/.ponythink: No such file or directory
This error is encountered when it's run on an OS X system.
kmsponies are stored in a cache, currently this is always /var/cache/ponysay, but it
should be possible to use a private one in case you do not have super user rights.
_______________________________________
/ Shinning Armor is twilight's older \
\ brother and a unicorn pony. [BROHOOF] /
---------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
__/|----w |
| ||
More info:
http://mlp.wikia.com/wiki/Shining_Armor
2.0-rc3 now? They reffer to the file ponysay.pl
to run --onelist
And 2.0 tag should be the stable one? Right? But it seems to be older then 2.0-rc1 and 2.0-rc2
I was reported this bug today. Even though /usr/games is in $PATH, ponysay apparently thinks it isn't.
It says if we need more ponies, to just ask, erm, so, can I ask for Star Swirl the Bearded (Well, Twilight Sparkle dressed as him) and Commander Hurricane (Well, Rainbow dressed as him :P )
Please and thank you!
Using the 2.0-rc1 tag
[0] etu@vroomfondel ~ $ ponysay -f fleurdelishair lol
Traceback (most recent call last):
File "/usr/bin/ponysay", line 1146, in <module>
Ponysay(opts)
File "/usr/bin/ponysay", line 60, in __init__
else: self.print_pony(args)
File "/usr/bin/ponysay", line 346, in print_pony
proc.parse()
File "/usr/bin/ponysay", line 736, in parse
self.__processPony()
File "/usr/bin/ponysay", line 835, in __processPony
lines = variables[dollar].split('\n')
KeyError: 'baloon28'
[1] etu@vroomfondel ~ $ ponysay -f fleurdelislay lol
Traceback (most recent call last):
File "/usr/bin/ponysay", line 1146, in <module>
Ponysay(opts)
File "/usr/bin/ponysay", line 60, in __init__
else: self.print_pony(args)
File "/usr/bin/ponysay", line 346, in print_pony
proc.parse()
File "/usr/bin/ponysay", line 736, in parse
self.__processPony()
File "/usr/bin/ponysay", line 835, in __processPony
lines = variables[dollar].split('\n')
KeyError: 'baloon10'
[1] etu@vroomfondel ~ $
The truncater should be reimplemented into the Python script.
When this is done we do not longer need the bash script,
meaning that ponysay.py
should be renamed to simply ponysay
.
Simpli, now officialy we have 203 ponies aprox and show them in one line is so much
is possible making ponysay -l show ponies in 2 lines?
I now you say: Usel lees command, but this can help reducin time in show ponies at runing ponysay -l ... scrolling and search in *100 is not easy
Okay, erkin. You know me. :P
I've got an ubuntu server stood up. I've tried the following things to get ponysay to work..
So. Anything?
In my machione I noticed htat locknum (enabled) is autodisabled every time that i use the command under TTY
not sure if by tyhe implementation or is a bug, I repport this
reproduce:
turn on numlock (led on)
make a ponysay anithing under tty
see numlock (is disablen/turno off) w no intervention
ponysay -q
is parsed as just ponysay
(no arguments for option -q)
ponysay -q lily
throws an error, but ponysay -q luna
works
If either pony directory has a best.pony
it should use that pony if none is provided in -f
or -q
.
It should also be symlink aware, meaning that if best.pony
is a symlink it should be followed
so -q
can get its quotes.
man(1) pages are for general commands (and cowsay uses that) but man(6) pages are for games/screensavers/entertainment et cætera (and applications such as fortune and figlet use it (and strangely, toilet (advanced figlet) uses man(1).).). Is it more suitable for ponysay to have manpages under 6?
When man ponysay
is run, it gives out the following error before loading ponysay(6):
man: can't resolve /usr/share/man/man1/ponysay.1: No such file or directory
Bug: Buggy implementation of Ponysay for TTY's
Reproduce:
login in a TTY (in this example TTY1)
run ponysay lol
profit
info: agetty, x86_64, Archlinux, version ponysay 0.6-1
suggestion how to fix:
opt1: makin a "fallback pony in assci for shoy in a TTY's for see if runing in tty you can use the command [ ! -s $DISPLAY ]
opt2: Making the ponys showables in TTY's
opt3: Restrict the use only in a X11, Wayland environment
Because it attempts to export the git repository "ponyquotes4ponysay" which is impossible because:
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
I suggest to merge the two repositories.
The ./ttyponies.sh use ponysay2ttyponysay [part of util-say] for rebuild ponies
but, in the make you call them, making build tty ponies right? if this is true and in a make all tty ponies are build
why steel maintain a ttyponies in the base project and not make automatically trow the ./ttyponies.sh?
if not is this the objetive, I not notice none mention of this command/script in nowere place neither the man nor the readme not in deps...
@erkin You missed updating the version in the file ponysay and you named the tag with comma (,) instread of dot (.).
I think ponysay deserves stable status, and the next version should be 1.0.
We have rather good TTY support, configurable output truncation to fit the screen in all aspects and
pictures of all villains, including: Discord and Chrysalis.
The only thing we don't have is Cadence and custom palette support in TTY (and xterm [all the 256 colours can be modified in, even if it is highly unrecommended.])
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.