| Author |
Message |
vovchik

Joined: 23 Oct 2006 Posts: 1231 Location: Ukraine
|
Posted: Tue 15 Feb 2011, 16:37 Post subject:
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
 |
| Description |
|
| Filesize |
20.67 KB |
| Viewed |
1299 Time(s) |

|
| Description |
|
| Filesize |
24.83 KB |
| Viewed |
1310 Time(s) |

|
| Description |
|

Download |
| Filename |
haiku-basho.pet |
| Filesize |
95.53 KB |
| Downloaded |
350 Time(s) |
|
|
Back to top
|
|
 |
666philb

Joined: 07 Feb 2010 Posts: 1229 Location: wales
|
Posted: Tue 15 Feb 2011, 17:31 Post subject:
|
|
vovchik
i like it! thankyou
666philb
_________________ Quickpet_Precise, install popular apps quickly http://www.murga-linux.com/puppy/viewtopic.php?t=83642
LÖVE2d, a collection of 27 lua gameshttp://www.murga-linux.com/puppy/viewtopic.php?t=76739
|
|
Back to top
|
|
 |
GustavoYz

Joined: 07 Jul 2010 Posts: 867 Location: .ar
|
Posted: Thu 24 Feb 2011, 02:18 Post subject:
|
|
late voice
forest stands near frost
tiny cool app
_________________

|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Thu 24 Feb 2011, 05:18 Post subject:
|
|
xcowsay
http://www.murga-linux.com/puppy/viewtopic.php?p=429610&search_id=239411637#429610
Can we give the poem a voice?
flite
http://www.murga-linux.com/puppy/viewtopic.php?p=365897#365897
Puppy Linux
Poetry for penguins
_________________ Puppy WIKI
|
|
Back to top
|
|
 |
666philb

Joined: 07 Feb 2010 Posts: 1229 Location: wales
|
Posted: Thu 17 Mar 2011, 14:12 Post subject:
|
|
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
_________________ Quickpet_Precise, install popular apps quickly http://www.murga-linux.com/puppy/viewtopic.php?t=83642
LÖVE2d, a collection of 27 lua gameshttp://www.murga-linux.com/puppy/viewtopic.php?t=76739
|
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1231 Location: Ukraine
|
Posted: Thu 17 Mar 2011, 16:57 Post subject:
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.
| Description |
|

Download |
| Filename |
haiku-hug-bin.tar.gz |
| Filesize |
29.93 KB |
| Downloaded |
246 Time(s) |
|
|
Back to top
|
|
 |
666philb

Joined: 07 Feb 2010 Posts: 1229 Location: wales
|
Posted: Fri 18 Mar 2011, 17:25 Post subject:
|
|
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
_________________ Quickpet_Precise, install popular apps quickly http://www.murga-linux.com/puppy/viewtopic.php?t=83642
LÖVE2d, a collection of 27 lua gameshttp://www.murga-linux.com/puppy/viewtopic.php?t=76739
|
|
Back to top
|
|
 |
saintless

Joined: 11 Jun 2011 Posts: 481 Location: Bulgaria
|
Posted: Tue 10 Jan 2012, 10:06 Post subject:
|
|
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:
| Code: | # 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!
_________________ KDpup-484 FoxyRoxyLinux Pussylinux BackUp forum
|
|
Back to top
|
|
 |
saintless

Joined: 11 Jun 2011 Posts: 481 Location: Bulgaria
|
Posted: Tue 10 Jan 2012, 14:07 Post subject:
|
|
I found a solution for the short timing, Vovchik.
I just had to edit this line in /usr/local/haiku-basho
| Code: | | 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!
_________________ KDpup-484 FoxyRoxyLinux Pussylinux BackUp forum
|
|
Back to top
|
|
 |
|