Author |
Message |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15238 Location: Paradox Realm
|
Posted: Wed 25 Aug 2010, 06:21 Post subject:
|
|
Thanks Seaside
I have released an updated version here
http://www.murga-linux.com/puppy/viewtopic.php?p=445208#445208
which includes some background sparkle
This is the new code
would like to get that full screen toggle to work . . .
Code: | #! /bin/bash
# CyberChant 0.5
# Lobster, Vovchic, Joe Big Bass, Seaside, Potong, Seaside - Aug 25 010
# for Lucid 5.1
# http://www.timesonline.co.uk/tol/news/uk/article631958.ece
# Anglican priest Hindu
# --------------------
function init_vars()
# --------------------
{
cd /mnt/home/aaa_ganesha/cyberchant
NUM=3 # Change the number of default recitations
sec=10
fnt="DejaVu Sans Bold 15"
txt1="Ganesh\n
Will chant mantras for you\n
OM SHANTI OM"
txt2="Om Gam Ganapatayei Namaha"
}
# # # # # # # # # # # # # # #
function input_message()
# # # # # # # # # # # # # # #
{
# click on x top right does not cancel but runs - add option to turn off full screen
export DIALOG='
<window title="Mantras" icon-name="gtk-dialog-question">
<vbox>
<hbox>
<text>
<label>Mantra Recitals:</label>
</text>
<entry activates-default="true">
<default>3</default>
<variable>NUM</variable>
</entry>
</hbox>
<checkbox use-stock="true" label="gtk-fullscreen" image-position="1"
tooltip-text="checkbox derives from button ...">
</checkbox>
<hbox>
<button cancel></button>
<button can-default="true" has-default="true" use-stock="true" >
<label>gtk-ok</label>
</button>
</hbox>
</vbox>
</window>
'
CHOICES=`gtkdialog3 --program=DIALOG`
eval $CHOICES
repetitions=$NUM
}
# # # # # # # # # # # # # # #
function display_message()
# # # # # # # # # # # # # # #
{
aplay tinsha.wav "$@" &
xpupsay --image=ganesha1.gif --time=4 "Om Gam Ganapatayei Namaha" "$@"
printf %b "$txt1" | xpupsay --image=nandi.png --time=$sec --font="$fnt" "$@" | aplay &
sleep 10
for g in $(eval echo {$repetitions..1})
do
mplayer Ganesh_Mantra.mp3 "$@" &
mplayer -fs -nosound ed2.mp4 &
printf %b "$txt2 \n\n" " $g" | xpupsay --image=ganesh.gif --time=7 --font="$fnt" "$@"
# gxine Ganesh_Mantra.mp3 "$@" &
done
sleep 2
xpupsay --image=ganesha1.gif --time=9 "Om Gam Ganapatayei Namaha" "$@" &
aplay tinsha.wav "$@" &
}
# # # # # # # #
# END FUNCTIONS
# # # # # # # #
# # # # # # # #
# MAIN
# # # # # # # #
init_vars
#if [ "gtk-fullscreen" = "1" ]
#then
#echo true
#fi
#else echo false
input_message
display_message
# # # # # # # #
# END MAIN
# # # # # # # # |
_________________ YinYana AI Buddhism
|
Back to top
|
|
 |
big_bass
Joined: 13 Aug 2007 Posts: 1742
|
Posted: Wed 25 Aug 2010, 09:58 Post subject:
|
|
Hey Lobster
its good to see that you are having fun coding
I want to get back to using xcowsay
there is still a lot that can be done with it
we just scratched the surface of all the cool things that will be done with it
I am still thinking about an easy code generator GUI for
it I believe it will happen when we have more users
post there examples to express their imaginations
that will better define what should be added to the options in the GUI list
Joe
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15238 Location: Paradox Realm
|
Posted: Mon 30 Aug 2010, 08:03 Post subject:
|
|
Thanks Joe,
Have done a Buddhist version for Tara
Mother of the imaginary Tantric Buddhas
http://tmxxine.com/tara/tara.zip
run the enclosed pupsay if not on your system
- I would not try more than 3 loops
as I have not done the timings
as I quite like the over looping . . .
You can see it running here
http://www.youtube.com/watch?v=p3v_cr5o3JE
OM TARE TU TARE TURE SOHA
_________________ YinYana AI Buddhism
|
Back to top
|
|
 |
mave
Joined: 02 Apr 2009 Posts: 130 Location: Germany
|
Posted: Mon 06 Sep 2010, 08:04 Post subject:
Subject description: utf... german umlaute |
|
Hi,
saw chinese and russian examples. So compiled xcowsay under 5.1 and didn't get german umlaute. uuups. Should be showing UTF correctly, or not?
Markus
Description |
|

Download |
Filename |
xcowsay-umlaute.jpg |
Filesize |
87.6 KB |
Downloaded |
780 Time(s) |
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Mon 06 Sep 2010, 08:34 Post subject:
Umlauts |
|
Works for me - for some reason....
Description |
|
Filesize |
38.68 KB |
Viewed |
2184 Time(s) |

|
|
Back to top
|
|
 |
mave
Joined: 02 Apr 2009 Posts: 130 Location: Germany
|
Posted: Tue 07 Sep 2010, 07:03 Post subject:
|
|
Danke vovchik
Uuups,I used the original xcowsay, now taken the modified xpupsay and it works - wow!
Thanks to the guys!
Markus
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15238 Location: Paradox Realm
|
Posted: Sun 18 Dec 2011, 09:20 Post subject:
|
|
In my efforts to educate myself and perhaps the children who will be learning programming on Puppy running on raspberry pi (when available) I have created a complete first lesson in Bash script using xpupsay . . .
The downloadable zip file includes all you need including xpupsay
which works OK in Puppy 5.3.1 - the only system I tried it on
To run the tutorial you need to install xpupsay
just click on xpupsay.pet
You will need to change the permissions of script files
with the .sh - to allow them to run
in puppy - right click on the file in rox
(click on the home icon - you are in rox)
and change permissions
The first program is a hello world example
Code: | #! /bin/bash
# 16 Dec 2011 Lobster
# Example 1 hello world example
xpupsay "hello world"
xpupsay "puppy power" |
Code: | #! /bin/bash
# 16 Dec 2011 Lobster
# Example 3 play audio loop
xpupsay "Let's boogy"
for i in {1..5}
do
aplay /usr/share/audio/beep_high.wav
aplay /usr/share/audio/beep_high.wav
sleep .2
aplay /usr/share/audio/beep_low.wav
sleep 1
aplay /usr/share/audio/beep_high.wav
aplay /usr/share/audio/audio/error.wav
done |
moving right up to example 3 which covers the first use of loops
Is that the simplest for loop?
Description |
|

Download |
Filename |
pupschool1.zip |
Filesize |
109.77 KB |
Downloaded |
633 Time(s) |
_________________ YinYana AI Buddhism
Last edited by Lobster on Tue 20 Dec 2011, 02:32; edited 2 times in total
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Sun 18 Dec 2011, 11:11 Post subject:
|
|
Dear Lobster,
Very nice start. I could see a complete tutorial, and having teachers flock to puppy as a preferred vehicle for teaching basic programming concepts. Too much work for me, but it could be a collective effort. If my memory serves me right, quite a bit of work was done already on an edupuppy at some point but i don't know what's in it. I'll have to have a look.
With kind regards,
vovchik
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15238 Location: Paradox Realm
|
Posted: Fri 06 Jul 2012, 12:00 Post subject:
|
|
Well now . . .
Talking cows, need raspberries (a well known fact)
Using genuine raspberry pi, some scripting help,
- real alpha 2 software from Barry K and Lobsterian almost programming
I have been working on this script
Code: | #! /bin/bash
xcowsay --image /root/a_rap/lobster.png --time=1 Hello Raspberrians, Lobster here with Puppi
xcowsay --image /root/a_rap/puppi.png --time=1 Hello Lobster. Hello world. Hello Puppys.
xcowsay --image /root/a_rap/lobster.png --time=1 Puppy are you really running on Raspberries?
xcowsay --image /root/a_rap/puppi.png --time=1 I am being tested on Raspberry Pi
xcowsay --image /root/a_rap/lobster.png --time=1 Puppi, you changed your name slightly?
xcowsay --image /root/a_rap/puppi.png --time=1 Just a slice of Pi . . .
xcowsay --image /root/a_rap/lobster.png --time=1 Ha Ha . . . What is the Raspberry Pi?
xcowsay --image /root/a_rap/puppi.png --time=1 The smallest, dinkiest, cheapest motherboard . . .
xcowsay --image /root/a_rap/lobster.png --time=1 What can you do on it Puppi?
xcowsay --image /root/a_rap/puppi.png --time=1 I will demonstrate . . .
abiword text.abw &
sleep 3
killall abiword
inkscapelite draw1 &
sleep 3
killall inkscapelite
gnumeric Book1.gnumeric &
sleep 3
killall gnumeric
xcowsay --image /root/a_rap/puppi.png --time=1 Browse, calculate, FTP etc
/usr/local/bin/defaultbrowser http://puppylinux.org/wikka/PuppiPlan &
sleep 3
killall defaultbrowser
xcowsay --image /root/a_rap/lobster.png --time=1 Very cool. Where can I get all that?
xcowsay --image /root/a_rap/puppi.png --time=1 Google 'raspberry puppi'
xcowsay --image /root/a_rap/lobster.png --time=1 Pawsome. Woof. Woof. |
I produced this video (still some bugs in my attempts at code)
http://youtu.be/c7MvS_3BHYY
and I have included all the files I have used including a recording script from Mick
You will need to install xcowsay on Puppy Sap alpha 2, which you can do with the package manager and download from Debian main
Some of the programs are not displaying properly . . .
will have to do some more coding or ask for further suggestions
Puppy is Pawsome
_________________ YinYana AI Buddhism
|
Back to top
|
|
 |
antiloquax

Joined: 27 Jan 2012 Posts: 405
|
Posted: Sun 22 Jul 2012, 07:58 Post subject:
|
|
Hi Lobster,
I hadn't noticed this before. I must have a go!
mark
_________________ My System:Arch-Arm on RPi!
"RacyPy" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
RaspberryPy: Lobster and I blog about the RPi.
|
Back to top
|
|
 |
|