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

#41 Post by big_bass »

Hey vovchik
I modified your very nice but laconic xcow-repair script

yes ! thank you

I am very blunt most of the time but I never say more than I mean or less
any attempt of trying to be eloquent for me is with much forced effort
I do agree with you 100% in my very short and to to the point way of writing
if it be code or a simple post I already feel I used too many words :lol:

thanks for the structured well written re write of the code snippet

P.S the pop up messages are too cool 8)

Joe

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

#42 Post by vovchik »

Dear Puppians,

Now, this is COOL!!!! You can use text attributes just as gtkdialog does with markup. The syntax is described here: http://library.gnome.org/devel/pango/st ... ormat.html. It is a great little discovery. I also discovered, thanks to Lobster, that if you change the dir to /, you can use your own base image and your own dream image. This is my silly example of pretty text:

Code: Select all

printf %s '<span foreground="blue" size="x-large">Blue text</span> is <i>cool</i>!' | xcowsay 
To select your own image and dream image, simply precede your xcowsay invocation with "cd /" and then use something like this:

Code: Select all

xcowsay --image="/usr/share/xcowsay/felix3.png" --time=10 --dream="/usr/share/xcowsay/felix.png"
With kind regards,
vovchik
Attachments
xcow-dream.jpg
(14.04 KiB) Downloaded 1524 times
xcow-txt-attr.jpg
(9.54 KiB) Downloaded 1489 times

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

#43 Post by Lobster »

Good work Vovchik
Joe I followed up your suggestion to contact the developer
. . . coming soon new feature . . .
Lobster to Nick Gasson:
I am the lobster from another dimension that found and suggested your program for Puppy (it has now morphed into xpupsay) I would recommend left and right sides for the image - so a Q and A type situation can be developed. Many thanks :)
Nick Gasson to Lobster:
Thanks for your suggestion. It would be fairly simple to add so I'll try to include it in the next release.
Any other features we need that may be simple to implement . . .
contact the developer here in the comments
http://www.doof.me.uk/xcowsay/
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

#44 Post by vovchik »

Dear Puppians,

I have a demo here of xcowsay speaking nicely, and showing markup. You need either festival or espeak to hear sounds. flitet sounds much worse on my machine than festival. Lobster might be interested in the routine that strips off the markup language, which I have added, so that the same text variable can be used for both sound and display. The png files and script are in the archive, as is a readme.

With kind regards,
vovchik

PS. Lobster and Joe: I have left a nice note for Nick on his site. You might want to mention to him that antialiasing of the "comment" graphics would be a nice touch, as would be 32 bbp and the full alpha channel for image display. There is quite a bit of calculation for "clouds" and rounded boxes in the source, so this might not be so easy as the suggestion regarding positioning.
Attachments
xcow-red-text.jpg
(16.96 KiB) Downloaded 1534 times
felix-demo.tar.gz
(37.05 KiB) Downloaded 873 times

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

#45 Post by big_bass »

Hey vovchik

I see in my minds eye a few good things comming

1.) By the not using the standard code of xcowsy using "xpupsay"
which I admit to be very annoying but it turned out to give me a good Idea about
code conversions being able to translate code from one language to another
so in a way in the end I am thankful technosaurus changed the code or I wouldnt of had a need to change it back and then code conversion I would had missed out on
so all is well that ends well

2. the pango mark format I can see that I wrote a lot of code to make html indexes generated from bash drag n drop indexers I needed while building a website

I was working on this today editing one of my scripts to generate html code
it would be possible to make a GUI to to enter the values such as

Code: Select all

<span foreground="blue" size="x-large">Blue text</span>


and ask forr background color , size ,text etc...

then have it generate the code using bash
pretty easily since only the GUI needs to be made I have the code to convert it
already only sight modifications were needed

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

#46 Post by vovchik »

Dear Joe,

I was also thinking along the same lines - and thinking of this: http://murga-linux.com/puppy/viewtopic.php?t=40418, which I posted a donkey's age ago. It could be reworked and show the xcowsay bit, perhaps also with speech, so that the entire "animation" could be properly timed. The gui would require adding a seconds entry widget and a checkbox for sound or not.

With kind regards,
vovchik

PS. I have included a slightly modified version of markup here (cleaned up and structured). It is easier to make changes to this version. Try copying this into the edit window:

Code: Select all

