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 Tue 21 Oct 2014, 08:05
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 [27 Posts]   Goto page: 1, 2 Next
Author Message
PaulR

Joined: 04 May 2005
Posts: 246
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   495 Time(s)

psearch-screen.png

psearch.tar.gz
Description 
gz

 Download 
Filename  psearch.tar.gz 
Filesize  41.04 KB 
Downloaded  195 Time(s) 
Back to top
View user's profile Send private message 
nilsonmorales


Joined: 15 Apr 2011
Posts: 498
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 MSN Messenger 
PaulR

Joined: 04 May 2005
Posts: 246
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: 246
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   447 Time(s)

screen.png

psearch1.03.tar.gz
Description 
gz

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


Joined: 03 Apr 2007
Posts: 3380
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: 246
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  197 Time(s) 
Back to top
View user's profile Send private message 
PaulR

Joined: 04 May 2005
Posts: 246
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  185 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: 2525
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Tue 26 Mar 2013, 06:27    Post subject: Psearch - Puppy web search utility
Subject description: 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: 246
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

Last edited by PaulR on Tue 26 Mar 2013, 16:27; edited 1 time in total
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2525
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Tue 26 Mar 2013, 15:06    Post subject:
Subject description: 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   346 Time(s)

psearch1.03_66.png

Back to top
View user's profile Send private message 
PaulR

Joined: 04 May 2005
Posts: 246
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  206 Time(s) 
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 887

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   334 Time(s)

psearch.png

Back to top
View user's profile Send private message 
PaulR

Joined: 04 May 2005
Posts: 246
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 from previous:   Sort by:   
Page 1 of 2 [27 Posts]   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:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0806s ][ Queries: 13 (0.0057s) ][ GZIP on ]