xcowsay talking lobster? new x message display with icon

Under development: PCMCIA, wireless, etc.
Message
Author
JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#11 Post 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
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#12 Post 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
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#13 Post 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.


...

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#14 Post 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
Attachments
cow_Lobster6.png
(58.77 KiB) Downloaded 2497 times
cow_donkey.png
(54.11 KiB) Downloaded 2615 times
Last edited by big_bass on Mon 28 Jun 2010, 15:02, edited 6 times in total.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#15 Post 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:
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#16 Post 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:
Attachments
woofwoof.png
(17.73 KiB) Downloaded 2131 times
Puppy Linux Blog - contact me for access

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#17 Post by JustGreg »

Yes, o1micko, another good use!
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#18 Post 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 &
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#19 Post 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 :)
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#20 Post 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
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#21 Post by musher0 »

Now, now, kids! :roll:
You can have all the fun after your homework is done! :lol:
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#22 Post 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
Attachments
cow_Lobster6.png
(58.77 KiB) Downloaded 1940 times
Last edited by big_bass on Mon 28 Jun 2010, 15:03, edited 1 time in total.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#23 Post by technosaurus »

Now Puppified

Code: Select all

xpupsay --pup=puppy Hello
or simply

Code: Select all

xpupsay Hello
Attachments
xpupsay-1.2-i486.pet
(25.17 KiB) Downloaded 848 times
hello-puppy.png
(18.23 KiB) Downloaded 2060 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#24 Post 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 "$@" &
Last edited by Lobster on Sun 27 Jun 2010, 06:52, edited 1 time in total.
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#25 Post 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.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#26 Post 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

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#27 Post by technosaurus »

removed most remaining "cow" references in source package - replaced with pup

changed --dream to use full path vs. relative path from pwd
Attachments
xpupsay-1.2.1-i486.pet
(12.15 KiB) Downloaded 783 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#28 Post 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/
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#29 Post 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
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#30 Post 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.
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

Post Reply