<span color="red"><tt><i>I'M</i> <u>ON</u> A <s>ROLL</s></tt> !</span><span color="green"> OK</span><sup>2</sup>?
<b>I'M ON A ROLL</b>
<b><big>I'M ON A ROLL</big></b>
<b><big><big>I'M ON A ROLL</big></big></b>
<b><big><big><big>I'M ON A ROLL</big></big></big></b>
<b><big><big><big><big>I'M ON A ROLL</big></big></big></big></b>
<b><big><big><big><big><big>I'M ON A ROLL</big></big></big></big></big></b>
You will get the text shown in the image.
Attachments
xcow-tag-edit.jpg
(28.3 KiB) Downloaded 1392 times
mark-up.tar.gz
(1.5 KiB) Downloaded 670 times

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

#47 Post by big_bass »

Hey vovchick

I was thinking about a GUI to aid in producing the code
one step before the viewer comes in

then it could be viewed like this also

save it a vovchick.html then click on it :D

Code: Select all


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html><head></head><body>
<span color="red"><tt><i>I'M</i> <u>ON</u> A <s>ROLL</s></tt> !</span><span color="green"> OK</span><sup>2</sup>?
<b>I'M ON A ROLL</b>
<b><big>I'M ON A ROLL</big></b>
<b><big><big>I'M ON A ROLL</big></big></b>
<b><big><big><big>I'M ON A ROLL</big></big></big></b>
<b><big><big><big><big>I'M ON A ROLL</big></big></big></big></b>
<b><big><big><big><big><big>I'M ON A ROLL</big></big></big></big></big></b>

</body>
</html>

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

#48 Post by vovchik »

Dear Joe,

That works but great, but I think this little editor has potential here, too. Have a look at the attached. It's not quite ready because I am still trying to strip out trailing newlines in the edit window and in the string that gets passed to xcowsay. And the results still need to be "put together" nicely in an independent script as part of the xcowsay-generator package. But you get the idea. As you know sed better than I do, perhaps you can fix the trailing newline problem. Basically we don't want any trailing new lines except the last one. I think your idea of having the tags available as comboboxes and lists is what we want in the end.

With kind regards,
vovchik
Attachments
xcowmarkup.tar.gz
(1.81 KiB) Downloaded 667 times

Minnesota
Posts: 326
Joined: Thu 11 Sep 2008, 11:25

Sound

#49 Post by Minnesota »

Been following the fun for the past few days. .was going to ask if it would talk.. then the reference to "festival".... is there a pet for the festival that will run on Luci or any version for that matter? Looked at the reference thread... but did not see a download link. Or did I miss it?

Keep up the FUN!

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

#50 Post by vovchik »

Dear Minnesota,

Lobster did this festival pet back in 2008, and I think it is the one I have installed: http://tmxxine.com/festival/festival.pet.

The link is alive and the pet should work.

With kind regards,
vovchik

Minnesota
Posts: 326
Joined: Thu 11 Sep 2008, 11:25

must be my ignorance

#51 Post by Minnesota »

vovchik:

Pet downloaded fine, running under Lucid 501 I think... what flavor of puppy are your running Felix with? Not all that familiar with Linux code... so please excuse ignorance. Tried clicking on Felix icon. had in wrong director, made xcowsay directory, tried from open terminal, as well as clicked on Felix. Ran festival pet, previously. Nothing.

Thanks.

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

#52 Post by big_bass »

festival-1.96 sound support
http://repository.slacky.eu/slackware-1 ... 86-3as.tgz

I installed this one its a more complete package
on slaxer its working well

Joe

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

#53 Post by vovchik »

Dear Minnesota,

I would use big_bass's festival. It works fine on various Puppies, as does Felix. What you need to do first is to install the xcowsay pet. After that, unpack my Felix archive. It contains a script, a few pngs and a readme.txt. The readme gives full instructions for Felix. And you should download festival and convert it to a pet using tgz2pet. First rename it from "xxxx.tgz" to "xxxx.tar.gz". Then run tgz2pet xxxx.tar.gz. This will create an xxxx.pet. Click on the pet to install it. Installing festival this way works. Just did it on 4.xx. and Felix started talking:)

Hope that wasn't too complicated.

With kind regards,
vovchik

Minnesota
Posts: 326
Joined: Thu 11 Sep 2008, 11:25

Thanks

#54 Post by Minnesota »

vovchik, Joe:
Thanks for the help... it is me.. I am still doing something wrong.... I did get Felix to display...thought I had xcowsay pet loaded on that stick, but must not have. Next started on new clean boot on 4.31, and older machine, can play CD music, and woof-woof, so not a sound problem. Tried several times to build pet. Indicates it runs, still no sound with Felix. Don't need to spend a lot more time helping to solve... I will wait till it is all working...and you guys put out something. Thanks again. Slow learner at this age I guess...only been programming for forty years. :)

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

