|
Werizon
|
 |
« on: May 08, 2010, 03:20:58 PM » |
|
Just a request I use dictionary.com very often and it would be great if I could search definitions on this site in FARR
|
|
|
|
|
Logged
|
|
|
|
|
mouser
|
 |
« Reply #1 on: May 08, 2010, 03:40:16 PM » |
|
type in the search bar: define WHATEVERWORDYOUWANTHERE
the included "define" alias already knows about 15 different dictionary websites it can search, including dictionary.com
|
|
|
|
|
Logged
|
|
|
|
|
Werizon
|
 |
« Reply #2 on: May 12, 2010, 10:50:13 AM » |
|
oh great:] i have to read help, maybe i find other treasures:] thanks for replaying
one more question;p is there any chance to add urbandictionary to this list?
|
|
|
|
|
Logged
|
|
|
|
|
|
mouser
|
 |
« Reply #3 on: May 12, 2010, 10:53:40 AM » |
|
is there any chance to add urbandictionary to this list? good idea, i will do so for next release.
|
|
|
|
|
Logged
|
|
|
|
|
mouser
|
 |
« Reply #4 on: May 12, 2010, 11:07:31 AM » |
|
if you want to use it now, unpack this into your FindAndRunRobot/AliasGroups/Installed/Core_Aliases folder Core_Aliases.zip (2.78 KB - downloaded 58 times.)
|
|
|
|
|
Logged
|
|
|
|
|
Werizon
|
 |
« Reply #5 on: May 12, 2010, 05:19:32 PM » |
|
thank you:] now i see how to add my own searches:] thank you again:] Find and Run Robot is incredible:] another question, the last one;p is there any easy way that i can get result page displayed in Find and Run Robot window? is there any easy way to achieve this: i added this search to file you posted http://www.ling.pl/indexalt.php?word=brickand i know that important part of html that i want to see in application window is between <div id='main'></div> is there a way to put only this part in my Find and Run Robot window?
|
|
|
|
« Last Edit: May 12, 2010, 05:35:23 PM by Werizon »
|
Logged
|
|
|
|
|
mouser
|
 |
« Reply #6 on: May 12, 2010, 05:32:39 PM » |
|
two comments: now i see how to add my own searches: keep in mind that you shouldn't edit and modify the alias files in the "Installed" subdirectory (like where the Core-Linguistics.alias file is), because it will get overwritten when FARR is updated(!). If you really wanted to make your own define alias you could first COPY it from that alias file into your own one in the "MyCustom" alias directory, and disable the built-in one so yours is used instead. It's a bit tricky but it lets us keep the build in aliases updated. is there any easy way that i can get result page displayed in Find and Run Robot window? there is, but you'll have to make your own custom alias for that. to do this, check out the "igo" alias in the Core-Internet.alias file (note that you can view and edit these alias files from within FARR in the Alias/Groups tab, or edit the files directly with a text editor). the igo alias uses the following result to show a web page in the internal farr window: Internal Surf to $$1 | htmlviewurl $$1 so you see all you have to do is specify "htmlviewurl" in front of the url to have it opened internally. good luck creating your own custom aliases! 
|
|
|
|
|
Logged
|
|
|
|
|
Werizon
|
 |
« Reply #7 on: May 12, 2010, 05:41:10 PM » |
|
ok this is really last question;p is there a way to display only part of page i mean something like this i add sutom alias i.e. http://www.ling.pl/indexalt.php?word=$$1 and i know that important part of html that i want to see in application window is between <div id='main'></div> is there a way to put only this part in my Find and Run Robot window? i understand tha i can sometimes need to load the whole page to display site correctly but is there a way to hide everything besides interesting part "<div id='main'></div>" sorry for my english
|
|
|
|
|
Logged
|
|
|
|
|
mouser
|
 |
« Reply #8 on: May 12, 2010, 05:45:09 PM » |
|
is there a way to put only this part in my Find and Run Robot window? now that is a great question.. the answer is no, and maybe in future. there is no currently easy way to do what you want. the ability to specify a regex to apply on a webpage before displaying would make for a great plugin -- i hope someone will make it. there are other plugins that do this kind of thing internally for specific sites, but what we really could use is a plugin that can be invoked by aliases that do exactly what you are wanting, take a url and a regex pattern to match to build what to display and then display it. there is also the WebMetaSearch plugin which is infinitely more complex than what you are requesting, and isn't really suited for what you want, but is related so i thought i'd mention it.
|
|
|
|
|
Logged
|
|
|
|
|
ewemoa
|
 |
