<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Making a search command &#8211; the easy way!</title>
	<atom:link href="http://geeksbynature.dk/2009/02/20/making-a-search-command-the-easy-way/feed/" rel="self" type="application/rss+xml" />
	<link>http://geeksbynature.dk/2009/02/20/making-a-search-command-the-easy-way/</link>
	<description>because we just can't help it...</description>
	<lastBuildDate>Sat, 13 Mar 2010 20:35:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: hamen</title>
		<link>http://geeksbynature.dk/2009/02/20/making-a-search-command-the-easy-way/comment-page-1/#comment-1245</link>
		<dc:creator>hamen</dc:creator>
		<pubDate>Mon, 01 Jun 2009 22:43:56 +0000</pubDate>
		<guid isPermaLink="false">http://geeksbynature.dk/?p=4#comment-1245</guid>
		<description>Thank you. I guess I gotta begin to run ubiquity from sources :D
I hope you find final implementation soon so we can start to heavily develop. Gee, I absolutely need to make quick POST requests and get results in a preview :D
Too much cool! Thank you for you help and keep on coding ;)</description>
		<content:encoded><![CDATA[<p>Thank you. I guess I gotta begin to run ubiquity from sources <img src='http://geeksbynature.dk/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
I hope you find final implementation soon so we can start to heavily develop. Gee, I absolutely need to make quick POST requests and get results in a preview <img src='http://geeksbynature.dk/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
Too much cool! Thank you for you help and keep on coding <img src='http://geeksbynature.dk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian Sonne</title>
		<link>http://geeksbynature.dk/2009/02/20/making-a-search-command-the-easy-way/comment-page-1/#comment-1244</link>
		<dc:creator>Christian Sonne</dc:creator>
		<pubDate>Mon, 01 Jun 2009 19:33:03 +0000</pubDate>
		<guid isPermaLink="false">http://geeksbynature.dk/?p=4#comment-1244</guid>
		<description>@harmen
Well, aside from reading the docs for makeSearchCommand (this link should take you to your local copy: chrome://ubiquity/content/file.html#index.html#modules/cmdutils.js ) I&#039;d advise you to read the two follow-up articles to this one: http://geeksbynature.dk/?p=24 and http://geeksbynature.dk/?p=30 (the last one has a part called &quot;This is the part that broke your commands&quot;, and skipping that would be unwise :-)

If you run into a situation where the preview you want is not available as anything selectable in the result-page, you can (provided you run a very recent development version) supply a function to preview instead of a string selector, and this will get a single argument, namely the container of the entire result - this of course means that it will only work if you provide a container that groups the result-data. I only just recently pushed this feature, so it is largely untested - expect bugs and changes to the way it works in the future...</description>
		<content:encoded><![CDATA[<p>@harmen<br />
Well, aside from reading the docs for makeSearchCommand (this link should take you to your local copy: chrome://ubiquity/content/file.html#index.html#modules/cmdutils.js ) I&#8217;d advise you to read the two follow-up articles to this one: <a href="http://geeksbynature.dk/?p=24" rel="nofollow">http://geeksbynature.dk/?p=24</a> and <a href="http://geeksbynature.dk/?p=30" rel="nofollow">http://geeksbynature.dk/?p=30</a> (the last one has a part called &#8220;This is the part that broke your commands&#8221;, and skipping that would be unwise <img src='http://geeksbynature.dk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>If you run into a situation where the preview you want is not available as anything selectable in the result-page, you can (provided you run a very recent development version) supply a function to preview instead of a string selector, and this will get a single argument, namely the container of the entire result &#8211; this of course means that it will only work if you provide a container that groups the result-data. I only just recently pushed this feature, so it is largely untested &#8211; expect bugs and changes to the way it works in the future&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hamen</title>
		<link>http://geeksbynature.dk/2009/02/20/making-a-search-command-the-easy-way/comment-page-1/#comment-1239</link>
		<dc:creator>hamen</dc:creator>
		<pubDate>Mon, 01 Jun 2009 11:19:12 +0000</pubDate>
		<guid isPermaLink="false">http://geeksbynature.dk/?p=4#comment-1239</guid>
		<description>@christian
Thank you a lot! It works like a charm! I&#039;d like to add tons of new search command. They are useful for my daily job. Some of them use POST method and/or give back messy html. Can you point me to some docs about using that parser in the right way and taking advantage of all its feature?
Thanks again,
hamen</description>
		<content:encoded><![CDATA[<p>@christian<br />
Thank you a lot! It works like a charm! I&#8217;d like to add tons of new search command. They are useful for my daily job. Some of them use POST method and/or give back messy html. Can you point me to some docs about using that parser in the right way and taking advantage of all its feature?<br />
Thanks again,<br />
hamen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian Sonne</title>
		<link>http://geeksbynature.dk/2009/02/20/making-a-search-command-the-easy-way/comment-page-1/#comment-1228</link>
		<dc:creator>Christian Sonne</dc:creator>
		<pubDate>Sun, 31 May 2009 12:22:34 +0000</pubDate>
		<guid isPermaLink="false">http://geeksbynature.dk/?p=4#comment-1228</guid>
		<description>@gilad I&#039;m pretty sure this got fixed some time ago - can you confirm that it is not an issue in the latest development version?

@harmen it looks to me like you are using the parser parameter as it is described in the above document, however, since then it has changed a lot - and most of those changes are described in the two following articles on this blog (there are other changes too though, but none should break anything - they are all just added features)

Now, urbandictionary is not an ideal place to start when you want to learn, because their markup does not group result-data (which would otherwise make parsing much more reliable), and moreover, it&#039;s not really a search page, so the fact that no result is less than ideal (activating a result will get you a page load error)

Still, for the preview alone, this will do what you want:
CmdUtils.makeSearchCommand({
  name: &quot;urbandictionary&quot;,
  url: &quot;http://www.urbandictionary.com/define.php?term={QUERY}&quot;,
  parser: {title: &quot;td.word&quot;, preview: &quot;td.text&quot;}
});</description>
		<content:encoded><![CDATA[<p>@gilad I&#8217;m pretty sure this got fixed some time ago &#8211; can you confirm that it is not an issue in the latest development version?</p>
<p>@harmen it looks to me like you are using the parser parameter as it is described in the above document, however, since then it has changed a lot &#8211; and most of those changes are described in the two following articles on this blog (there are other changes too though, but none should break anything &#8211; they are all just added features)</p>
<p>Now, urbandictionary is not an ideal place to start when you want to learn, because their markup does not group result-data (which would otherwise make parsing much more reliable), and moreover, it&#8217;s not really a search page, so the fact that no result is less than ideal (activating a result will get you a page load error)</p>
<p>Still, for the preview alone, this will do what you want:<br />
CmdUtils.makeSearchCommand({<br />
  name: &#8220;urbandictionary&#8221;,<br />
  url: &#8220;http://www.urbandictionary.com/define.php?term={QUERY}&#8221;,<br />
  parser: {title: &#8220;td.word&#8221;, preview: &#8220;td.text&#8221;}<br />
});</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hamen</title>
		<link>http://geeksbynature.dk/2009/02/20/making-a-search-command-the-easy-way/comment-page-1/#comment-1210</link>
		<dc:creator>hamen</dc:creator>
		<pubDate>Fri, 29 May 2009 23:25:50 +0000</pubDate>
		<guid isPermaLink="false">http://geeksbynature.dk/?p=4#comment-1210</guid>
		<description>Hi, I&#039;m trying to create a search command for urbandictionary.com. I&#039;m pretty sure it should look like:

&lt;code&gt;
CmdUtils.makeSearchCommand({
  name: &quot;urbandictionary&quot;,
  url: &quot;http://www.urbandictionary.com/define.php?term={QUERY}&quot;,
  icon: &quot;http://www.urbandictionary.com/favicon.ico&quot;,
  parser: {container: &quot;tbody&quot;,
           title: &quot;td.index&quot;,
           preview: &quot;td.definition&quot;},
  description: &quot;Searches www.urbandictionary.com&quot;
});
&lt;/code&gt;

but I cannot get what I expect :-/
Some tips? I really need to understand how to create GET/POST search commands that use preview. Thanks</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;m trying to create a search command for urbandictionary.com. I&#8217;m pretty sure it should look like:</p>
<p><code><br />
CmdUtils.makeSearchCommand({<br />
  name: "urbandictionary",<br />
  url: "http://www.urbandictionary.com/define.php?term={QUERY}",<br />
  icon: "http://www.urbandictionary.com/favicon.ico",<br />
  parser: {container: "tbody",<br />
           title: "td.index",<br />
           preview: "td.definition"},<br />
  description: "Searches <a href="http://www.urbandictionary.com" rel="nofollow">http://www.urbandictionary.com</a>"<br />
});<br />
</code></p>
<p>but I cannot get what I expect :-/<br />
Some tips? I really need to understand how to create GET/POST search commands that use preview. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gilad shoham</title>
		<link>http://geeksbynature.dk/2009/02/20/making-a-search-command-the-easy-way/comment-page-1/#comment-1078</link>
		<dc:creator>gilad shoham</dc:creator>
		<pubDate>Tue, 19 May 2009 15:36:31 +0000</pubDate>
		<guid isPermaLink="false">http://geeksbynature.dk/?p=4#comment-1078</guid>
		<description>i tried to use makeSearchCommand to create command with post parameters, but it added a question mark before the parameter and doesn&#039;t worked because of it.
when i look (with firebug and yslow) on the post parameters when i did manual search there wasn&#039;t a question mark, and when i searched with my command it was a question mark.
what can i do to solve this problem?

thanks.
gilad.</description>
		<content:encoded><![CDATA[<p>i tried to use makeSearchCommand to create command with post parameters, but it added a question mark before the parameter and doesn&#8217;t worked because of it.<br />
when i look (with firebug and yslow) on the post parameters when i did manual search there wasn&#8217;t a question mark, and when i searched with my command it was a question mark.<br />
what can i do to solve this problem?</p>
<p>thanks.<br />
gilad.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Making a search command - part 3 &#171; Geeks By Nature</title>
		<link>http://geeksbynature.dk/2009/02/20/making-a-search-command-the-easy-way/comment-page-1/#comment-28</link>
		<dc:creator>Making a search command - part 3 &#171; Geeks By Nature</dc:creator>
		<pubDate>Thu, 26 Feb 2009 15:27:17 +0000</pubDate>
		<guid isPermaLink="false">http://geeksbynature.dk/?p=4#comment-28</guid>
		<description>[...] of updates is in order. Some of the changes I&#8217;ll mention here affect the previous articles: Making a search command - the easy way! and Making a search command - part 2, so if you&#8217;ve read them: read this one [...]</description>
		<content:encoded><![CDATA[<p>[...] of updates is in order. Some of the changes I&#8217;ll mention here affect the previous articles: Making a search command &#8211; the easy way! and Making a search command &#8211; part 2, so if you&#8217;ve read them: read this one [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Making a search command - part 2 &#171; Geeks By Nature</title>
		<link>http://geeksbynature.dk/2009/02/20/making-a-search-command-the-easy-way/comment-page-1/#comment-11</link>
		<dc:creator>Making a search command - part 2 &#171; Geeks By Nature</dc:creator>
		<pubDate>Mon, 23 Feb 2009 14:09:35 +0000</pubDate>
		<guid isPermaLink="false">http://geeksbynature.dk/?p=4#comment-11</guid>
		<description>[...] Geeks By Nature because we just can&#8217;t help it&#8230;      &#171; Making a search command - the easy way! [...]</description>
		<content:encoded><![CDATA[<p>[...] Geeks By Nature because we just can&#8217;t help it&#8230;      &laquo; Making a search command &#8211; the easy way! [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian Sonne</title>
		<link>http://geeksbynature.dk/2009/02/20/making-a-search-command-the-easy-way/comment-page-1/#comment-7</link>
		<dc:creator>Christian Sonne</dc:creator>
		<pubDate>Sat, 21 Feb 2009 01:19:31 +0000</pubDate>
		<guid isPermaLink="false">http://geeksbynature.dk/?p=4#comment-7</guid>
		<description>POST support was pushed in http://ubiquity.mozilla.com/hg/ubiquity-firefox/rev/5d63a9af1de0 - feel free to test it out and report back :-)</description>
		<content:encoded><![CDATA[<p>POST support was pushed in <a href="http://ubiquity.mozilla.com/hg/ubiquity-firefox/rev/5d63a9af1de0" rel="nofollow">http://ubiquity.mozilla.com/hg/ubiquity-firefox/rev/5d63a9af1de0</a> &#8211; feel free to test it out and report back <img src='http://geeksbynature.dk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian Sonne</title>
		<link>http://geeksbynature.dk/2009/02/20/making-a-search-command-the-easy-way/comment-page-1/#comment-6</link>
		<dc:creator>Christian Sonne</dc:creator>
		<pubDate>Fri, 20 Feb 2009 17:03:43 +0000</pubDate>
		<guid isPermaLink="false">http://geeksbynature.dk/?p=4#comment-6</guid>
		<description>@Wahooney
The +s are actually not needed (but are often used to make it easier for people for link (try pasting a link containing spaces into anywhere that auto-generates links from urls) - but the link actually works just fine without it.

@Alberto Santini
POST would indeed be a good idea, and there&#039;s really no reason not to include it - in fact I&#039;ve just written the code needed to do this, only problem is that we depend on CmdUtils.previewGet and there&#039;s no POST equivalent (yet)

On a side note, as I said in the article: this was very recently added, so the parser argument will first be supported in 0.2pre14 and 0.1.7 - execute is (untill the POST-support lands) unaffected.</description>
		<content:encoded><![CDATA[<p>@Wahooney<br />
The +s are actually not needed (but are often used to make it easier for people for link (try pasting a link containing spaces into anywhere that auto-generates links from urls) &#8211; but the link actually works just fine without it.</p>
<p>@Alberto Santini<br />
POST would indeed be a good idea, and there&#8217;s really no reason not to include it &#8211; in fact I&#8217;ve just written the code needed to do this, only problem is that we depend on CmdUtils.previewGet and there&#8217;s no POST equivalent (yet)</p>
<p>On a side note, as I said in the article: this was very recently added, so the parser argument will first be supported in 0.2pre14 and 0.1.7 &#8211; execute is (untill the POST-support lands) unaffected.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
