mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-24 21:37:59 +01:00
fix some errors the pony files and quote files + add fortune-mod-mlp (script to automate the creation of the the fortune-mod-mlp package already in AUR)
Signed-off-by: Mattias Andrée <maandree@operamail.com>
This commit is contained in:
parent
6d88f4f7db
commit
b849bc64d6
13 changed files with 157 additions and 7 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,6 +1,6 @@
|
|||
## Private workspace directory
|
||||
|
||||
/_/
|
||||
_/
|
||||
/*.pony
|
||||
|
||||
|
||||
|
|
3
extras/fortune-mod-mlp/.gitignore
vendored
Normal file
3
extras/fortune-mod-mlp/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
obj/
|
||||
/pony
|
||||
/pony.dat
|
31
extras/fortune-mod-mlp/COPYING
Normal file
31
extras/fortune-mod-mlp/COPYING
Normal file
|
@ -0,0 +1,31 @@
|
|||
fortune-mod-mlp — Fortune quotes from My Little Pony Friendship is Magic
|
||||
|
||||
Derived work from ponysay.
|
||||
Derived work from fortune-mod-mlp as released to the
|
||||
Arch Linux User Repository by Matthias Devlamynck
|
||||
|
||||
|
||||
Copyright (C) 2012, 2013 Erkin Batu Altunbaş et al.
|
||||
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
If you intend to redistribute ponysay or a fork of it commercially,
|
||||
it contains aggregated images, some of which may not be commercially
|
||||
redistribute, you would be required to remove those. To determine
|
||||
whether or not you may commercially redistribute an image make use
|
||||
that line ‘FREE: yes’, is included inside the image between two ‘$$$’
|
||||
lines and the ‘FREE’ is and upper case and directly followed by
|
||||
the colon.
|
10
extras/fortune-mod-mlp/DEPENDENCIES
Normal file
10
extras/fortune-mod-mlp/DEPENDENCIES
Normal file
|
@ -0,0 +1,10 @@
|
|||
MAKE DEPENDENCIES
|
||||
|
||||
make
|
||||
findutils
|
||||
grep
|
||||
sed
|
||||
coreutils
|
||||
sh
|
||||
fortune-mod
|
||||
|
1
extras/fortune-mod-mlp/LICENSE
Symbolic link
1
extras/fortune-mod-mlp/LICENSE
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../LICENSE
|
73
extras/fortune-mod-mlp/Makefile
Normal file
73
extras/fortune-mod-mlp/Makefile
Normal file
|
@ -0,0 +1,73 @@
|
|||
PKGNAME=fortune-mod-mlp
|
||||
PREFIX=/usr
|
||||
DATA=/share
|
||||
DATADIR=$(PREFIX)$(DATA)
|
||||
FORTUNEDIR=$(DATADIR)/fortune
|
||||
LICENSEDIR=$(DATADIR)/licenses/$(PKGNAME)
|
||||
|
||||
SRC = ../../ponyquotes
|
||||
PSRC = ../../ponies
|
||||
|
||||
PONIES = $(shell find "$(SRC)" | grep '$(SRC).*\..' | sed -e "s:^$(SRC)::" | sed -e "s:^/::g" | cut -d . -f 1 | sort | uniq)
|
||||
|
||||
|
||||
# Tab symbol for use with `echo`. echo -e is not POSIX
|
||||
empty =
|
||||
tab = $(empty) $(empty)
|
||||
|
||||
|
||||
.PHONY: all
|
||||
all: pony pony.dat
|
||||
|
||||
|
||||
pony.dat: pony
|
||||
strfile pony
|
||||
|
||||
|
||||
pony: $(foreach P, $(PONIES), obj/$(P))
|
||||
cat $^ > $@
|
||||
|
||||
|
||||
obj/%: $(SRC)/%.*
|
||||
@mkdir -p obj
|
||||
test -f $@ && rm $@ || true
|
||||
pony="$$(./name-pony.sh "$(PSRC)" $*)" && \
|
||||
for file in $^; do \
|
||||
cat $$file >> $@ && \
|
||||
echo "$(tab)-- $$pony" >> $@ && \
|
||||
echo % >> $@ \
|
||||
|| exit 1; \
|
||||
done
|
||||
|
||||
|
||||
.PHONY: install
|
||||
install: pony pony.dat
|
||||
install -d -- "$(DESTDIR)$(FORTUNEDIR)"
|
||||
install -m644 pony pony.dat -- "$(DESTDIR)$(FORTUNEDIR)"
|
||||
|
||||
|
||||
.PHONY: install-license
|
||||
install-license:
|
||||
install -Dm644 -- COPYING "$(DESTDIR)$(LICENSEDIR)/COPYING"
|
||||
install -Dm644 -- "$(shell realpath LICENSE)" "$(DESTDIR)$(LICENSEDIR)/LICENSE"
|
||||
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
-rm -- "$(DESTDIR)$(FORTUNEDIR)/pony"
|
||||
-rm -- "$(DESTDIR)$(FORTUNEDIR)/pony.dat"
|
||||
-rm -- "$(DESTDIR)$(LICENSEDIR)/COPYING"
|
||||
-rm -- "$(DESTDIR)$(LICENSEDIR)/LICENSE"
|
||||
-rmdir -- "$(DESTDIR)$(LICENSEDIR)"
|
||||
|
||||
|
||||
.PHONY: list-ponies
|
||||
list-ponies:
|
||||
@for p in $(PONIES); do echo "$$p"; done
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-rm -r obj
|
||||
-rm pony pony.dat
|
||||
|
32
extras/fortune-mod-mlp/name-pony.sh
Executable file
32
extras/fortune-mod-mlp/name-pony.sh
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/bin/sh
|
||||
|
||||
file="$1/$2.pony"
|
||||
pony="$2"
|
||||
name=""
|
||||
|
||||
case "${pony}" in # Exceptions not supported by the name extraction below
|
||||
(carrot) name="Carrot";;
|
||||
(chrysalis) name="Chrysalis";;
|
||||
(lemonhearts) name="Lemon Hearts";;
|
||||
(lily) name="Lily Valley";;
|
||||
(snowflake) name="Snowflake";;
|
||||
(twinkleshine) name="Twinkleshine";;
|
||||
(rumble) name="Rumble";;
|
||||
esac
|
||||
|
||||
if [ -n "${name}" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
name="$(cat "$file" | grep '^NAME: ' | sed -e 's/^NAME: //g')"
|
||||
name="$(echo $(echo "$name" | grep -o '[^,(]*' | head -n 1))"
|
||||
|
||||
full_name="$(cat "$file" | grep '^OTHER NAMES: ' | sed -e 's/^OTHER NAMES: /, /g')"
|
||||
full_name="$(echo $(echo "$full_name" | grep -o ', [^,(]* (official, full name[a-z]*)' | grep -o ' [^,(]*' | head -n 1))"
|
||||
|
||||
if test -n "${full_name}"; then
|
||||
echo "${full_name}"
|
||||
else
|
||||
echo "${name}"
|
||||
fi
|
||||
|
|
@ -13,7 +13,7 @@ KIND: alicorn
|
|||
LINK: regular
|
||||
MANE: pastel
|
||||
NAME: Cadance
|
||||
OTHER NAMES: Princess Cadance (official, titled), Mi Amore Cadenza (official, full named without title), Princess Mi Amore Cadenza (official, full named)
|
||||
OTHER NAMES: Princess Cadance (official, titled), Mi Amore Cadenza (official, full name without title), Princess Mi Amore Cadenza (official, full name)
|
||||
POSE: stand
|
||||
SOURCE: [jristz]
|
||||
WIDTH: 55
|
||||
|
|
|
@ -14,7 +14,7 @@ LINK: regular
|
|||
MANE: pastel
|
||||
MASTER: cadance
|
||||
NAME: Cadance
|
||||
OTHER NAMES: Princess Cadance (official, titled), Mi Amore Cadenza (official, full named without title), Princess Mi Amore Cadenza (official, full named)
|
||||
OTHER NAMES: Princess Cadance (official, titled), Mi Amore Cadenza (official, full name without title), Princess Mi Amore Cadenza (official, full name)
|
||||
POSE: stand
|
||||
SOURCE: [jristz]
|
||||
WIDTH: 46
|
||||
|
|
|
@ -14,7 +14,7 @@ LINK: regular
|
|||
MANE: pastel
|
||||
MASTER: cadance
|
||||
NAME: Cadance
|
||||
OTHER NAMES: Princess Cadance (official, titled), Mi Amore Cadenza (official, full named without title), Princess Mi Amore Cadenza (official, full named)
|
||||
OTHER NAMES: Princess Cadance (official, titled), Mi Amore Cadenza (official, full named without title), Princess Mi Amore Cadenza (official, full name)
|
||||
POSE: scruffy
|
||||
SOURCE: (robokitty) Desktop ponies
|
||||
WIDTH: 48
|
||||
|
|
|
@ -14,7 +14,7 @@ LINK: regular
|
|||
MANE: pastel
|
||||
MASTER: cadance
|
||||
NAME: Cadance
|
||||
OTHER NAMES: Princess Cadance (official, titled), Mi Amore Cadenza (official, full named without title), Princess Mi Amore Cadenza (official, full named)
|
||||
OTHER NAMES: Princess Cadance (official, titled), Mi Amore Cadenza (official, full named without title), Princess Mi Amore Cadenza (official, full name)
|
||||
POSE: filly
|
||||
SOURCE: (Kloopp) Desktop ponies
|
||||
WIDTH: 49
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
This day has been just perfect
|
||||
The kind of day I've dreamed since I was small
|
||||
Everypony I'll soon control
|
||||
Every Stallion, mare and foal
|
||||
Every stallion, mare and foal
|
||||
Who says a girl can't really have it all?
|
||||
|
|
|
@ -1 +1 @@
|
|||
You do realize the reception has been canceled, don't you?
|
||||
You do realize the reception has been canceled, don't you?
|
||||
|
|
Loading…
Reference in a new issue