LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-18-2005, 03:55 PM   #1
greauxe
LQ Newbie
 
Registered: Jul 2005
Posts: 19

Rep: Reputation: 0
Google Desktop search-Will slocate work?


I like having google desktop search on my work computer, but could use it even more on my linux computer. I know "slocate -u" will create an index of my files and slocate -i filename will conduct a search for a file. slocate is also lightning fast. Is there a linux version of google desktop search that uses slocate?

Or, is there a way to send slocate output to html format?

If not, could someone put one together? Not much of a task for a hot-shot programmer, but it would be of great use.

Last edited by greauxe; 08-18-2005 at 03:59 PM.
 
Old 08-18-2005, 05:09 PM   #2
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
Code:
#!/bin/bash
if [ -z $1 ]; then
echo "Usage: $(basename $0) <searchterm> [outputfile.html]"
exit 1
fi

if [ ! -z $2 ]; then
wrap(){
$1 >> $2
}
else
wrap(){
$1
}
fi
wrap "echo <html><head><title>locate results</title></head><body><pre>" $2
wrap "locate $1" $2
wrap "echo </pre></body></html>" $2
Simple and dirty as turkey beef.. Works, but thats all I can promise for it. Save it in a file, make it executable and run. if you dont give an output file, youll get in out as standard output. It totally beats me why you'd want it out as html, but thats not my place to ask.. (;
 
Old 10-03-2005, 09:07 PM   #3
greauxe
LQ Newbie
 
Registered: Jul 2005
Posts: 19

Original Poster
Rep: Reputation: 0
Thanx,
I guess I envisioned some sort of results page kinda like google desktop search. I appreciate the code though. Good stuff!

Last edited by greauxe; 10-03-2005 at 09:09 PM.
 
Old 10-04-2005, 11:35 AM   #4
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
Well, its easy adding a few more echoes to the code to construct a fancier page, or just implement the whole damn thing as php.. That would actually be pretty cool.. A localhost webpage to run locate, find and so on on your own computer..

I might just implement this and report back when its done.. (;

edit:
ive never seen this google desktop search, so a few details wouldnt hurt.. (:
 
Old 10-27-2005, 09:50 AM   #5
prara
LQ Newbie
 
Registered: Aug 2003
Distribution: Mandriva, Ubuntu, Fedora
Posts: 24

Rep: Reputation: 15
It's a sleek, impressive tool that can search almost every file in your computer:
http://desktop.google.com/about.html

I wish there's Google Desktop in Linux.
 
Old 10-27-2005, 10:02 AM   #6
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
There seem to be several implementations already: Beagle and Kat

But basing on my own tests of them, they seriously suck. Beagle has weird kernel dependncies, and crashes alot (official suse 9.3 pro packages.. /: ) And Kat was a pain to install on anything else than Mandriva, and still it didnt deliver what it promised.

So, some definate improvement is still needed before id recomend those to anyone.
 
Old 10-27-2005, 10:17 AM   #7
prara
LQ Newbie
 
Registered: Aug 2003
Distribution: Mandriva, Ubuntu, Fedora
Posts: 24

Rep: Reputation: 15
Kat is very unstable in Mandriva 2006.

I wish Google ports the desktop search to Linux.
 
Old 10-27-2005, 12:23 PM   #8
wildcat22
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu
Posts: 102

Rep: Reputation: 15
Just curious, what does the wrap() function do?

Thanks!
 
Old 10-28-2005, 01:54 AM   #9
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
its there in the code actually incase you missed it.. (: My logic behind it is pretty simple, it figures wether we were given a file parameter and if not, prints directly to stdout, otherwise to the file. Kinda useless now that I think of it, but aaaanyways (:
 
Old 11-03-2005, 09:50 PM   #10
greauxe
LQ Newbie
 
Registered: Jul 2005
Posts: 19

Original Poster
Rep: Reputation: 0
I Think there is a valid need for a google desktop search clone in Linux. Here is your chance to make your mark in the Linux World Artanicus (if you haven't already). It would be a great contribution. Let me know if you are interested. I run a server if you need a development space w/ CVS & FTP. I would be glad to sponsor!

greauxpc.org
Join the fun!

Last edited by greauxe; 11-03-2005 at 09:54 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
using google to search LQ dr_zayus69 Linux - General 1 03-23-2005 08:23 AM
Looking for a Google Desktop Search for linux Boffy Linux - Software 1 02-25-2005 04:52 PM
Google search on CD Zuggy General 1 12-17-2004 09:55 AM
Try this Google search the_imax General 11 12-12-2004 04:08 AM
Google search feature Mik LQ Suggestions & Feedback 4 03-07-2003 01:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration