xcowsay talking lobster? new x message display with icon

Under development: PCMCIA, wireless, etc.
Message
Author
big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#61 Post by big_bass »

Hey vovchick

Depending what voice program is installed
having different choices to select from is always the best way
working out the filter for festival is very important because the sound quality is very good keep at it


heres a nice little pic for that robot sound
for personal use only of course :wink:

thanks

Joe
Attachments
Wall-E-200.png
(57.97 KiB) Downloaded 2518 times

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

Re: Learning experience

#62 Post by Lobster »

Minnesota wrote:Lobster:
Can you direct me to the Pets??
Thanks everyone.
Page 2 of this very thread
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

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

#63 Post by vovchik »

Dear Puppians (particularly Lobster and big_bass),

I did something for xcowsay over the past few days. Here is a little markup editor that allows for nice tag editing and preview, plus voice synthesis and the saving of results in ready-to-run executable scripts. Please have a look. Much more info on how this thing runs is available in the help file.

Have fun.

With kind regards,
vovchik

PS. Please bear in mind that this is kind of a "first draft", and suggestions are always welcome.
Attachments
xcowmoo-small.jpg
(29.05 KiB) Downloaded 2464 times
xcowmoo.pet
(35.6 KiB) Downloaded 1295 times

Jim1911
Posts: 2460
Joined: Mon 19 May 2008, 20:39
Location: Texas, USA

#64 Post by Jim1911 »

vovchik wrote:I did something for xcowsay over the past few days. Here is a little markup editor that allows for nice tag editing and preview, plus voice synthesis and the saving of results in ready-to-run executable scripts. Please have a look. Much more info on how this thing runs is available in the help file.
Thanks for the pet, however, not working on luci-208.

Code: Select all

# xcowmoo-run
./xcow-moo: line 420: gtkdialog: command not found
Jim

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

#65 Post by vovchik »

Dear Jim,

The problem is that gtkdialog in many Puppies has been renamed gtkdialog3 (to distinguish it from an earlier version of gtkdialog, which is called gtkdialog2 in some Puppies). The program will run fine if you simply make a symlink (using Rox, right click on /usr/sbin/gtkdialog3 and click on "Symlink", having deleted the "3" from the input box). You will then have a symlink to gtkdialog3 name gtkdialog (which is the standard name, BTW).

With kind regards,
vovchik

PS. I will do that automatically in the next version.

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#66 Post by seaside »

vovchik,

Yes, that is alot of fun - nice job. The only thing that didn't work was the span "font" selection. I'm using Pup 431 and since I don't have a $HOME./fonts directory, I created it and linked my "fonts.dir" file and it still didn't work - I'll try to look at the code later.

Jim1911 wrote:
Thanks for the pet, however, not working on luci-208.

Code: Select all

# xcowmoo-run
./xcow-moo: line 420: gtkdialog: command not found
[/quote]

Jim, try this in a terminal -

Code: Select all

ln /usr/sbin/gtkdialog3 /usr/sbin/gtkdialog
And then restart.

Cheers,
s

