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 Thu 24 Jul 2014, 10:45
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Browsers and Internet
Psearch - Puppy web search utility
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
PaulR

Joined: 04 May 2005
Posts: 242
Location: UK

PostPosted: Fri 22 Mar 2013, 15:48    Post_subject:  Psearch - Puppy web search utility  

Here's Psearch my first proper Puppy program so go easy on me!

This utility takes your search terms prepends them with 'puppy linux' takes note of your choice of search target then launches Firefox (or a new tab if it's already open) with a ready made Google search.

The archive includes the executable (psearch) which has been packed with UPX - it's around 46K in size - and the BaCon source code.

If you use a different browser or search engine it should be easy to modify a couple of lines in the source and recompile to suit you needs.

The program doesn't have any other requirements so should run on any recent version of Puppy (I think/hope!).

Thanks to Mobeus and L18L here on the forum for their help Very Happy

Paul
psearch-screen.png
 Description   
 Filesize   14.38 KB
 Viewed   487 Time(s)

psearch-screen.png

psearch.tar.gz
Description 
gz

 Download 
Filename  psearch.tar.gz 
Filesize  41.04 KB 
Downloaded  174 Time(s) 
Back to top
View user's profile Send_private_message 
nilsonmorales


Joined: 15 Apr 2011
Posts: 461
Location: El salvador

PostPosted: Sat 23 Mar 2013, 00:55    Post_subject:  

!Awesome. Have locales?
Back to top
View user's profile Send_private_message MSNM 
PaulR

Joined: 04 May 2005
Posts: 242
Location: UK

PostPosted: Sat 23 Mar 2013, 04:14    Post_subject:  

Sorry I don't know how to do that yet, I'll read up on it on Barry's BaCon guide.

Paul
Back to top
View user's profile Send_private_message 
PaulR

Joined: 04 May 2005
Posts: 242
Location: UK

PostPosted: Sun 24 Mar 2013, 15:31    Post_subject:  

Here's an updated version (only 19K now Very Happy ) which offers a choice of search engines.

If anyone would like to suggest a search engine or site to add feel free to shout.

Localisation is on the way... thanks again to L18L for pointing me in the right direction.

Paul
screen.png
 Description   
 Filesize   16.29 KB
 Viewed   438 Time(s)

screen.png

psearch1.03.tar.gz
Description 
gz

 Download 
Filename  psearch1.03.tar.gz 
Filesize  17.92 KB 
Downloaded  171 Time(s) 
Back to top
View user's profile Send_private_message 
8-bit


Joined: 03 Apr 2007
Posts: 3355
Location: Oregon

PostPosted: Mon 25 Mar 2013, 02:24    Post_subject:  

I downloaded this utility into Puppy Lucid 5.20.
I also have BaCon installed.
But when I tried to run this program from a terminal, I got a file not found in /usr/lib/hug.so not being found.
Maybe my BaCon install is not current enough.
I did not try to use the source you had posted in another thread.
Back to top
View user's profile Send_private_message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Mon 25 Mar 2013, 04:13    Post_subject:  

Dear PaulR,

Thanks for the utility. I tried the first version and it works fine. Version 1.03 complains about not finding /usr/lib/hug/so. To avoid compatibility problems of the type 8-bit and I are experiencing, I always just use hug and my compile line:


Code:
bacon -o -s -o -Os -o -fdata-sections -o -ffunction-sections -o -Wl,--gc-sections mybconfile


and then UPX the binary. This gives me GTK binaries of about 19k, without the hug.so dependency. That means the binary will run on nearly all recent systems. Please post the source...so that I can recompile.

With kind regards,
vovchik
Back to top
View user's profile Send_private_message 
PaulR

Joined: 04 May 2005
Posts: 242
Location: UK

PostPosted: Mon 25 Mar 2013, 04:44    Post_subject:  

Sorry about that, I'd been using :

Code:

INCLUDE "/usr/share/BaCon/hug_imports.bac"
INIT


for speed of compilation when testing and forgot to switch it back to:

Code:

INCLUDE "/usr/share/BaCon/hug.bac"


...which also explains the reduction in size Embarassed

Here's the re-compiled program, source to follow Very Happy

Paul
psearch1-03.tar.gz
Description 
gz

 Download 
Filename  psearch1-03.tar.gz 
Filesize  39.38 KB 
Downloaded  174 Time(s) 
Back to top
View user's profile Send_private_message 
PaulR

Joined: 04 May 2005
Posts: 242
Location: UK

PostPosted: Mon 25 Mar 2013, 16:31    Post_subject:  

Source attached. L18L is reporting some font issues but it looks ok on my system... not sure what I've done to mess it up? Sad
psearch1-03-source.tar.gz
Description 
gz

 Download 
Filename  psearch1-03-source.tar.gz 
Filesize  1.76 KB 
Downloaded  161 Time(s) 
Back to top
View user's profile Send_private_message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Mon 25 Mar 2013, 17:52    Post_subject:  

Dear PaulR,

Thanks. I compiled in Lucid and it works fine and IS USEFUL. Just used hug.bac and got rid of the USEC/END USEC stuff. Not needed. You could just use 0.0 at the end of SETPROPERTY or DECLARE that ALIGNLEFT var as a FLOATING or CONST.

With kind regards,
vovchik
Back to top
View user's profile Send_private_message 
L18L

Joined: 19 Jun 2010
Posts: 2504
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Tue 26 Mar 2013, 06:27    Post_subject: Psearch - Puppy web search utility
Sub_title: font
 

PaulR wrote:
Source attached. L18L is reporting some font issues but it looks ok on my system... not sure what I've done to mess it up? Sad
BarryK on http://bkhome.org/bacon/hug/layout.htm wrote:
REM fix window font layout regardless of dpi...
REM 78 is the Xft.dpi in /root/.Xresources when I designed the layout...
HUGOPTIONS("BASEXFTDPI 78")

Code:
HUGOPTIONS("BASEXFTDPI 66")
has fixed it Laughing
Back to top
View user's profile Send_private_message 
PaulR

Joined: 04 May 2005
Posts: 242
Location: UK

PostPosted: Tue 26 Mar 2013, 12:45    Post_subject:  

OK, if I understand correctly I need to put

Code:

HUGOPTIONS("BASEXFTDPI 78")


in the source as my system has "Xft.dpi: 78" in /root/.Xresources. If someone else has a different dpi setting or screen size (resolution?) the window will then automatically scale on their system to maintain the correct appearance (or they could re-compile and manually change the value as you have done).

That right? Smile

Paul

Edited_time_total
Back to top
View user's profile Send_private_message 
L18L

Joined: 19 Jun 2010
Posts: 2504
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Tue 26 Mar 2013, 15:06    Post_subject:
Sub_title: font
 

Quote:
(or they could re-compile and manually change the value as you have done).
Of course, not Smile

Now I don't understand anything anymore.
My
Xft.dpi: 96
the default, see also http://bkhome.org/blog2/?viewDetailed=00190

I have inserted
HUGOPTIONS("BASEXFTDPI 66")
and compiled.

See the result, your original and mine Rolling Eyes
psearch1.03_66.png
 Description   
 Filesize   59.94 KB
 Viewed   332 Time(s)

psearch1.03_66.png

Back to top
View user's profile Send_private_message 
PaulR

Joined: 04 May 2005
Posts: 242
Location: UK

PostPosted: Tue 26 Mar 2013, 16:41    Post_subject:  

My Slacko 5.5 has 78 DPI as the setting.

I've recompiled with:
Code:

HUGOPTIONS("BASEXFTDPI 78")


The executable is attached, does that look right on your system L18L now that I've explicitly set the DPI?

Paul
psearch1-03-testdpi.tar.gz
Description 
gz

 Download 
Filename  psearch1-03-testdpi.tar.gz 
Filesize  39.59 KB 
Downloaded  180 Time(s) 
Back to top
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Tue 26 Mar 2013, 17:58    Post_subject:  

PaulR.

Here's the recompile on precise 5.4.3 at Xft.dpi: 96.

I remember this being a problem when bacon was first introduced, and I'm hoping vovchik knows the fix. Smile

Cheers,
s
psearch.png
 Description   Recompile at 78dpi
 Filesize   17.33 KB
 Viewed   317 Time(s)

psearch.png

Back to top
View user's profile Send_private_message 
PaulR

Joined: 04 May 2005
Posts: 242
Location: UK

PostPosted: Tue 26 Mar 2013, 18:18    Post_subject:  

Thanks for that seaside - what if you run the executable in my last post without recompiling?

Paul
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Browsers and Internet
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.0864s ][ Queries: 12 (0.0129s) ][ GZIP on ]