Posted: Sat 26 Jun 2010, 15:08
Now, now, kids!
You can have all the fun after your homework is done!
You can have all the fun after your homework is done!
READ-ONLY Archive
https://oldforum.puppylinux.com/
Code: Select all
xpupsay --pup=puppy Hello
Code: Select all
xpupsay Hello
Thank goodness. Those Lobsters were driving me crazy (sorry Joe)Now Puppified
Code: Select all
xpupsay --pup=lobster Hello
xpupsay --pup=cow Hello
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 "$@" &
Code: Select all
display_time=5
alt_image=/usr/share/xcowsay/felix.png
at_y=300
at_x=300
Joe I assume you are not talking of thea lot of work getting that alpha channel
thingy working
if that part is broken and you fixed it please make a patch against the original source code--dream is broken - it uses pwd as / (so it only works if you cd to /)
Code: Select all
grep -rl xcowsay /root/xcowsay-1.2/xcowsay-1.2/ | xargs sed -i 's/xcowsay/xpupsay/g'
Code: Select all
#! /bin/pup-bash
pup-ls -1
.pup-config --pup-prefix=/pup-usr
pup-make
pup-makeinstall
pup-uname -r
pup-gcc -lpthread -o puptheworld puptheworld.c
much easier to have some way to preset a config filexcowsay can also make use of a .xcowsayrc file in the users $HOME directory. Mine now contains the following:
. . . and I have a strange feeling that the alligator in Jemimahs pond
may start talking in Fluppy
In theory, one could have, say, five different config files for different situations: warning, error, confirmation, info, WTF#@!, and call them up with appropriate text as the second argument, or one script with a case statement that would load the appropriate one. The images could be different and appropriate for each situation.CONFIGURATION FILE
xcowsay reads a configuration file on startup. The configuration file can be stored in the XDG compliant location $XDG_CONFIG_HOME/xcowsayrc (which will default to $HOME/.config/xcowsayrc) or in your home directory at $HOME/.xcowsayrc. If the --config=FILE command line option is passed FILE will be processed after your personal configuration file.
The configuration file consists of 'option = value' pairs, one per line. The valid keys are given in the next section. For example, the following line sets display time to 10 seconds:
display_time = 10000
The character '#' begins a comment which lasts until the end of the line.
Code: Select all
display_time=4
#alt_image=/usr/share/xpupsay/pup_small.png
at_y=200
at_x=600
Code: Select all
#!/bin/sh
TEXT_MESG="looks like you messed up big time"
IMG=donkey
exec xcowsay --time=20 --at=200,100 --cow=$IMG $TEXT_MESG "$@"
Code: Select all
#!/bin/bash
# *****************************************************
# PROGRAM: xcowtest
# PURPOSE: test of xcowsay
# AUTHOR: vovchik (Puppy Linux forum)
# DEPENDS: bash,
# PLATFORM: Puppy Linux (actually, any *nix)
# DATE: 28-06-2010
# *****************************************************
# cfg overrides img argument!!!
# sec overrides rc display_time=xx!!!
# *********************
# FUNCTIONS
# *********************
# --------------------
function init_vars()
# --------------------
{
cfg="$HOME/.xcowfelix1rc"
txt="HELP\n ME!"
img="/usr/share/xcowsay/felix.png"
sec=10
fnt="DejaVu Sans Bold 15"
snd="/root/my-documents/audio/pop.wav"
}
# --------------------
function display_message()
# --------------------
{
play "$snd" 2> /dev/null&
printf %b "$txt" | xcowsay --image="$img" --time=$sec --font="$fnt"
}
# *********************
# END FUNCTIONS
# *********************
# *********************
# MAIN
# *********************
init_vars
display_message
# *********************
# END MAIN
# *********************
I am having prawns.I am having fun.
Code: Select all
#! /bin/bash
txt1="Welcome to Puppy.\n
A computers best friend.\n
An operating system that works!"
txt2="Made with Puppy magic and the best Ubuntu bits.\n
Puppy heart, recognition and scripting!"
txt3="What is new for 5.1 of Puppy Lucid?\n
Upgraded scripts and programs.\n
New quickpet. More working packages.\n
Latest Browsers: FireFox, Chrome, and Opera."
sec=10
fnt="DejaVu Sans Bold 15"
# --------------------
function display_message()
# --------------------
{
# play "$snd" 2> /dev/null&
cd /
xpupsay --pup=puppy --time=2 --dream=/usr/share/doc/community48.jpg "$@"
aplay /usr/share/audio/2barks.au "$@" &
printf %b "$txt1" | xpupsay --time=$sec --font="$fnt" "$@" | flitet "Welcome to Puppy. A computers best friend. An operating system that works!" | aplay &
sleep $sec
printf %b "$txt2" | xpupsay --time=$sec --font="$fnt" "$@" | flitet "Made with Puppy magic, and the best Ubuntu bits. Puppy heart, recognition and scripting!" | aplay &
sleep $sec
printf %b "$txt3" | xpupsay --time=12 --font="$fnt" "$@" | flitet "What is new for 5.1 of Puppy Lucid? Upgraded scripts and programs. New quick pet. More working packages. Latest Browsers: FireFox, KerRome, and Opera." | aplay &
sleep 14
cd /
xpupsay --pup=puppy --time=2 --dream=/usr/share/doc/community48.jpg "$@" &
aplay /usr/share/audio/2barks.au "$@" &
}
# *********************
# END FUNCTIONS
# *********************
# *********************
# MAIN
# *********************
init_vars
display_message
# *********************
# END MAIN
# *************
Code: Select all
#! /bin/bash
# drag N drop file on this script to repair it
# call this dnd-cowsay-repair
# rename code back to a standard official code
#renames xpupsay back to xcowsay
#renames --pup back to --cow
# E-I-E-I-O :D
sed -i 's/xpupsay/xcowsay/g' "$@"
sed -i 's/--pup/--cow/g' "$@"
sed -i 's/xpupdream/xcowdream/g' "$@"
sed -i 's/xpupfortune/xcowfortune/g' "$@"
sed -i 's/xpupthink/xcowthink/g' "$@"
Code: Select all
#! /bin/bash
txt1="Welcome to Puppy.\n
A computers best friend.\n
An operating system that works!"
txt2="Made with Puppy magic and the best Ubuntu bits.\n
Puppy heart, recognition and scripting!"
txt3="What is new for 5.1 of Puppy Lucid?\n
Upgraded scripts and programs.\n
New quickpet. More working packages.\n
Latest Browsers: FireFox, Chrome, and Opera."
sec=10
fnt="DejaVu Sans Bold 15"
# --------------------
function display_message()
# --------------------
{
# play "$snd" 2> /dev/null&
cd /
xcowsay --cow=puppy --time=2 --dream=/usr/share/doc/community48.jpg "$@"
aplay /usr/share/audio/2barks.au "$@" &
printf %b "$txt1" | xcowsay --time=$sec --font="$fnt" "$@" | flitet "Welcome to Puppy. A computers best friend. An operating system that works!" | aplay &
sleep $sec
printf %b "$txt2" | xcowsay --time=$sec --font="$fnt" "$@" | flitet "Made with Puppy magic, and the best Ubuntu bits. Puppy heart, recognition and scripting!" | aplay &
sleep $sec
printf %b "$txt3" | xcowsay --time=12 --font="$fnt" "$@" | flitet "What is new for 5.1 of Puppy Lucid? Upgraded scripts and programs. New quick pet. More working packages. Latest Browsers: FireFox, KerRome, and Opera." | aplay &
sleep 14
cd /
xcowsay --cow=puppy --time=2 --dream=/usr/share/doc/community48.jpg "$@" &
aplay /usr/share/audio/2barks.au "$@" &
}
# *********************
# END FUNCTIONS
# *********************
# *********************
# MAIN
# *********************
init_vars
display_message
# *********************
# END MAIN
# *************
Code: Select all
#!/bin/bash
# ********************************************************
# PROGRAM: xcow-repair
# PURPOSE: drag-n-drop file on this script to repair
# it - i.e. make xpupsay standard xcowsay.
# AUTHOR: big_bass (Joe - Puppy Linux forum)
# MODDED: vovchik (to use xcowsay fir notification :)
# DEPENDS: bash, aplay, xcowsay, sed
# PLATFORM: Puppy Linux (actually, any *nix)
# DATE: 30-06-2010
# ********************************************************
# *********************
# FUNCTIONS
# *********************
# --------------------
function init_vars()
# --------------------
{
org_file="$@"
alt_txt="No file to process!\nDrag an xpupsay file\nonto this script\nto restore it as\nstandard xcowsay!"
txt="Fixing $org_file\nfor standard xcowsay!"
sec=4
fnt="DejaVu Sans Bold 15"
snd="/usr/share/audio/2barks.au"
}
# --------------------
function fix_file()
# --------------------
{
sed -i 's/xpupthink/xcowthink/g' "$@"
sed -i 's/xpupsay/xcowsay/g' "$@"
sed -i 's/--pup/--cow/g' "$@"
sed -i 's/xpupdream/xcowdream/g' "$@"
sed -i 's/xpupfortune/xcowfortune/g' "$@"
sed -i 's/xpupthink/xcowthink/g' "$@"
}
# --------------------
function display_message()
# --------------------
{
aplay "$snd" 2> /dev/null&
if [ -e "$org_file" ] ; then
printf %b "$txt" | xcowsay --time=$sec --font="$fnt" &
fix_file "$org_file"
else
printf %b "$alt_txt" | xcowsay --time=$sec --font="$fnt" &
exit 1
fi
}
# *********************
# END FUNCTIONS
# *********************
# *********************
# MAIN
# *********************
init_vars "$@"
display_message &
exit 0
# *********************
# END MAIN
# *********************