Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 21 Dec 2014, 17:04
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Games
GTK and xcow haiku generators
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
vovchik


Joined: 23 Oct 2006
Posts: 1287
Location: Ukraine

PostPosted: 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
haiku-gtk.jpg
 Description   
 Filesize   20.67 KB
 Viewed   1572 Time(s)

haiku-gtk.jpg

haiku-xcow.jpg
 Description   
 Filesize   24.83 KB
 Viewed   1622 Time(s)

haiku-xcow.jpg

haiku-basho.pet
Description 
pet

 Download 
Filename  haiku-basho.pet 
Filesize  95.53 KB 
Downloaded  435 Time(s) 
Back to top
View user's profile Send_private_message 
666philb


Joined: 07 Feb 2010
Posts: 1962
Location: wales

PostPosted: Tue 15 Feb 2011, 17:31    Post_subject:  

vovchik

i like it! thankyou

666philb

_________________
Tahrpup, built with trusty tahr packages http://murga-linux.com/puppy/viewtopic.php?t=96178
Quickpet_Precise, install popular apps quickly http://www.murga-linux.com/puppy/viewtopic.php?t=83642
Back to top
View user's profile Send_private_message 
GustavoYz


Joined: 07 Jul 2010
Posts: 897
Location: .ar

PostPosted: Thu 24 Feb 2011, 02:18    Post_subject:  

late voice
forest stands near frost
tiny cool app

Cool

_________________

Back to top
View user's profile Send_private_message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15122
Location: Paradox Realm

PostPosted: 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
View user's profile Send_private_message Visit_website 
666philb


Joined: 07 Feb 2010
Posts: 1962
Location: wales

PostPosted: 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

_________________
Tahrpup, built with trusty tahr packages http://murga-linux.com/puppy/viewtopic.php?t=96178
Quickpet_Precise, install popular apps quickly http://www.murga-linux.com/puppy/viewtopic.php?t=83642
Back to top
View user's profile Send_private_message 
vovchik


Joined: 23 Oct 2006
Posts: 1287
Location: Ukraine

PostPosted: 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.
haiku-hug-bin.tar.gz
Description 
gz

 Download 
Filename  haiku-hug-bin.tar.gz 
Filesize  29.93 KB 
Downloaded  315 Time(s) 
Back to top
View user's profile Send_private_message 
666philb


Joined: 07 Feb 2010
Posts: 1962
Location: wales

PostPosted: 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

_________________
Tahrpup, built with trusty tahr packages http://murga-linux.com/puppy/viewtopic.php?t=96178
Quickpet_Precise, install popular apps quickly http://www.murga-linux.com/puppy/viewtopic.php?t=83642
Back to top
View user's profile Send_private_message 
saintless


Joined: 11 Jun 2011
Posts: 2728
Location: Bulgaria

PostPosted: Tue 10 Jan 2012, 10:06    Post_subject:  

Thank you, Vovchik, I really like it Very Happy
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!

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send_private_message MSNM 
saintless


Joined: 11 Jun 2011
Posts: 2728
Location: Bulgaria

PostPosted: 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 Smile

Best regards!

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send_private_message MSNM 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Games
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0643s ][ Queries: 12 (0.0035s) ][ GZIP on ]