Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 20 Dec 2014, 22:49
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
xcowsay talking lobster? new x message display with icon
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 6 of 6 [85 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6
Author Message
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15122
Location: Paradox Realm

PostPosted: 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
# # # # # # # #

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: 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

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15122
Location: Paradox Realm

PostPosted: 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

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
mave

Joined: 02 Apr 2009
Posts: 130
Location: Germany

PostPosted: 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
xcowsay-umlaute.jpg
Description 
jpg

 Download 
Filename  xcowsay-umlaute.jpg 
Filesize  87.6 KB 
Downloaded  548 Time(s) 
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1287
Location: Ukraine

PostPosted: Mon 06 Sep 2010, 08:34    Post subject: Umlauts  

Works for me - for some reason....
xcowsay-german.jpg
 Description   
 Filesize   38.68 KB
 Viewed   1829 Time(s)

xcowsay-german.jpg

Back to top
View user's profile Send private message 
mave

Joined: 02 Apr 2009
Posts: 130
Location: Germany

PostPosted: Tue 07 Sep 2010, 07:03    Post subject:    

Danke vovchik Wink

Uuups,I used the original xcowsay, now taken the modified xpupsay and it works - wow!

Thanks to the guys!

Markus
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15122
Location: Paradox Realm

PostPosted: 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 Cool

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?
pupschool1.zip
Description 
zip

 Download 
Filename  pupschool1.zip 
Filesize  109.77 KB 
Downloaded  435 Time(s) 

_________________
Puppy WIKI

Last edited by Lobster on Tue 20 Dec 2011, 02:32; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website 
vovchik


Joined: 23 Oct 2006
Posts: 1287
Location: Ukraine

PostPosted: 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
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15122
Location: Paradox Realm

PostPosted: Fri 06 Jul 2012, 12:00    Post subject:  

Well now . . .

Talking cows, need raspberries (a well known fact) Smile

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 Smile


Puppy is Pawsome
newrap7.zip
Description 
zip

 Download 
Filename  newrap7.zip 
Filesize  195.4 KB 
Downloaded  348 Time(s) 

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
antiloquax


Joined: 27 Jan 2012
Posts: 405

PostPosted: 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
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 6 of 6 [85 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0834s ][ Queries: 13 (0.0061s) ][ GZIP on ]