« Reply #9 on: May 12, 2010, 08:28:32 PM » |
|
The following has some possibly related info:
http://www.donationcoder.com/forum/index.php?topic=12128.msg137164#msg137164
|
|
|
|
« Last Edit: May 12, 2010, 08:43:34 PM by ewemoa »
|
Logged
|
|
|
|
|
mouser
|
 |
« Reply #10 on: May 12, 2010, 08:32:35 PM » |
|
ewe is being modest as always.. it's not "possibly related", it's actually a plugin that ewemoa made that is exactly what you want.
|
|
|
|
|
Logged
|
|
|
|
|
ewemoa
|
 |
« Reply #11 on: May 12, 2010, 08:44:06 PM » |
|
The version of Webgrab mentioned in the aforementioned topic is dated. Below is a link to one that seems to work for some cases: http://ewemoa.dcmembers.com/tmp/Webgrab.zipIf there is interest, perhaps this version can be modified appropriately or a separate implementation can be attempted.
|
|
|
|
|
Logged
|
|
|
|
|
mouser
|
 |
« Reply #12 on: May 12, 2010, 08:59:57 PM » |
|
I think webgrab would have to be modified to optionally display the result in html mode, as it currently tries to display results in memo mode. <mouser> what you need is an option to allow it to output to html mode <mouser> you could simply autodetect by looking for one of some common text <mouser> like <mouser> <a href or <div or <ul <mouser> if any of those are found, use the showhtml <mouser> instead of showmemo
|
|
|
|
|
Logged
|
|
|
|
|
mouser
|
 |
« Reply #13 on: May 12, 2010, 09:00:45 PM » |
|
also this would be a perfect case where pcommand would be useful -- so that one doesnt have to change the search text with restartsearch in order to trigger it.
|
|
|
|
|
Logged
|
|
|
|
|
ewemoa
|
 |
« Reply #14 on: May 13, 2010, 07:03:58 AM » |
|
mouser found plenty of things to improve in the latest available version so I'm working on addressing some of those things.
Hope to have some news on this before long.
|
|
|
|
|
Logged
|
|
|
|
|
ewemoa
|
 |
« Reply #15 on: May 13, 2010, 09:11:06 AM » |
|
is there a way to display only part of page i mean something like this i add sutom alias i.e. http://www.ling.pl/indexalt.php?word=$$1 and i know that important part of html that i want to see in application window is between <div id='main'></div> is there a way to put only this part in my Find and Run Robot window? i understand tha i can sometimes need to load the whole page to display site correctly but is there a way to hide everything besides interesting part "<div id='main'></div>" Depending on what it is you want to do, I think you may be disappointed in Webgrab. The plugin lets you extract information from HTML and reformat, but it's not going to get you images, style sheets, etc. But, FWIW, below is the latest: http://ewemoa.dcmembers.com/tmp/Webgrab.zipSHA1: 6e83bda1a192dfee82b1a1e94458de89ab071c80 Usage has changed since earlier. A snippet from the included README.txt: In the 'Result(s) - programs, ...' text area of the Edit Alias Dialog, one might specify: pcommand webgrab http://www.urbandictionary.com/define.php?term=$$u1 `<table id='entries'>([\s\S]*)<div id='paginator'>` `%1` html The URL (what to get) is: http://www.urbandictionary.com/define.php?term=$$u1 the regular expression (what to pay attention to) is: <table id='entries'>([\s\S]*)<div id='paginator'> and the template string (how to present) is: %1 N.B. The latter two are surrounded by backticks ` to help the plugin understand what information it is being given. This example alias ends with: html which tells Webgrab to display the results as HTML. This example makes use of user input, so it is important to specify an appropriate value for "Regular Expression Pattern". For example, if "Alias Trigger Text" has the value: testwg One might specify a value of: ^testwg (.*) for "Regular Expression Pattern". Reminder: a backtick character ` is used for quoting the regular expression and the formatting template.The README.txt contains more detail and examples. Please note that the backtick character ` (the backwards single quote) is used for surrounding the regular expression and the template string.
|
|
|
|
|
Logged
|
|
|
|
|
ewemoa
|
 |
« Reply #16 on: May 15, 2010, 04:32:46 PM » |
|
Below is another example use: [ copy or print] webgrab donationcoder | pcommand webgrab http://www.donationcoder.com `<!-- DCAP- LEFTSIDEBAR TOP SUPERSHORT -->[^<]+<p class="sph">([^<]+)</p>[^<]+<p class="sp"><img src="[^"]+" alt=""/>([^<]+)</p>[^<]+<p class="sp"><a href\s*=\s*"([^"]+)">([^<]+)</a></p>` `%1 %2 <a href="http://www.donationcoder.com%3">%4</a>` html Note that when constructing regular expressions, one may have less problems if working off of the original HTML source from the server and not the "processed" version. Specifically, under Firefox, "View Selection Source" will provide "DOM Source of Selection", while "View Page Source" will give something that is closer to (if not) the original HTML source. There were at least two differences that showed up while working on the example above.
|
|
|
|
« Last Edit: May 15, 2010, 04:38:10 PM by ewemoa »
|
Logged
|
|
|
|
|
ewemoa
|
 |