#55 Post by big_bass »

Hey Minnesota


try this just paste the code in green in the console and press enter

later you could make it a script called festival-sound-check
and make it executable

*I try to keep things simple so that these little
code snippets can be reused easily with copy and paste


Code: Select all

#! /bin/bash

# Joe Arose 7-01-2010
# call this festival-sound-check

# quick sound check for festival 
# also another simple way to do messages 
# EOF is better because it allows any character
# to be used without escaping special characters 


cat << EOF >/tmp/festival_sound_test.txt
You are testing the sound quality of festival 
this message will self destruct in five minutes 
EOF

 festival --tts /tmp/festival_sound_test.txt

Code: Select all

#! /bin/bash

# Joe Arose 7-01-2010
# call this espeak-sound-check

# quick sound check for espeak 
# also another simple way to do messages 
# EOF is better because it allows any character
# to be used without escaping special characters 


cat << EOF >/tmp/espeak-sound-check.txt 
You are testing the sound quality of espeak 
this message will self destruct in five minutes 
EOF



 espeak  -s 120 -f /tmp/espeak-sound-check.txt | aplay



I used to build hundreds of pets but puppy kept changing with each version
so I dont make pets any more
learning how to convert packages will be your best programming skill
or if you used slaxer_pup I have it set up so that you just click on any slackware package be it *.tgz *.txz *.tlz *.tbz and it just auto installs without
any conversions it keeps a data base does dependency checking and allows you to uninstall them with a GUI . imagine how many packages you could install easily :D


if you wanted to try the light espeak for size and quality espeak is the winnner

installing these packages is all you need
========================================================
espeak
http://repository.slacky.eu/slackware-1 ... 86-1as.tgz



portaudio
http://repository.slacky.eu/slackware-1 ... 86-3as.tgz

jack
http://slackware.oc9.org/slackware-12.2 ... 6-1rsk.tgz
========================================================
Last edited by big_bass on Fri 02 Jul 2010, 01:56, edited 2 times in total.

Minnesota
Posts: 326
Joined: Thu 11 Sep 2008, 11:25

Thanks for help

#56 Post by Minnesota »

Joe:

Thanks for helping to hold my hand... sorry I am a real novice at all this...
Here is what I did... I downloaded the festival 1.96 file on a W machine, copied it to a stick.

In the \root directory of Luci 206 I am following vovchik procedure to rename and create the pet. Right click the copied file, and rename. Open a terminal window from rt click. A pet is created yet I get the following error. Similar error when I try 4.3.1, so assume I am in the wrong directory.

Did I miss a step to create a specific directory first?
Here is what I am getting.. see attached.

Thanks... slow learner. But willing. Now if you ask me about access or payrolls or school software or databases ... lots of other languages..... :))). OH well, world does keep changing. Again thanks for the help.
Attachments
Error dir.png
(3.56 KiB) Downloaded 1413 times

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

#57 Post by Lobster »

you need to be in the same directory
move to it with rox
right click and select new/terminal here

. . . or you could download the ready made xpupsay and flite pets and not have to create your own

flite is also in Fluppy
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

Minnesota
Posts: 326
Joined: Thu 11 Sep 2008, 11:25

Learning experience

#58 Post by Minnesota »

Lobster:
. . . or you could download the ready made xpupsay and flite pets and not have to create your own
flite is also in Fluppy
This is becoming quite a VALUABLE learning experience for me. Sorry I do not understand all the basics. Can you direct me to the Pets?? Or am I not seeing the forest for the trees, or a specific tree in the forest.

Thanks everyone.

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

#59 Post by big_bass »

Hey vovchick

this will be a big help filtering out the mark up code (html)

there is an -m option built in to strip out the markup code 8)

download this example code in html place it in /root

Code: Select all

wget http://www.puppy2.org/slaxer/determination.html

then run this code

Code: Select all

cat /root/determination.html  | espeak -m -s -p35 -s110 
==============================
the -m strips of the code from the file
the -s p35 is the frequency (the tone of the voice)
the -s110 is the speed in which the the speaker talks
==============================

if you just want to read this excellent story and enjoy something
http://www.puppy2.org/slaxer/determination.html

Joe

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

#60 Post by vovchik »

Dear Joe,

I like the Brooklyn Bridge story. As for espeak, I will give that a try. Festival, which doesn't seem to have that feature, still requires cleanup, but my routine seems to do it. I can then check for either player - and perhaps flitet - in a case/easc constrution and do the appropriate thing.

With thanks and kind regards,
vovchik

Post Reply