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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-18-2005, 03:55 PM
|
#1
|
|
LQ Newbie
Registered: Jul 2005
Posts: 19
Rep:
|
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.
|
|
|
|
08-18-2005, 05:09 PM
|
#2
|
|
Member
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827
Rep:
|
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.. (;
|
|
|
|
10-03-2005, 09:07 PM
|
#3
|
|
LQ Newbie
Registered: Jul 2005
Posts: 19
Original Poster
Rep:
|
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.
|
|
|
|
10-04-2005, 11:35 AM
|
#4
|
|
Member
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827
Rep:
|
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.. (:
|
|
|
|
10-27-2005, 09:50 AM
|
#5
|
|
LQ Newbie
Registered: Aug 2003
Distribution: Mandriva, Ubuntu, Fedora
Posts: 24
Rep:
|
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.
|
|
|
|
10-27-2005, 10:02 AM
|
#6
|
|
Member
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827
Rep:
|
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.
|
|
|
|
10-27-2005, 10:17 AM
|
#7
|
|
LQ Newbie
Registered: Aug 2003
Distribution: Mandriva, Ubuntu, Fedora
Posts: 24
Rep:
|
Kat is very unstable in Mandriva 2006.
I wish Google ports the desktop search to Linux.
|
|
|
|
10-27-2005, 12:23 PM
|
#8
|
|
Member
Registered: Nov 2003
Location: USA
Distribution: Ubuntu
Posts: 102
Rep:
|
Just curious, what does the wrap() function do?
Thanks!
|
|
|
|
10-28-2005, 01:54 AM
|
#9
|
|
Member
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827
Rep:
|
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 (:
|
|
|
|
11-03-2005, 09:50 PM
|
#10
|
|
LQ Newbie
Registered: Jul 2005
Posts: 19
Original Poster
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:56 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|