Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fortunes mod de
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Tinitus
Veteran
Veteran


Joined: 20 Sep 2004
Posts: 1754

PostPosted: Mon Feb 23, 2015 7:25 pm    Post subject: Fortunes mod de Reply with quote

Gibt es eigentlich noch ein deutsches fortunes File/ ebuild? Also für die deutschen Texte?
Back to top
View user's profile Send private message
Tinitus
Veteran
Veteran


Joined: 20 Sep 2004
Posts: 1754

PostPosted: Tue Feb 24, 2015 6:34 pm    Post subject: Reply with quote

Hallo,

also mal die Auflösung:

mit:

Code:

emerge fortune-mod-all cowsay xcowsay -pv
-
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] games-misc/fortune-mod-all-1  USE="-offensive" LINGUAS="de -cs -it -sk" 0 KiB
[ebuild   R    ] games-misc/cowsay-3.03-r2  0 KiB
[ebuild   R    ] games-misc/xcowsay-1.3  USE="dbus fortune" 0 KiB


bekommt man die Sachen installiert.

Die deutschen Zitate hat ein netter Mensch als tar.gzip File hier hinterlegt:

http://www.mabelsoft.org/fortune_de_utf8.htm

Der Vorteil ist, daß diese schon im UTF8 Format sind.

Diese nach
Code:


/usr/share/fortune/de

kopieren.

Dann funktioniert der Aufruf:
Code:

fortune de

schon mal.

Ein

Code:
nano ~/.bashrc


mit dem Eintrag :

Code:
fortune | cowsay


bringt dann die Kuh mit den Sprüchen an den Start...


Interessante Links:
http://www.gentoo-wiki.info/TIP_Fortune
http://wiki.ubuntuusers.de/fortune
Back to top
View user's profile Send private message
Tinitus
Veteran
Veteran


Joined: 20 Sep 2004
Posts: 1754

PostPosted: Tue Feb 24, 2015 6:38 pm    Post subject: Reply with quote

Man könnte auch eine

fortune.sh erstellen mit:

Code:

nano fortune.sh


mit dem Inhalt:

Code:

#/bin/bash
# Gibt mittels Cowsay und Fortunes Sprueche aus
if [ -f /usr/bin/fortune -a -d /usr/share/cowsay-3.03/ ]; then
     dir='/usr/share/cowsay-3.03/cows/'
     file=`/bin/ls -1 "$dir" | sort --random-sort | head -1`
     cow=$(echo "$file" | sed -e "s/\.cow//")
     /usr/bin/fortune quiz wusstensie | /usr/bin/cowsay -f $cow
fi



Speichern und ausführbar machen mit chmod +x fortune.sh

Und diese dann in die bashrc eintragen.

Sieht noch besser aus.

Übrigens ein

Code:
xcowfortune
bringt die Sache unter X ins Rollen.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum