arminstraub.com

kio-locate

Bitte auf deutsch!
In English, please!

23438 visitors since 2006/10/01

Not logged in. (Login)

Search | Fullscreen

kio-locate: A KDE I/O Slave

Probably you know the locate command for doing quick file searches. kio-locate enables you, to start such a search from konqueror.

  • To search using locate you don't have to switch to a prompt.
  • The search results are shown to you, as if you were in a directory. Any found file is just one click away.
  • You could e.g. move all found files using Drag & Drop.
  • And all that's possible from practically any KDE program, that can open files.

Perhaps you should just take a look at the screenshots.

Unfortunately, I currently don't have the time to maintain kio-locate.

Many thanks to Tobi Vollebregt who has been improving kio-locate as a participant of Googles "Summer of Code". Thank you very much!

Changelog

 kio-locate 0.4.5 2006-02-05Armin Straub
*Search hits with non-ascii characters in the file name always showed up with invalid size/owner/group information (fixed by Johan Billing).
*kio-locate should now compile with gcc-4.1_beta (fixed by Jan Jitse Venselaar).
*Updated to bksys 1.5.1.
 
 kio-locate 0.4.4 2005-10-19Armin Straub
+Warn if locate (or whatever is selected) is not installed (suggested by Axel K. Braun).
*Use slocate and rlocate as default when available (suggested by Nicolas Degand).
*Closed a bug preventing the display of items having the same prefix (reported by Takis).
 
 kio-locate 0.4.3 2005-09-15Armin Straub
*Made the config dialogs more verbose.
*Replaced the previous screenshot (105K) with a similar one (27K) significantly reducing the package size.
+Added a (crude?) German translation.
 
 kio-locate 0.4.2tvo0.2 2005-08-21Tobi Vollebregt
*Hit counting is now recursive.
*Fixed a packaging bug which caused the helpfiles to be inaccessable if installed using the .deb file.
*Updated to the newest version of bksys.
 
 kio-locate 0.4.2tvo0.1 2005-07-14Tobi Vollebregt