(Edit, didn't see Vovchik's post's answer) :D

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

#67 Post by vovchik »

Dear seaside,

I am glad you're having fun. I am, to be sure. You may have to update your fonts.dir (i.e. make it real or refresh it).

The commands are (from a term in the $HOME/.fonts dir):

Code: Select all

mkfontscale .
mkfontdir .
fc-cache -fv . (takes a minute)
xset fp+ /root/.fonts
Note the space and full stop in the stuff above. Then restart X. Some old M$ TTF fonts don't display well with Pango, so check out a few fonts. My old Academy fonts dumped from an M$ machine work fine in nearly all GTK apps, QT/KDE and OO but do not display in a few apps where Pango is involved. I will have to massage them in fontforge, I suppose.

With kind regards,
vovchik

Jim1911
Posts: 2460
Joined: Mon 19 May 2008, 20:39
Location: Texas, USA

#68 Post by Jim1911 »

vovchik wrote:The problem is that gtkdialog in many Puppies has been renamed gtkdialog3 (to distinguish it from an earlier version of gtkdialog, which is called gtkdialog2 in some Puppies). The program will run fine if you simply make a symlink (using Rox, right click on /usr/sbin/gtkdialog3 and click on "Symlink", having deleted the "3" from the input box). You will then have a symlink to gtkdialog3 name gtkdialog (which is the standard name, BTW).
Worked, thanks,
Jim

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#69 Post by seaside »

vovchik wrote:Dear seaside,

I am glad you're having fun. I am, to be sure. You may have to update your fonts.dir (i.e. make it real or refresh it).

The commands are (from a term in the $HOME/.fonts dir):

Code: Select all

mkfontscale .
mkfontdir .
fc-cache -fv . (takes a minute)
xset fp+ /root/.fonts
Note the space and full stop in the stuff above. Then restart X. Some old M$ TTF fonts don't display well with Pango, so check out a few fonts. My old Academy fonts dumped from an M$ machine work fine in nearly all GTK apps, QT/KDE and OO but do not display in a few apps where Pango is involved. I will have to massage them in fontforge, I suppose.

With kind regards,
vovchik
Vovchik,

Thanks for the pointer on refreshing the fonts. I looked at the code and made this change in line 43. (Removed "!" -not- in front of "-e" at the beginning of the line)

Code: Select all

 [  -e "$FILE_FONT" ] && egrep -v  "(Bold|Oblique|Italic)"  "$FILE_FONT_DIR" | cut -d "-" -f1 | uniq | grep -E "^[a-zA-Z]" | cut -d "." -f1 > $FILE_FONT && cut -d "-" -f1 /usr/share/fonts/X11/100dpi/fonts.alias | uniq | grep -E "^[a-zA-Z]" >> $FILE_FONT
All the fonts show up now in the span area.

Thanks again for bringing the singing and felicity of talking cows, cats and puppies into a nice integrated package.

Regards,
s

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

#70 Post by vovchik »

Dear seaside,

I have already implemented your mod and it will be in the next release. I also should probably put a button on the bottom to open rox in /usr/local/xcowmoo/dialog or make a combobox or filechoose button to show the dialog files so they can be launched as a kind of "proof of the pudding". Users may not know where to find the generated scripts. I am certain a good many ideas for improvement will come to us. Also, to create mini-animations, there should be a possibility to sequence the generated dialogs in a concatenated script or a launch file.

Thanks.

With kind regards,
vovchik

PS. It occurred to me that line 43 (without the "not") won't create a file if there is none, so I have to do a file check. Although that line is hideously long already, I thought it might benefit from a "| sort -f" at the very end, so that we get a font list that is sorted without case sensitivity. It is easier to find fonts that way, at least for me.

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#71 Post by seaside »

vovchik wrote:Dear seaside,

I have already implemented your mod and it will be in the next release. I also should probably put a button on the bottom to open rox in /usr/local/xcowmoo/dialog or make a combobox or filechoose button to show the dialog files so they can be launched as a kind of "proof of the pudding". Users may not know where to find the generated scripts. I am certain a good many ideas for improvement will come to us. Also, to create mini-animations, there should be a possibility to sequence the generated dialogs in a concatenated script or a launch file.

Thanks.

With kind regards,
vovchik
Vovchik,

I always wondered where the saying "proof of the pudding" came from. Was it from one of those early days of history when merchants tried to fake such things or some other origin. I think the proof would be good. :D

I noticed this line used in the gtkdialog tree script -"<action signal="cursor_changed">". I don't remember seeing that action signal before - is this another secret gtkdialog function? :D

Looking forward to any new versions,

Regards,
s

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

#72 Post by vovchik »

Dear seaside,

The "<action signal="cursor_changed">" bit is also used by Zibert. Here, for instance:http://www.murga-linux.com/puppy/viewto ... start=2280. It would be nice if gtkdialog were documented properly, wouldn't it?

With kind regards,
vovchik

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

#73 Post by big_bass »

vovchick
Dear Puppians (particularly Lobster and big_bass),

great stuff

any GUI that helps the end user code something faster and error free
with pre-built in commands that are tested
will advance the usability greatly

so more fun and less time coding :D

*a mini how to would be motivating to get more people started
and try some simple commands to get comfortable

* I pre installed xcowsay and flite in my new ISO called TXZ_pup 4.5
so any examples with flite would be nice to add and fun to test

Joe

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

Ganesha

#74 Post by Lobster »

Dear vovchik, fellow fun lovers, :D

Image

Editor is a great idea
Had to play about a bit to understand how to get that link . . .
8)

