Page 1 of 5

Posted: Fri 25 Jun 2010, 01:03
by JustGreg
This is neat! I applied xcowsay to my temperature display utility for Lucid. The code is really simple now:

Code: Select all

THRMFILE=`find /proc/acpi/thermal_zone -name "temperature"`
TEXT=`cat $THRMFILE | cut -c25-30`
exec xcowsay --cow=small $TEXT
Here is a png of my desktop with the temperature display

Posted: Fri 25 Jun 2010, 01:08
by JustGreg
I took the liberty of converting Big Bass package into a regular pet for people to try out. The pet installs fine under Lucid Puppy 5.01

Posted: Fri 25 Jun 2010, 01:13
by jemimah
Hah, if you wanna be really annoying, one could replace yaf-splash with a wrapper for xcowsay, and let the cow (or lobster) handle all notifications.


...

Posted: Fri 25 Jun 2010, 02:40
by big_bass
updated lobster image again 6-26-2010
cleaned up the image a bit and re sized its smaller of course you can select any other image
I thought it to fitting to have a happy lobster .... can we get a nice English accent too :D

@jemimah
yes, this will be a nice replacement for " yaf-splash type of messages " it has built in utf-8 handling and images!
I was looking at the C code there are many options to use


how about for those errors cow_donkey will let you know :lol:

Code: Select all

#!/bin/sh

#call this xdonkeythink

TEXT_MESG="looks like you messed up big time" 
IMG=donkey
exec xcowsay --cow=$IMG $TEXT_MESG "$@"

Joe

Posted: Fri 25 Jun 2010, 08:48
by Lobster
Having problems with sound in Fluppy - so not sure what this sounds like
http://www.youtube.com/watch?v=20Hor12VyCw
I used JustGregs pet and CPU code like so:

Code: Select all

#! /bin/bash
sleep 5
xcowsay --cow=Lobster6 --time=1 --dream=puppylogo96.png "$@"
xcowsay --cow=Lobster6 We are Puppy Linux. Resistance is futile. We will steal your penguins! "$@"
THRMFILE=`find /proc/acpi/thermal_zone -name "temperature"` 
TEXT=`cat $THRMFILE | cut -c25-30` 
xcowsay --cow=Lobster6 My CPU temp is $TEXT - time to TAKE OVER THE WORLD!
xcowsay --cow=Lobster6 A world populated by talking Lobsters. We must not fail! "$@"
xcowsay --cow=Lobster6 --time=2 --dream=poseidon.jpg "$@"
xcowsay --cow=Lobster6 My operating system has talking Lobsters. Your arguments are invalid. "$@"
xcowsay --cow=Lobster6 Your questions are irrelevant. Prepare to be assimilated! "$@"
xcowsay --cow=Lobster6 --time=2 --dream=lobkiss.jpg "$@"
By changing the image files you can get your own results
Apologies for spelling mishtakes . . .
but I really want it tied to flite . . . :shock:

Posted: Fri 25 Jun 2010, 22:17
by 01micko
I just couldn't resist making a contribution to this madness! :lol:

Code: Select all

#!/bin/sh
ln -s /usr/share/doc/puppylogo48.png /usr/share/xcowsay/cow_puppylogo48.png 2>/dev/null
exec xcowsay --cow=puppylogo48 Woof, Woof!   "$@" &
aplay /usr/share/audio/2barks.au
:lol:

Posted: Sat 26 Jun 2010, 00:54
by JustGreg
Yes, o1micko, another good use!

Posted: Sat 26 Jun 2010, 10:13
by Lobster
I am using this in the test 205 of Lucid and it runs OK
It could be used as the basis of an intro . . .
Any other scripts to be shared? 8)

Code: Select all

#! /bin/bash
# sleep 2
# flitet "hello world" | aplay &        
cd /
xcowsay --cow=Lobster6 --time=2 --dream=/usr/share/images/gtkam/gtkam-new.png "$@"
xcowsay --cow=Lobster6 What is new for 5.1 of Puppy Lucid? "$@"
cd /
xcowsay --cow=Lobster6 --time=2 --dream=/usr/share/superscan/pixmaps/PenguinWithWrench.xpm "$@"
xcowsay --cow=Lobster6 Upgraded scripts and programs "$@"
xcowsay --cow=Lobster6 Lucid 5.1 - new quickpet - more working packages "$@"
xcowsay --cow=Lobster6 Click on chat for instant help and advice"$@"
xcowsay --cow=Lobster6 Latest Browsers, latest Flash, My CPU is heating up! "$@"
xcowsay --cow=Lobster6 Made with legendary Puppy Woof know how and the best Ubuntu bits"$@"
THRMFILE=`find /proc/acpi/thermal_zone -name "temperature"` 
TEXT=`cat $THRMFILE | cut -c25-30` 
xcowsay --cow=Lobster6 My CPU temp is $TEXT - time to start cooking! "$@"
xcowsay --cow=Lobster6 My operating system has talking Lobsters. Your arguments are invalid. "$@"
xcowsay --cow=Lobster6 --time=2 --dream=/usr/share/pixmaps/smileys "$@"
ln -s /usr/share/doc/puppylogo48.png /usr/share/xcowsay/cow_puppylogo48.png 2>/dev/null
exec xcowsay --cow=puppylogo48 Woof, Woof! "$@" &
aplay /usr/share/audio/2barks.au "$@"
aplay /usr/share/audio/leave.wav &

Posted: Sat 26 Jun 2010, 14:20
by Iguleder
01micko wrote:I just couldn't resist making a contribution to this madness! :lol:
lol, you stole my ambitious ln -s project :P

I think we should write a wrapper that provides the yaf-splash options and runs the cow thing ... should be a cool addition to future Woofications :)

Posted: Sat 26 Jun 2010, 14:59
by Lobster
In Puppy Lucid 205 I added the second flite speech pet mentioned here:
http://www.murga-linux.com/puppy/viewto ... 439#365897

Here is my code with speech sythesis added

Code: Select all

#! /bin/bash
# sleep 2
# flitet "hello world" | aplay &        
# cd /
# flitet "New in Puppy!" | aplay & 
# xcowsay --cow=Lobster6 --time=2 --dream=/usr/share/images/gtkam/gtkam-new.png "$@"
THRMFILE=`find /proc/acpi/thermal_zone -name "temperature"` 
TEXT=`cat $THRMFILE | cut -c25-30` 
flitet "My Core temperature is $TEXT centigrade. Cooking!" | aplay &
xcowsay --cow=Lobster6 My CPU temp is $TEXT - cooking! "$@"
flitet "What is new for 5.1 of Puppy Lucid?" | aplay & 
xcowsay --cow=Lobster6 What is new for 5.1 of Puppy Lucid? "$@"
# cd /
# xcowsay --cow=Lobster6 --time=2 --dream=/usr/share/superscan/pixmaps/PenguinWithWrench.xpm "$@"
flitet "Upgraded scripts and programs." | aplay &
xcowsay --cow=Lobster6 Upgraded scripts and programs. "$@"
flitet "Lucid 5.1. New quick pet. More working packages." | aplay &
xcowsay --cow=Lobster6 Lucid 5.1 - new quickpet - more working packages. "$@"
flitet "Latest Browsers, latest Flash, latest programs." | aplay &
xcowsay --cow=Lobster6 Latest Browsers, latest Flash, latest programs. "$@"
flitet "Made with Puppy woof, and the best Ubuntu bits." | aplay &
xcowsay --cow=Lobster6 Made with Puppy Woof and the best Ubuntu bits."$@"
flitet "Puppy has talking Lobsters. Your arguments are invalid." | aplay &
xcowsay --cow=Lobster6 Puppy has talking Lobsters. Your arguments are invalid. "$@"
cd /
xcowsay --cow=Lobster6 --time=2 --dream=/usr/share/pixmaps/smileys.png "$@" &
#ln -s /usr/share/doc/puppylogo48.png /usr/share/xcowsay/cow_puppylogo48.png 2>/dev/null
#exec xcowsay --time=3 --cow=puppylogo48 Woof, Woof! Goodbye. "$@" &
#xcowsay --cow=Lobster6 Goodbye. "$@" &
aplay /usr/share/audio/2barks.au "$@" &
aplay /usr/share/audio/leave.wav

Posted: Sat 26 Jun 2010, 15:08
by musher0
Now, now, kids! :roll:
You can have all the fun after your homework is done! :lol:

Posted: Sat 26 Jun 2010, 23:46
by big_bass
Hey Lobster your script is looking good with flite

I was looking for a new image hows this

a lot of work getting that alpha channel
thingy working
needs a smile I'll leave that to
whoever that wants to play a bit with it


Joe

Posted: Sun 27 Jun 2010, 03:41
by technosaurus
Now Puppified

Code: Select all

xpupsay --pup=puppy Hello
or simply

Code: Select all

xpupsay Hello

Posted: Sun 27 Jun 2010, 05:20
by Lobster
Now Puppified
Thank goodness. Those Lobsters were driving me crazy (sorry Joe)
- and I don't have too far to go . . . :wink:

Used your new pet technosaurus
working fine 8)

are there other option such as

Code: Select all

