topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday December 12, 2024, 1:57 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: NANY 2010 Final Release: FarrWebMetaSearch  (Read 72915 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #25 on: December 23, 2009, 11:14 AM »
drool... :-* :-*

Perry Mowbray

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2005
  • *****
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #26 on: December 23, 2009, 04:30 PM »
I've recorded a short teaser screen cast.

 :-*

This link would be good in your first post: it's great!!

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,198
    • View Profile
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #27 on: December 24, 2009, 03:02 AM »
I've recorded a short teaser screen cast.

 :-*

This link would be good in your first post: it's great!!

Done. Thanks for the suggestion!

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,198
    • View Profile
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #28 on: December 24, 2009, 03:10 AM »
I've implemented the possibility to specify search options. Adding either one of +, / or - right after the search name (and before the search term) will list the available options:

wms_options.pngNANY 2010 Final Release: FarrWebMetaSearch

Using it will give you this:

wms_kindlebooks.pngNANY 2010 Final Release: FarrWebMetaSearch

Options are specified like so:


description=Amazon
searchUrl=http://www.amazon.com/s/ref=nb_ss?url=search-alias%3Daps&field-keywords=
resultPattern=<div class="productImage"><a href=".*">\s*<img[\w\s="\('\)\{\};]*src="(.*)"[\w\s="/]*>\s*</a></div>\s*<div class="productData">\s*<div class="productTitle"><a href="(.*)">(.*)</a>\s*(?:[<\w\s=">]*)(?:[\w\s]*)(?:by\s|\s~\s)(?:<a href=".*">)?([\w\s,]*)(?:</a>)?</span><span class="binding">\s*\((?:<span class="format">.*</span>)?(.*)\)</span></div>(?:\s*<div class="newPrice"><a href=".*">Buy new</a>:&nbsp;(?:<strike>\$[\d\.]*</strike>\s*)?<span>\$([\d\.]*)</span></div>)?
farrCaption=$3
farrGroup=$4 ($5)  Prize: $$6
farrPath=$2

[books]
searchUrl=http://www.amazon.com/s/ref=nb_ss?url=search-alias%3Dstripbooks&field-keywords=

[kindlebooks]
searchUrl=http://www.amazon.com/s/ref=nb_ss?url=node%3D154606011&field-keywords=
resultPattern=<div class="productImage"><a href=".*">\s*<img[\w\s="\('\)\{\};]*src="(.*)"[\w\s="/]*>\s*</a></div>\s*<div class="productData">\s*<div class="productTitle"><a href="(.*)">(.*)</a>\s*(?:[<\w\s=">]*)(?:[\w\s]*)(?:by\s|\s~\s)(?:<a href=".*">)?([\w\s,]*)(?:</a>)?</span><span class="binding">\s*\(<span class="format">(.*)</span>(.*)\)</span> - <span class="format">.*</span></div>(?:\s*<div class="newPrice"><a href=".*">Buy</a>:&nbsp;(?:<strike>\$[\d\.]*</strike>\s*)?<span>\$([\d\.]*)</span></div>)?
farrGroup=$4 ($5 - $6)  Prize: $$7


Perry Mowbray

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2005
  • *****
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #29 on: December 24, 2009, 04:23 AM »
 >:( I can't stand this any longer: I want to play!!!!!   :P

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,198
    • View Profile
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #30 on: December 29, 2009, 03:36 PM »
I've uploaded a preliminary release for anyone interested to try out. The download link is in the first post. Just download and unzip into the FARR plugins directory, then restart FARR (or goreload). The alias is wms.

A few things to note:

  • I've concentrated on the plugin functionality, so the searches themselves are not very sophisticated and numerous yet. For one thing, it would most certainly be possible to extract more relevant information. But more importantly, they probably won't give you the exact same results as the search on the actual web site would.
  • Most search icons are from google image search, so I'm most certainly not allowed to distribute them with the plugin. Don't know what to do about these yet.
  • There's no documentation about how to configure the searches yet. If you want to try configuring your own search (which I urge everyone to do :Thmbsup:), just check out the ones included. They are in the searches subdirectory.
  • Each time you modify a search configuration file, you need to reload the plugin (goreload)
  • There's no proper logging / debugging capability yet. If your search doesn't show after 'goreload', run DebugView while you're reloading the plugin. The regular expressions are checked for validity when the plugin is being loaded and invalid searches are (currently silently) discarded.
  • I've found this site quite useful for coming up with regular expressions. If someone knows something better please let me know.
  • The searches included are:
    • Amazon US (this search shows how to configure search options)
    • Amazon DE (because that's where I usually shop. Well, used to, before I bought a Kindle ;))
    • CDDB
    • C++ Reference
    • IMDB (proofed difficult to split up using regular expressions)
    • MSDN (which is why I actually wanted to code the plugin :))
    • Tages Anzeiger Front Seite (which shows how use the plugin to show a news feed)
« Last Edit: December 29, 2009, 03:46 PM by phitsc »

Perry Mowbray

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2005
  • *****
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #31 on: December 29, 2009, 04:47 PM »
I've uploaded a preliminary release for anyone interested to try out.

Cool  :-* But now I have to wait till I get home from work to play :mad:

Do you have a RedMine project for this so that people can upload new searches?  ;)

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #32 on: December 29, 2009, 05:43 PM »
I've given it a try -- looks pretty nice so far  :Thmbsup:

One thing that doesn't seem to work for me is getting the search to launch.  I have FARR customized so that there's a setting for "Overide Default Internet Browser with Custom Application" under "Program Options" -> "Settings" -> "External Tools" -> "Custom File and Browser Tools".

What happens after I press the Enter key is that I get a dialog box with:

  • the title being a URL,
  • a circular red icon with a white 'x',
  • one line of text that appears to be the same URL as that in the title (e.g. for an Amazon search this might be a URL that takes me to a page for a book I presume), and
  • a message that translates as something like "Application Not Found"

Looks something like the image of the dialog I see at:

http://www.winhelpon...when-opening-an-url/

Does this sort of set up work for anyone else?

Regarding regular expressions, I found this thread to be useful at various points.

BTW, have you considered using XPath expressions?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #33 on: December 30, 2009, 07:11 AM »
working well.. very cool!

the msdn ones dont trigger a search for me.. i think you may have to add http:// to the urls.

amazon searches results seem a bit iffy.. here's my search for neural control, which should yield quite a few results:
Screenshot - 12_30_2009 , 7_13_03 AM.png
« Last Edit: December 30, 2009, 07:14 AM by mouser »

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,198
    • View Profile
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #34 on: December 30, 2009, 07:21 AM »
working well.. very cool!

the msdn ones dont trigger a search for me.. i think you may have to add http:// to the urls.
I intentionally don't add the http:// to the urls (actually, I removed it :D), because otherwise FARR will not show the 'group' field (which I'm using to display additional information), but the url instead. Then, when an item is launched I add it again before launching. You're right though, MSDN doesn't work for me any more either. What I'll do now is change the launch code to use FARR's launch command instead of calling ShellExecuteEx myself. Will that use FARR's internal launch 'logic' (like external tools ewemoa is using) and the different launch methods FARR supports?

Thanks guys for checking it out!  :)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #35 on: December 30, 2009, 07:24 AM »
yeah you can just ask farr to launch the url and it should do fine.

Perry Mowbray

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2005
  • *****
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #36 on: December 30, 2009, 08:33 AM »
This is seriously good fun...

Screenshot - 31_12_2009 , 1_33_31 AM.pngNANY 2010 Final Release: FarrWebMetaSearch

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,198
    • View Profile
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #37 on: December 30, 2009, 08:47 AM »
the msdn ones dont trigger a search for me.. i think you may have to add http:// to the urls.
Might this be a FARR Windows 7 specific problem? MSDN launches fine for me when I run FARR on Windows XP. Also, when debugging on Windows 7, the plugin's EFuncName_Allow_ProcessTrigger never seems to get called. No idea why amazon launches though.

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,198
    • View Profile
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #38 on: December 30, 2009, 02:00 PM »
ewemoa, are you running Windows XP?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #39 on: December 30, 2009, 02:48 PM »
No idea why amazon launches though.
if there is a www. at front, that might be why.

as for why its not calling allowprocesstrigger maybe you aren't telling it that you want to be called for that? there is a place in dll where you tell farr what things you want to be notified about?

Perry Mowbray

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2005
  • *****
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #40 on: December 30, 2009, 05:50 PM »
Is there a way to retrieve the original search string and use it in the Path?

For example, in the following I'm grabbing the Quick Definitions from OneLook, but the path should be to the original search path, ie
http://www.onelook.com/?w=

WMS onelook 1.png

That is, double clicking on any of those results should open http://www.onelook.com/?w=mug
« Last Edit: December 30, 2009, 05:52 PM by Perry Mowbray »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #41 on: December 30, 2009, 09:52 PM »
ewemoa, are you running Windows XP?
Indeed I am.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #42 on: December 30, 2009, 11:49 PM »
I upgraded to 0.9.1 and am no longer experiencing the problem mentioned earlier :)

Thanks!

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,198
    • View Profile
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #43 on: December 31, 2009, 05:22 AM »
I upgraded to 0.9.1 and am no longer experiencing the problem mentioned earlier :)

Thanks!
Ok, thanks for letting me know!

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,198
    • View Profile
    • Donate to Member
Re: NANY 2010 Teaser: FarrWebMetaSearch
« Reply #44 on: December 31, 2009, 05:22 AM »
BTW, have you considered using XPath expressions?
No, I haven't. Sounds like a very good idea though.

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,198
    • View Profile
    • Donate to Member
Re: NANY 2010 Final Release: FarrWebMetaSearch
« Reply #45 on: December 31, 2009, 07:22 AM »
I'm afraid I have no time to look into the launching problem before the year ends. So 0.9.1 is my final NANY release.

The first post contains a list of stuff I'm going to add next year :)

Thanks guys for checking the plugin out and giving me feedback. And many thanks to Perry for organising the event!

Perry Mowbray

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2005
  • *****
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: NANY 2010 Final Release: FarrWebMetaSearch
« Reply #46 on: December 31, 2009, 07:32 AM »
I'm afraid I have no time to look into the launching problem before the year ends. So 0.9.1 is my final NANY release.


What are you talking about: you've got another 21 hours before the whistle blows!!!  :D :D

Seriously: Thanks for this: it's a great plugin that's lots of fun!!

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,198
    • View Profile
    • Donate to Member
Re: NANY 2010 Final Release: FarrWebMetaSearch
« Reply #47 on: December 31, 2009, 07:36 AM »
What are you talking about: you've got another 21 hours before the whistle blows!!!  :D :D
I wish my wife would be of that opinion too ;)