+Directory collapsing if pattern matches the directory part of a path.
+Entries for searching within directories and entries for plain browsing of the directories.
+Added full wildcard support in all patterns (after discussion this seemed to be more appropriate than full regexp support for `locate:').
+Added full regexp support in the filtering patterns with the `rlocate:' protocol.
+A case sensitivity setting in the config page.
+A `config succesfully updated' or `config unchanged' message is displayed after closing the config dialog.
+Different icons for normal and collapsed directories.
+Configurable RegExp filtering, using a white list and a black list.
*Fixed searches within a directory other than root (/).
*Reduced flickering when listing results.
*Number of hits displayed in front of a directory, is now exactly the number of entries you'll see after you click that entry.
*`locater:help' now actually works.
*Updated to the newest version of bksys.
 
 kio-locate 0.4.2 2005-05-22Armin Straub
*Removed stupid bug inverting case sensitivity.
 
 kio-locate 0.4.1 2005-05-21Armin Straub
+Added a config page for settings related to locate (the real one :-)). You can e.g. choose slocate or other replacements now.
*For compatibility -i is used instead of --ignore-case when calling locate.
*Case Sensitivity is now chosen for every part of the search pattern on its own.
 
 kio-locate 0.4.0 2005-04-10Armin Straub
+Using scons and bksys instead of autotools and the like. This saves both - a lot of space (around 500kb) and lots of time when developing (thanks to Nagy Thomas for his help). Read INSTALL for a quick guide.
+Added the possibility to configure some aspects of kio-locate by envoking locater:config. (More to come...)
*Use the locater protocol which uses standard Urls for more complex tasks and keep the locate protocol for simple queries.
*Don't use ilocate and clocate anymore. (Check the settings for configuring kio-locate's case sensitivity.)
*Some minor enhancements and some new bugs :-)
 
 kio-locate 0.3.4 2005-01-22Armin Straub
*Removed yet another bug preventing kio-locate from compiling when using KDE 3.2 (thanks to Sergio Cambra).
 
 kio-locate 0.3.3 2005-01-21Armin Straub
*Removed small bug preventing kio-locate from compiling on some systems (thanks to Francesco di Cugno who also provided a package for Slackware).
 
 kio-locate 0.3.2 2005-01-17Armin Straub
+Several hits in one directory are now grouped together. For code and ideas lots of thanks to Fred Schaettgen.
*The search process should be a bit faster as only those files are checked for existence that are displayed (thanks to Fred Schaettgen).
 
 kio-locate 0.3.1 2004-12-10Armin Straub
*The locate protocol no more does only case sensitive searches, but searches case insensitive by default and switches to case sensitivity if the search string contains upper case characters.
+Added the protocol clocate for case sensitive searches.
+Added a locate search to konquerors list of web shortcuts. This enables you to select locate as the default search engine in konqueror. (Whenever you enter a nonsense url then, konqueror will use locate to search for this "nonsense".)
 
 kio-locate 0.3.0 2004-11-01Armin Straub
*Filtering by regular expressions is now possible: You can use "locate:pattern [!]regexp ..." now. pattern uses standard locate syntax followed by regexps that may be preceded by ! meaning that they shouldn't match.
 
 kio-locate 0.2.4 2004-10-26Armin Straub
*Removed bugs in kio-locate.spec used to generate rpm's (thanks to Sami Vento).
 
 kio-locate 0.2.3 2004-10-25Armin Straub
*Taking current locale into account, so kio-locate won't change non-latin1 encoded file names (thanks to Jakub Stachowski).
+Added kio-locate.spec so that you can build rpms by just typing rpmbuild -ta --target=i686 kio-locate_$VERSION.tar.gz (thanks to Sami Vento).
 
 kio-locate 0.2.2 2004-10-24Armin Straub
+Added the protocol ilocate for case insensitive searches.
+Interpret ~/ and ~user/ in a search (expand just as the shell normally does).
+Detection of konquerors autocompletion.
 
 kio-locate 0.2.1 2004-10-22Armin Straub
+Added french translation (thanks to Laurent Rathle).
*Included stdlib.h correctly (previously preventing kio-locate to compile on some machines).
 
 kio-locate 0.2.0 2004-10-15Armin Straub
*Complete rewrite.
*Works with KDE 3.3.
+Displays detailed information in Konqueror (not just filenames).
+Enabled patterns like the ones used for locate. kio-locate (0.1.1-1) -- Michael Schuerig
*Corrected URL prefix ("file:" instead of "file:/").
*Update admin dir. kio-locate (0.1-2) -- Michael Schuerig
*Rebuild for KDE 3.1. kio-locate (0.1-1) -- Michael Schuerig
*Initial Release.
 
Less ...

Download kio-locate

You can download kio-locate either as a debian package or as full sourcecode.

LinkSizeDescriptionHits
151.64 KB kio-locate 0.4.5 (source code) 2234
101.49 KB kio-locate 0.4.5 (Debian/sid, thanks to Karsten Schulz) 1683
151.98 KB kio-locate 0.4.4 (source code) 783
More Downloads... 

Some TODOs

 Short Term
 
 Mid Term
+Add kio-locate to kde-extragear.
+Translations needed. Contact H?rd Dahle for Norwegian translation.
+Support searches on remote servers via ssh. A possible search could then look like "locate://username@server:port pattern". (Suggested by Ferdinand Gassauer)
 
 Ideas
+Some kind of first start screen?
+Check out beagle-query which was said to behave similar to command line locate. (Benjamin Kudria)
+Use other backends like kat?
 

How to use this?

You can use kio-locate mostly as you use locate. Instead of typing

notebook:~ $ locate pattern
at a prompt, you start the search with kio-locate directly in konqueror. You just enter locate:pattern as the address.
New: Configure kio-locate

Starting with version 0.4.0 you can configure kio-locate by entering locater:config in konqueror's adress bar (note the r).

A normal search using locate:pattern is case insensitive. But if your search contains upper case characters, the search switches to case sensitivity. You can change this behaviour using locater:config.

How to write Patterns
  • Furthermore you can't use a backslash as the last character of your query. O.k. you can, but KDE will ignore it. In such a case you can quote your pattern: Write locate:"servicemenus/" rather than locate:servicemenus/.
  • A search as e.g. locate:~/*.doc works as you might expect. This means that ~/ and ~user/ are expanded correctly at the beginning of the pattern.
  • In older versions of KDE you can't use a star (*) for a pattern in konqueror. Therefor every plus (+) in a search is used just as a star (*) is. Instead of locate:*.html you may also type locate:+.html.
  • Should you need to use a plus in your search you have to escape it with a backslash. Instead of locate:g++ you have to use locate:g\+\+.
New: Using Filters

Often you will get lots of results using locate. To filter your search you could use

notebook:~ $ locate kdeprint | grep -v apidocs | grep lib
on the command line to find those files matching kdeprint that don't contain api-docs but lib.

Starting with version 0.3.0 kio-locate has builtin support for such filtering. You can e.g. use locate:kdeprint !api-docs lib to get the same results as above.

You can use arbitrarily many filtering expressions. Those that should not match are prepended by !. To use regular expressions you can use rlocate instead of locate as the protocol.

You can add arbitrary filters to a white- resp. blacklist (using locater:config). This way you can restrict your search to certain folders generally or exclude single directories. If you e.g. replace . by /home/. in your whitelist you will only find files under /home afterwards.

Using this as the default search engine

Since version 0.3.1 you are enabled to select kio-locate as konquerors default search engine (under Web Shortcuts). Whenever you enter an url then, that konqueror can't deal with, a search using locate will be started.

So you can just enter a filename and konqueror will search for it. This saves you the characters needed for the usuallay prepended locate:.

                                                                                                                                                                                                                                               

Quick-Links

kio-locate

Changelog

Download kio-locate

Some TODOs

How to use this?

New: Configure kio-locate

How to write Patterns

New: Using Filters

Using this as the default search engine

Screenshots

Last change: 2006/10/09