« Reply #17 on: May 15, 2010, 05:02:01 PM » |
|
An example for latest topic at DC forums: [ copy or print] webgrab donationcoder - latest topic | pcommand webgrab http://www.donationcoder.com/forum/index.php?action=rtopicsdense;sort=creation `Creation Date</td>[^<]+</tr></tr><tr><td colspan="5"><hr/></td></tr>[^<]+<tr>[^<]+<td align="right" valign="middle" nowrap="nowrap" class="smalltext">\[([^\]]+)\]</td>[^<]+<td valign="top" class="orangemed"><a href="([^"]+)">([^<]+)</a></td>` `[%1] <a href="%2">%3</a>` html This is just for illustration purposes, FarrWebMetaSearch might be more appropriate for this type of thing (especially if you want to see more than one topic).
|
|
|
|
|
Logged
|
|
|
|
|
Werizon
|
 |
« Reply #18 on: May 27, 2011, 04:39:56 AM » |
|
Does Webgrab working in newest FARR ? i cant get it work now only something about 0 results displays
|
|
|
|
|
Logged
|
|
|
|
|
phitsc
|
 |
« Reply #19 on: May 27, 2011, 07:49:38 AM » |
|
I was thinking / playing around with something similar recently. Basically, what I want is make use of the feature DuckDuckGo calls zero-click. Google and Yahoo have it as well, although I don't know if they have given it a name (they probably did). When you use one of these search engines, they will show some info relevant to your search which is not a URL search result item right at the top. I think these are perfect for use within FARR. E.g. I want to type stuff like: alias 10€ to $ alias translate donation to german alias 123 * 456 etc.
I want an alias like search offering searching for a supplied phrase in both google and duckduckgo, but show the result in FARR's internal html view (like igo does). Actually, I've made an alias that does just that, but there are certain things that don't seem to work as expected. I'll make a separate post describing my findings.
|
|
|
|
|
Logged
|
|
|
|
|
Werizon
|
 |
« Reply #20 on: May 27, 2011, 02:54:05 PM » |
|
Ok Webgrab is working now:p I have another question How to add allias I mean i have command like this webgrab http://dictionary.reference.com/browse/$$1 `<div id="rpane">([\s\S]*)<div id="v2" class="sep_top">` `%1` html and i want to run this by command like dict $$1
|
|
|
|
|
Logged
|
|
|
|
|
mouser
|
 |
« Reply #21 on: May 29, 2011, 09:34:25 AM » |
|
Hi Werizon, Your question is a perfect one for using the webgrab plugin, and ewemoa, the author of the webgrab plugin, suggested the solution to me in a personal message: You can accomplish what you want using the dosearchontrigger command. Here is the alias import text; you can go to the alias tab, open up myaliases.alias and right-click to "import" this: Formatted for Generic Code with the GeSHI Syntax Highlighter [ copy or print] 1000>>>mdict>->search reference.com for "$$1" | dosearchontrigger webgrab http://dictionary.reference.com/browse/$$1 `<div id="rpane">([\s\S]*)<div id="v2" class="sep_top">` `%1` html>+>^mdict (.+)$
Alternatively here is a screenshot of the alias:  Essentially what you are doing here is telling FARR to *perform* the webgrab "search" after the user types something that matches the expression "mdict blah.." and then hits enter; so this acts as if the user had typed "webgrab http://...." with the $$1 replaced.
|
|
|
|
|
Logged
|
|
|
|
|
Werizon
|
 |
« Reply #22 on: May 30, 2011, 06:13:41 AM » |
|
Thanks for reply:] few days ago i thougt about the same solution:] i even make few instant search aliases with dosearch:] but using instant sometimes causes little lags and something looking like a bug i mean when i type slowly everything is alright but typping fast causes losing letters instead of brick i get bric
sorry for my english:]
|
|
|
|
|
Logged
|
|
|
|
|
ewemoa
|
 |
« Reply #23 on: May 31, 2011, 07:05:00 AM » |
|
Did you try dosearchontrigger? dosearchontrigger STRING TO SEARCH FOR - doesn't change the editbox but causes FARR to display results as if user had typed the string. very useful in conjunction with regular expression patterns. like dosearch but only happens when user hits Enter.
|
|
|
|
|
Logged
|
|
|
|
|