I'll add a thread for the plugin on the FARR plugins board next year by the way.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: NANY 2010 Final Release: FarrWebMetaSearch
« Reply #48 on: December 31, 2009, 11:03 PM »
Very slick, phitsc.  Well done.

Perry Mowbray

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2005
  • *****
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: NANY 2010 Final Release: FarrWebMetaSearch
« Reply #49 on: January 05, 2010, 06:06 AM »
OK: Here is my onelook dictionary search:
1. Unzip this file into the FindAndRunRobot\Plugins\FARRWebMetaSearch\searches directory: * onelook.zip (1.16 kB - downloaded 382 times.)

2. Reload the plugins

3. Usage:
  • Dictionary Search: wms onelook <word>
    Screenshot - 5_01_2010 , 10_53_43 PM.pngNANY 2010 Final Release: FarrWebMetaSearch
  • Dictionary Meanings: wms onelook +quick <word>
    Screenshot - 5_01_2010 , 10_52_38 PM.pngNANY 2010 Final Release: FarrWebMetaSearch
  • Reverse Dictionary: wms onelook +reverse <search pattern>
    Screenshot - 5_01_2010 , 10_49_54 PM.pngNANY 2010 Final Release: FarrWebMetaSearch
  • You can also set the word pattern to return, using a pattern string before a ":": eg wms onelook +reverse m*:cat
    Screenshot - 5_01_2010 , 11_02_49 PM.pngNANY 2010 Final Release: FarrWebMetaSearch
    * = any character; ? = single character

Thanks for a great plugin!!