GTK and xcow haiku generators
GTK and xcow haiku generators
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
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
- Attachments
-
- haiku-gtk.jpg
- (20.67 KiB) Downloaded 1977 times
-
- haiku-xcow.jpg
- (24.83 KiB) Downloaded 2032 times
-
- haiku-basho.pet
- (95.53 KiB) Downloaded 862 times
vovchik
i like it! thankyou
666philb
i like it! thankyou
666philb
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
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
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
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
666philb
666philb
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331
gtk haiku
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.
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.
- Attachments
-
- haiku-hug-bin.tar.gz
- (29.93 KiB) Downloaded 713 times
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
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
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331
Thank you, Vovchik, I really like it
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:
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!
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
#
Is there any way to make it stay longer on the desktop?
Thank you and Best regards!
I found a solution for the short timing, Vovchik.
I just had to edit this line in /usr/local/haiku-basho
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!
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"
Best regards!
attached is a 64bit version .
xcowsay should be available in the PPM &
fonts-arphic-ukai needed for chinese fonts also in the PPM
xcowsay should be available in the PPM &
fonts-arphic-ukai needed for chinese fonts also in the PPM
- Attachments
-
- haiku-basho-x86_64.pet
- (161.46 KiB) Downloaded 258 times
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331