Page 1 of 1

GTK and xcow haiku generators

Posted: Tue 15 Feb 2011, 20:37
by vovchik
Dear Puppians,

Here are two little apps I wrote over the past few days. Both generate haiku poetry. One is written in BaCon and uses GTK and the other is in bash and uses xcow to display the result. If xcowsay is not available on your machine, grab it from the forum (it is here somewhere and on the author's site: www.doof.me.uk/xcowsay) or settle for either gxmessage or console output. The programs install in /usr/local/haku-basho. Matsuo Basho, a 17th century Japanese poet, is credited with the invention of haiku. The algorithm for generating the haiku poems was developed by Kent Peterson in Forth. Peter van Eerten (www.basic-converter-org) did a console-based BaCon port. I did the GTK version, along with a bash version (which is instructive because of the array handling and random number generation). The Bacon/bash sources are included. Here are a two screenshots (xcow and gtk), along with a pet that installs both versions. The programs will appear in the fun menu.

Have fun....

With kind regards,
vovchik

Posted: Tue 15 Feb 2011, 21:31
by 666philb
vovchik

i like it! thankyou

666philb

Posted: Thu 24 Feb 2011, 06:18
by GustavoYz
late voice
forest stands near frost
tiny cool app

8)

Posted: Thu 24 Feb 2011, 09:18
by Lobster
xcowsay
http://www.murga-linux.com/puppy/viewto ... 637#429610

Can we give the poem a voice?

flite
http://www.murga-linux.com/puppy/viewto ... 897#365897


Puppy Linux
Poetry for penguins

Posted: Thu 17 Mar 2011, 18:12
by 666philb
hi vovchik , i have a problem with the gtk version. The icon is partially obscuring the text, i've tried shrinking the icon to no effect. Here's a pic
Image

666philb

gtk haiku

Posted: Thu 17 Mar 2011, 20:57
by vovchik
Dear 666philb,

I had the same problem when I ported the prog to Mac OSX and had to add a different DPI setting. Now, Peter has fixed hug.bac (which I use) and it should scale automatically. here is a binary compiled with the latest hug. If this works for you, please let me know. If it doesn't, and you have a compiling environment, you could try changing the DPI value that hug uses (you could try changing HUGOPTIONS("BASEXFTDPI 78") to, say, "96" and see what happens. Also there is a hug scaling option (HUGOPTIONS("SCALING")) that may help.

With kind regards,
vovchik

PS. I see that you are not getting the Japanese characters as well. I use a rather extended DejaVu Sans with full Unicode support. It is here somewhere on the forum.

Posted: Fri 18 Mar 2011, 21:25
by 666philb
hi vovchik

no, it didn't work, i still have the same problem. But i have xcowsay now and prefer it to the gtk, i have it in my start up folder, for a haiku every boot..

I would like to have the japanese characters, and will look for the suggested fonts

thanks

666philb

Posted: Tue 10 Jan 2012, 14:06
by saintless
Thank you, Vovchik, I really like it :D
I have KDPup-484 ant the pet package works fine.

Edit: I have haiku-basho.pet and xcowsay-1.2.pet installed.
After this command:

Code: Select all

# haiku-xcow
xcowsay will be used to display haiku
#
the Cat shows with new haiku text for about 3 seconds. The situation is the same when I use haiku-bash icon from the menu to start the program.
Is there any way to make it stay longer on the desktop?
Thank you and Best regards!

Posted: Tue 10 Jan 2012, 18:07
by saintless
I found a solution for the short timing, Vovchik.

I just had to edit this line in /usr/local/haiku-basho

Code: Select all

xcowsay --bubble-at=-70,-110 --think --image="$image" -t 20 "$msg"
I made -t 0 to -t 20 and now the haiku cat stays on the screen long enough for me to enjoy the text :)

Best regards!

Posted: Sun 27 Jan 2019, 11:14
by 666philb
attached is a 64bit version .
xcowsay should be available in the PPM &
fonts-arphic-ukai needed for chinese fonts also in the PPM