xpupsay --pup=lobster Hello
xpupsay --pup=cow Hello
Ah no - just the one puppy png link?
but have you got all the code in that one 25k pet? Impressive if so . . .

I have streamlined the code specifically for the new pet and Puppy Lucid
As far as I can tell, if flite is not included the program will still work OK

Code: Select all

#! /bin/bash

cd /
xpupsay --pup=puppy --time=2 --dream=/usr/share/doc/community48.jpg "$@" 
aplay /usr/share/audio/2barks.au "$@" &
flitet "Welcome to Puppy." | aplay & 
xpupsay --pup=puppy Welcome to Puppy."$@"
flitet "Made with Puppy magic, and the best Ubuntu bits." | aplay &
xpupsay --pup=puppy Made with Puppy magic and the best Ubuntu bits."$@"
flitet "What is new for 5.1 of Puppy Lucid?" | aplay & 
xpupsay --pup=puppy What is new for 5.1 of Puppy Lucid? "$@"
flitet "Upgraded scripts and programs." | aplay &
xpupsay --pup=puppy Upgraded scripts and programs. "$@"
flitet "New quick pet. More working packages." | aplay &
xpupsay --pup=puppy NEW quickpet. More working packages. "$@"
flitet "Latest Browsers: FireFox, Crome and Opera." | aplay &
xpupsay --pup=puppy Latest Browsers: FireFox, Chrome and Opera. "$@"
flitet "Puppy speaks. Have fun." | aplay &
xpupsay --pup=puppy Puppy speaks. Have fun. "$@"
cd /
xpupsay --pup=puppy --time=2 --dream=/usr/share/doc/community48.jpg "$@" &
aplay /usr/share/audio/2barks.au "$@" &

Posted: Sun 27 Jun 2010, 06:27
by technosaurus
there is an --image option to, but it requires full path to image
--think makes a cloud-like bubble
--dream is broken - it uses pwd as / (so it only works if you cd to /)

Here is a summary of xpupsay --help
  • -t, --time=SECONDS Number of seconds to display message for
    -r, --reading-speed=N Number of milliseconds to delay per word.
    -f, --font=FONT Set message font (Pango format).
    -d, --dream=FILE Display an image instead of text.
    --think Display a thought bubble rather than a speech bubble.
    --daemon Run xpupsay in daemon mode.
    --pup-size=SIZE Size of the pup (small, med, large).
    --image=FILE Use a different image instead of the pup.
    --monitor=N Display pup on monitor N.
    --at=X,Y Force the pup to appear at screen location (X,Y).
    --bubble-at=X,Y Change relative position of bubble.
    --config=FILE Specify alternative config file.
    --debug Keep daemon attached to terminal.

Posted: Sun 27 Jun 2010, 07:44
by vovchik
Dear Puppians,

xcowsay can also make use of a .xcowsayrc file in the users $HOME directory. Mine now contains the following:

Code: Select all

display_time=5
alt_image=/usr/share/xcowsay/felix.png
at_y=300
at_x=300
The man file contains a bit more information on what is acceptable as rc content.

Cheers,
vovchik

Posted: Sun 27 Jun 2010, 08:06
by technosaurus
removed most remaining "cow" references in source package - replaced with pup

changed --dream to use full path vs. relative path from pwd

Posted: Sun 27 Jun 2010, 09:51
by Lobster
Anyone worked out how to use multiple lines
or call a text file?

This seems to directly call c programming (printf)
and uses a virtual Richard Stallman (be afraid)
http://www.doof.me.uk/2009/10/31/an-alt ... f-xcowsay/

Posted: Sun 27 Jun 2010, 10:01
by Lobster
a lot of work getting that alpha channel
thingy working
Joe I assume you are not talking of the
alpha channel to communicate with the Lobsterian multiverse :shock:
. . . so this is something to do with masking in Gimp?

It is a fine Lobster incidentally
but I have to watch my egoic tendencies
and try not to encourage them . . .

Vorchik has used his 'felix cat icon' - heretic :wink:
Technosaurus is orthodox
. . . and I have a strange feeling that the alligator in Jemimahs pond
may start talking in Fluppy
I hope so anyway . . . :lol:

The new text messages in 205 Lucid are excellent
but I feel this has more potential
readouts, presentation, tutorials, messages, easy intros
for the non-Puppy fraternity etc.

Puppy Linux
Fun 4 Penguins

Posted: Sun 27 Jun 2010, 15:20
by JustGreg
Thank you, technosaurus, for the up date. I have change my temperature checking to use xpupsay. This is a very good way of displaying information that a user needs to see. It is nice that it closes automatically without requiring user action.