One of my duties as official crustacean to Puppy Linux
is to provide cyber elephants. :roll:
It is a hard job but someone has to be crazy enough to do it . . . :wink:

I have done that with the enclosed file which is designed
for Lucid 5.1 (it will not work in Lucid 5.0) as mplayer is used.
If you want to use another version of Puppy
you will need to change

Code: Select all

mplayer Ganesh_Mantra.mp3 "$@" &
to something like

Code: Select all

gxine Ganesh_Mantra.mp3 "$@" &
Download the file
unzip in a directory
and run the xpupsay-1 pet
then run 'xcowsay'


It is a vedic invocation
to the Hindu deity Ganesh - partially elephant
(featuring Shivas male cow)
Ganapatayei is one of Ganeshas many names

Below is the code
I mean it as a serious contribution to
a 40 day practice/puja I am doing
Much to my surprise Ganesha is venerated by some Christians,
as well as Hindus, Jains, Buddhists, the spiritually demented

I did try using flite for repeating mantras
but found it hard to get an acceptable effect
- if you have flite installed there is still a remnant
in the code . . .

The best I could do with flite, is this mantra to Murugan (brother of Ganesh)

Code: Select all

flitet "OM, SHA-RA-VA-NA-BHA-VA-YA, NAHMA-HAH."
So what I have done is use an actual mp3 file and repeated that
Not sure how it works out on slower computers . . .
and of course doing it this way, makes the size larger . . .
It also counts the number of mantras recited and displays that

Code: Select all

#! /bin/bash
# Sacred Vedic Chants
# Lobster, Vovchic, Joe Big Bass, Seaside, Potong
 - Aug 6 010

# --------------------
function init_vars()
# --------------------
{
txt1="Ganesh\n
Will chant mantras for you\n
OM SHANTI OM" 
   
txt2="Om Gam Ganapatayei Namaha"   

   sec=10
   fnt="DejaVu Sans Bold 15"
   repetitions=27  # Change the number of recitations
} 

# # # # # # # # # # # # # # #
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 "$@" &
     printf %b "$txt2 \n\n" " $g" | xpupsay --image=ganesh.gif --time=6 --font="$fnt" "$@" 
  done
 sleep 2 

 xpupsay --image=ganesha1.gif --time=9 "Om Gam Ganapatayei Namaha" "$@" &
 aplay tinsha.wav "$@" &
}

# # # # # # # #
# END FUNCTIONS
# # # # # # # #

# # # # # # # #
# MAIN
# # # # # # # #

init_vars
display_message

# # # # # # # #
# END MAIN
# # # # # # # #
For those of you not used to Hindu iconography
it can be a little disconcerting

So . . .
The mantra is a greeting to Ganesh
and is designed to overcome obstacles
You can chant along or just listen
Any merit is dedicated to Puppy Linux Lucid 5.1
and in particular Larry and Mick
who have worked on two Puppy editions now

I have set the mantra to repeat 27 times
which is enough to gain a little piece of peace
but not turn you completely Ganapatayei

Om Gam Ganapatayei Namaha

Holy Cow
it's Puppy Linux
:D
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#75 Post by seaside »

Lobster,

So this is what the repetitions were for.......

An elephantine, way off-broadway, Tibetan chanting production of "Hello Dalai". :D

Would I be repeating myself by saying "Isn't this what Puppy is all about?" - "**** four stars, enchanting, spellbinding -don't miss"

Ciao,
s

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

#76 Post by Lobster »

Thanks Seaside

I have released an updated version here
http://www.murga-linux.com/puppy/viewto ... 208#445208
which includes some background sparkle

This is the new code
would like to get that full screen toggle to work . . .

Code: Select all

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

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

#77 Post by big_bass »

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

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

#78 Post by Lobster »

Image

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

mave
Posts: 129
Joined: Thu 02 Apr 2009, 13:42
Location: Germany

#79 Post by mave »

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
Attachments
xcowsay-umlaute.jpg
(87.6 KiB) Downloaded 1007 times

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

Umlauts

#80 Post by vovchik »

Works for me - for some reason....
Attachments
xcowsay-german.jpg
(38.68 KiB) Downloaded 2407 times

Post Reply