7
« on: September 26, 2007, 08:48 AM »
I’m still working on the locate32 plugin and nitrix had some great ideas on how to use it.
Now I’m running into some problems.
What I tried to do:
- used the regex “loc”
- make an alias that does the following:
dosearch loc –p d:\music –ld $$1 +open_winamp
Why this doesn’t work:
FARR doesn’t seem to recognize the +open_winamp option when a regular expression is used.
What I tried to do next:
- create an alias for the plugin named “locate”
- make an alias that does the following:
dosearch locate –p d:\music –ld $$1 +open_winamp
Why this doesn’t work:
When using an alias and using the searchstring_lc_nokeywords parameter the options like “-p” and “-ld” get stripped too. So I can’t use that searchstring. It would also be really hard to distinguish minusoptions (for instance –mp3) that belong to FARR or belong to locate.
What I tried to do next:
Instead of having the locate alias use “-p” for directories and “-ld” for directories only, I filtered out the “+” options in the plugin so I can use the FARR searchfolders like “+folder_music” and options for directories only like “+\”. I open the FindAndRunRobot.ini and read the SearchFolders section to do that (Mouser, is there a way to question SearchFolders from inside the plugin?).
The options get translated back to the regular “-p” and “-ld” options and it loops through the matched directories and adds those files found to the results. Btw, people might say I could just return the results to FARR and let it do all the filtering in case of “+folder_music” but the problem is locate would just return ALL the results at first which is basically your whole harddisk :).
This is working sofar but I’m running into one more problem. When I return the results I tell FARR to add a score to the files (also tried telling FARR to do matching after returning results as well). It does add a score but it totally seems to ignore pattern scoring. If I do “locate +folder_music +mp3 <artistname>” then locate returns the results but the “+mp3” pattern scoring doesn’t add the score to mp3 files. If I do “+folder_music +mp3 <artistname>” it does add the scoring. Does the pattern scoring work with aliases/plugins at all? I would expect FARR to apply the + modifiers to the result. In case of “+folder_music” and “+mp3” I’d expect all the results to match the first modifier and add the score to mp3 files that are found.
I could read the pattern scoring from the ini file as well but I’d rather not if it’s not needed. It would be great if I could just pass the results back and let FARR take care of the rest.
Mouser, do you have any ideas/solutions? Or anybody else ofcourse :)