Welcome Guest.   Make a donation to an author on the site October 24, 2014, 06:08:36 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Your Support Funds this Site: View the Supporter Yearbook.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: Prev 1 [2] 3 4 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: FARR plugin: FarrWebMetaSearch 1.6.0  (Read 27789 times)
Perry Mowbray
N.A.N.Y. Organizer
Charter Member
***
Posts: 1,807



Thoughtful Scribbles

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #25 on: February 05, 2010, 05:59:24 AM »

Forgot to mention: I'm open to suggestions with these  cheesy
Logged

ewemoa
Honorary Member
**
Posts: 2,479



View Profile Give some DonationCredits to this forum member
« Reply #26 on: February 05, 2010, 06:51:22 AM »

I tried my hand at creating a .conf [1] for a page that's got static results:

  http://www.autohotkey.com....php?title=Script_Listing

This didn't seem to work -- using Wireshark, noticed that FarrWebMetaSearch seems to append the query string to the end of searchUrl.  This makes a lot of sense for non-static searches of course smiley  Is there a way to not have it do that?  (Sorry if I missed the discussion of how to do this if it has already been mentioned -- I did scan this topic and the help file, FWIW  Cool )

Below is the .conf so far:

Quote
description=AutoHotkey Script Listing
searchUrl=http://www.autohotkey.com/wiki/index.php?title=Script_Listing
resultPattern=<p><a href="([^"]+)" class="external text" title="[^"]+" rel="nofollow">([^>]+)</a> by <a href="[^"]+" class="external text" title="[^"]+" rel="nofollow">([^>]+)</a>
farrCaption=$2
farrGroup=$3
farrPath=$1

[1] I'm slightly confused -- I noticed the docs say .config, but only see .conf files.  Would someone mind straightening me out?
Logged
Perry Mowbray
N.A.N.Y. Organizer
Charter Member
***
Posts: 1,807



Thoughtful Scribbles

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #27 on: February 05, 2010, 06:57:31 AM »

add isFeed=true and it won't append the searchterm

.conf is the only extension

 Thmbsup
Logged

Perry Mowbray
N.A.N.Y. Organizer
Charter Member
***
Posts: 1,807



Thoughtful Scribbles

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #28 on: February 05, 2010, 07:12:35 AM »

I've just done a very quick search config for DevCheatSheets is on this thread.
Logged

ewemoa
Honorary Member
**
Posts: 2,479



View Profile Give some DonationCredits to this forum member
« Reply #29 on: February 05, 2010, 07:22:11 AM »

Thanks a lot, Perry  Thmbsup

Below is the modified and tested (err, slightly) .conf file.
Quote
description=AutoHotkey Script Listing
searchUrl=http://www.autohotkey.com/wiki/index.php?title=Script_Listing
resultPattern=<p><a href="([^"]+)" class="external text" title="[^"]+" rel="nofollow">([^>]+)</a> by <a href="[^"]+" class="external text" title="[^"]+" rel="nofollow">([^>]+)</a>
farrCaption=$2
farrGroup=$3
farrPath=$1
isFeed=true

It may be obvious, but just in case: one can get an icon for AHK via http://www.autohotkey.com/favicon.ico
Logged
phitsc
Honorary Member
**
Posts: 1,010



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #30 on: February 05, 2010, 07:37:37 AM »

    Requested New Functionality to WMS  smiley
    • subSearch sorting: I've added a parameter to the subSearches though it can be named anything. OneLook suffers from not having the ability to sort the subSearches.
    • subSearch hiding: Some of the subSearches in TimeAndDate should only be used from the context menu as typing the search criteria in doesn't make sense (and crashes FARR at the moment)
    • Context Menu:
      • I seem to have hit the limit with the context menu. Is that a WMS restriction or FARR?
      • The context menus don't seem to be being cleared for each subSearch. You can see this in the OneLook search: the submenus for the default search are carried over to all of the subSearches. I think it would be preferable to start each subSearch fresh.
      • Can we have subMenus? I'd like to put all the dictionary type searches into a subMenu (Art, Computer, etc)
    • Two-stage RegEx: Those dictionary type searches could really do with a two-stage RegEx Match where the second RegEx operates on the result of the first. I also wondered if a RegEx Replace was possible (would help cleaning up some pages).
    • Search Navigation: It would be helpful to have an ability to backwards and forwards in the search results. Sometimes you can not get back to where you came from with the search results, and a back button would be helpful. Something like this:
      • wms timeanddate +w: cities displayed
      • type "syd": filter to "Sydney"
      • select forecast context menu: 14 day forecast displayed
      • at this point I would like to go back one step to the cities filtered on "syd" to access the current conditions context menu.
    • subSearch sorting: done
    • subSearch hiding: done
    • context menu item count limitation: fixed
    • context menu items not cleared for subsearches: fixed (but see below)
    • context sub menus: done

    Multi-stage regex and history will have to wait a bit longer I'm afraid Sad. Concerning multi-stage regex: how should we specify input/output from one stage to the next?

    Until now, subsearches would inherit any parameters from the main search if they were not specified. This leads to the problem you describe. I've thought about a way to keep this behaviour but get rid of the problem, but did not find anything that pleased me. I saw that you were not using that 'feature' anyway (except maybe for the isFeed parameter) so I just got rid of it thus solving that problem.[/list]
    « Last Edit: February 05, 2010, 07:41:58 AM by phitsc » Logged

    Perry Mowbray
    N.A.N.Y. Organizer
    Charter Member
    ***
    Posts: 1,807



    Thoughtful Scribbles

    see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
    « Reply #31 on: February 05, 2010, 07:40:14 AM »

    That's way cool  Thmbsup

    If you do something like the following (that is adding author to the caption) you can also search by author  smiley

    You can also add simple html to the output if you like, and add context menus...

    Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
    1. description=AutoHotkey Script Listing
    2. searchUrl=http://www.autohotkey.com/wiki/index.php?title=Script_Listing
    3. resultPattern=<p><a href="([^"]+)" class="external text" title="[^"]+" rel="nofollow">([^>]+)</a> by <a href="([^"]+)" class="external text" title="[^"]+" rel="nofollow">([^>]+)</a>
    4. farrCaption=$2 :: $4
    5. farrGroup=<i>Written by $4</i>
    6. farrPath=$1
    7. isFeed=true
    8. contextCaption1=Open $4's Profile
    9. contextIcon1=autohotkeyscripts.ico
    10. contextHint1=Open $4's Profile
    11. contextPath1=$3
    Logged

    phitsc
    Honorary Member
    **
    Posts: 1,010



    see users location on a map View Profile Give some DonationCredits to this forum member
    « Reply #32 on: February 05, 2010, 07:49:36 AM »

    I've just done a very quick search config for DevCheatSheets is on this thread.
    Cheers! And I have done one that uses the site's search engine:

    Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
    1. description=Cheat sheets for developers
    2. searchUrl=http://devcheatsheet.com/search/?q=
    3. resultPattern=<h2><a href="([^"]*)" title="[^"]*">(.*)</h2>\s*Source: <a href="([^"]*)" title="[^"]*">(.*)</a><br>\s*(.*)<br>\s*Tag(?:s)?: <a href="([^"]*)" title="[^"]*">(.*)</a><br>
    4. farrCaption=$2
    5. farrGroup=Source: $4, $5
    6. farrPath=$1

    I'll merge this as a subsearch into yours if you don't mind.
    Logged

    Perry Mowbray
    N.A.N.Y. Organizer
    Charter Member
    ***
    Posts: 1,807



    Thoughtful Scribbles

    see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
    « Reply #33 on: February 05, 2010, 07:58:01 AM »

    I'll merge this as a subsearch into yours if you don't mind.

    I actually had the same thought about yours  Wink I was going to say why don't you add mine as a subSearch on yours: +tag, +tag2, +tag3, etc

    ...that way when you type cheatsheets and it'll wait for your input and then you can +tag to get the tag list??
    Logged

    ewemoa
    Honorary Member
    **
    Posts: 2,479



    View Profile Give some DonationCredits to this forum member
    « Reply #34 on: February 05, 2010, 07:59:25 AM »

    If you do something like the following (that is adding author to the caption) you can also search by author  smiley

    Nice!


    Quote from: Perry Mowbray
    You can also add simple html to the output if you like, and add context menus...

    Thank you for your generous teachings, master  Grin
    Logged
    Perry Mowbray
    N.A.N.Y. Organizer
    Charter Member
    ***
    Posts: 1,807



    Thoughtful Scribbles

    see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
    « Reply #35 on: February 05, 2010, 08:43:07 AM »

    Multi-stage regex and history will have to wait a bit longer I'm afraid Sad. Concerning multi-stage regex: how should we specify input/output from one stage to the next?

    What can I say? I can't wait to play!!!

    With the RegEx: do you think we can do it very simply and extensible:
    resultPattern=...
    resultPattern2=...
    resultPattern3=

    and each 2+ takes the Matched String from the previous as it's input? I can only see a use for getting a block of content initially, so I can't see any benefit in passing all the grouped matches? Can you??

    Maybe a new keyword %MATCH%?

    Is a RegEx replace possible? could you specify replacePattern= so effectively it would Regex.Replace(%MATCH%,"resultPattern","replacePattern")
    Logged

    ewemoa
    Honorary Member
    **
    Posts: 2,479



    View Profile Give some DonationCredits to this forum member
    « Reply #36 on: February 09, 2010, 05:29:33 AM »

    I'd like to be able to specify local files for searchUrl (e.g. for a local copy of the autohotkey script listing page).

    Is it possible to do this already and if so, is there a way to do it without specifying absolute paths?
    Logged
    phitsc
    Honorary Member
    **
    Posts: 1,010



    see users location on a map View Profile Give some DonationCredits to this forum member
    « Reply #37 on: February 09, 2010, 05:37:00 AM »

    I'd like to be able to specify local files for searchUrl (e.g. for a local copy of the autohotkey script listing page).

    Is it possible to do this already and if so, is there a way to do it without specifying absolute paths?

    You mean instead of searching in a file downloaded from the web, you want to search in a local file?
    Logged

    ewemoa
    Honorary Member
    **
    Posts: 2,479



    View Profile Give some DonationCredits to this forum member
    « Reply #38 on: February 09, 2010, 07:34:43 AM »

    You mean instead of searching in a file downloaded from the web, you want to search in a local file?

    Exactly.
    Logged
    phitsc
    Honorary Member
    **
    Posts: 1,010



    see users location on a map View Profile Give some DonationCredits to this forum member
    « Reply #39 on: February 09, 2010, 08:57:40 AM »

    Is it possible to do this already and if so, is there a way to do it without specifying absolute paths?
    It's not currently possible. If not absolute, relative to what would you like to specify it?
    Logged

    Perry Mowbray
    N.A.N.Y. Organizer
    Charter Member
    ***
    Posts: 1,807



    Thoughtful Scribbles

    see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
    « Reply #40 on: February 09, 2010, 04:09:58 PM »

    I'd like to be able to specify local files for searchUrl (e.g. for a local copy of the autohotkey script listing page).

    Is it possible to do this already and if so, is there a way to do it without specifying absolute paths?

    You mean instead of searching in a file downloaded from the web, you want to search in a local file?

    What a nice idea!  Thmbsup

    What about the output of a executable? That would be interesting...
    Logged

    ewemoa
    Honorary Member
    **
    Posts: 2,479



    View Profile Give some DonationCredits to this forum member
    « Reply #41 on: February 10, 2010, 06:02:56 AM »

    It's not currently possible. If not absolute, relative to what would you like to specify it?

    Ok, thanks for the answer.

    By "without specifying absolute paths" I was hoping for something along the lines of what's described below.  Sorry for the vagueness.

    • One idea is to be able to specify a path using FARR's "virtual folder" functionality as mentioned in the "Variable Replacements, Virtual Folder Names, Env Paths" section of the help file.  For example, being able to use %APPDRIVE%, %PLUGINDIR%, and the like as part of the path specification.  For reference, I believe "resolve" described in the "Values Getable by Plugins" section of the FARR help file can help with this.
    • Another is to be able to apply user variables.  For example, I have something like the following defined in the [Paths] section of my user variables:

        par=%APPDRIVE%\apps

      So using:

        %uservar.Paths.par%

      as part of a path.
    • The last idea is for non-absolute paths to be resolved relative the FarrWebMetaSearch plugin (or perhaps searches) directory.

    Any of these would help with my portable set up smiley
    Logged
    ewemoa
    Honorary Member
    **
    Posts: 2,479



    View Profile Give some DonationCredits to this forum member
    « Reply #42 on: February 10, 2010, 06:19:40 AM »

    What about the output of a executable? That would be interesting...

    That does sound interesting.  Haven't thought of a good use for it yet though smiley
    Logged
    Alien282
    Participant
    *
    Posts: 6

    View Profile Give some DonationCredits to this forum member
    « Reply #43 on: April 24, 2010, 06:27:56 PM »

    Hello,

    Thanks for a really nice plugin! I needed Google search (strange that nobody has asked for that yet?), especially with calculator and converter support - that is, I wanted to be able to input "50 eur in usd" and get the answer from Google. "50 km in miles" works too. Here is the conf file:

    Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
    1. description=Google
    2. searchUrl=http://www.google.com/search?q=
    3. resultPattern=(?:<td>\s*<img src="?/images/calc_img\.gif"? width="?40"? height="?30"? alt="">.*?<h2 class="?r"? style="font-size:138%">\s*<b>(.*?)</b>\s*</h2>|<h3 class="?r"?>\s*<a href="(.+?)" class="?l"?.*?>(.*?)</a>\s*</h3>.*?<div class=(?:s|"s hc".*?|"s")>(.*?)<br>)
    4. farrCaption=$1$3
    5. farrGroup=$1$4
    6. farrPath=$1$2

    I haven't tested it too extensively, but it is supposed to work. smiley I've attached a picture to see how it works.

    BTW, since I am a bit new to FARR, I am not sure how (or even if) I could make an alias or something that allowes me to type "gs " and after that it should work as if I had written "wms google " and make a live search to google with whatever I am typing?

    P.S. aaah yes, and is it possible to have text in itallics or bold, or different color in the results window? Strangely enough, FARR seems to "cope" with the markup coming from Google - it ignores it. smiley


    * google.png (56.23 KB, 920x462 - viewed 173 times.)
    « Last Edit: April 24, 2010, 06:50:17 PM by Alien282 » Logged
    satch
    Participant
    *
    Posts: 5


    View Profile Give some DonationCredits to this forum member
    « Reply #44 on: April 24, 2010, 06:56:10 PM »

    I was just wondering if it could be easy to develop a config file for wordpress based sites. At work we use p2 theme for colaboration and it could be so cool to be able to search without opening browser. I've taken a look to sourcecode, but I can't find a way to search both posts and comments in a single search, as information could be in a reply. Using p2 it doesn't seem like a blog anymore, it seems more like twitter, so searching both makes a lot of sense. You can check a sample site here http://p2demo.wordpress.com

    I'm getting to addicted to FARR. I was mad looking for Launchy plugins, then found FARR and there is no step back. You, FARR community make it so awesome.
    Logged
    Perry Mowbray
    N.A.N.Y. Organizer
    Charter Member
    ***
    Posts: 1,807



    Thoughtful Scribbles

    see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
    « Reply #45 on: April 25, 2010, 03:09:41 AM »

    P.S. aaah yes, and is it possible to have text in itallics or bold, or different color in the results window? Strangely enough, FARR seems to "cope" with the markup coming from Google - it ignores it. smiley

    Yes: you just set it in your definition -- simple html format works fine. something like
    Formatted for HTML with the GeSHI Syntax Highlighter [copy or print]
    1. <i>$2</i>
    works OK: I've used that in my onelook search.
    Logged

    phitsc
    Honorary Member
    **
    Posts: 1,010



    see users location on a map View Profile Give some DonationCredits to this forum member
    « Reply #46 on: April 26, 2010, 03:48:13 AM »

    ... I needed Google search (strange that nobody has asked for that yet?), especially with calculator and converter support - that is, I wanted to be able to input "50 eur in usd" and get the answer from Google. "50 km in miles" works too. ...
    The reason for this is that there's s.newave's GooglePlus plugin that covers google search (and in a very sophisticated way). Not sure if it can do conversions and stuff though.

    Anyway, I'll gladly include your google search in the next Farr WMS release.
    Logged

    Alien282
    Participant
    *
    Posts: 6

    View Profile Give some DonationCredits to this forum member
    « Reply #47 on: April 26, 2010, 12:55:25 PM »

    Yes: you just set it in your definition -- simple html format works fine. something like
    Formatted for HTML with the GeSHI Syntax Highlighter [copy or print]
    1. <i>$2</i>
    works OK: I've used that in my onelook search.

    hm, the markup from Google contains <em></em> tags, but I don't see any effect in FARR (other than they are gone from the text). Probably if I could do search and replace in the results... cheesy

    The reason for this is that there's s.newave's GooglePlus plugin that covers google search (and in a very sophisticated way). Not sure if it can do conversions and stuff though.

    Yes, I have GooglePlus, but as you said it doesn't have the calculator/converter support which is actually the thing I wanted the most. Here, having regular expressions, that's easy enough. smiley Otherwise, the google search is not that useful, because you can't see the WHOLE description and the keywords found aren't highlighted (that is why I was asking about the em tags).
    Logged
    skajfes
    Honorary Member
    **
    Posts: 204


    View Profile Give some DonationCredits to this forum member
    « Reply #48 on: April 30, 2010, 07:46:06 PM »

    How can I copy the result to clipboard?
    Logged

    It is impossible to make anything foolproof because fools are so ingenious.
    ewemoa
    Honorary Member
    **
    Posts: 2,479



    View Profile Give some DonationCredits to this forum member
    « Reply #49 on: June 23, 2010, 03:48:38 PM »

    I'd like to be able to specify local files for searchUrl (e.g. for a local copy of the autohotkey script listing page).

    Is it possible to do this already and if so, is there a way to do it without specifying absolute paths?

    You mean instead of searching in a file downloaded from the web, you want to search in a local file?
    Any chance you might be motivated to work on this?

    I'd like to use it for things like:

      http://www.stoicjoker.com...eys/Main.php?Target=WinXP
    Logged
    Pages: Prev 1 [2] 3 4 Next   Go Up
      Reply  |  New Topic  |  Print  
     
    Jump to:  
       Forum Home   Thread Marks Chat! Downloads Search Login Register  

    DonationCoder.com | About Us
    DonationCoder.com Forum | Powered by SMF
    [ Page time: 0.08s | Server load: 0.17 ]