<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Codeistry blog &#187; fish</title>
	<atom:link href="http://codeistry.com/blog/tag/fish/feed/" rel="self" type="application/rss+xml" />
	<link>http://codeistry.com/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 19 Apr 2011 21:59:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>gcalc: a command line version of Google Calculator</title>
		<link>http://codeistry.com/blog/2009/04/gcalc-command-line-version-of-google-calculator/</link>
		<comments>http://codeistry.com/blog/2009/04/gcalc-command-line-version-of-google-calculator/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 15:17:26 +0000</pubDate>
		<dc:creator>Duncan Lock</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fish]]></category>
		<category><![CDATA[gcalc]]></category>
		<category><![CDATA[offtopic]]></category>

		<guid isPermaLink="false">http://www.codeistry.com/blog/?p=272</guid>
		<description><![CDATA[Here’s a command line version of Google Calculator: Download gcalc here: http://www.codeistry.com/assets/files/gcalc.zip It’s a little python script that talks to Google, using it&#8217;s calculator syntax. You&#8217;ll get the same answers if you type the queries into google To use the script, just download the zip file, extract the file inside and put it somewhere on [...]]]></description>
			<content:encoded><![CDATA[<p>Here’s a <a href="http://www.codeistry.com/assets/files/gcalc.zip">command line version of Google Calculator</a>:<a href="http://www.codeistry.com/assets/files/gcalc.zip"><img class="alignnone size-full wp-image-280" title="gcalc command line tool in use" src="http://www.codeistry.com/blog/wp-content/uploads/2009/04/screenshot34.png" alt="gcalc command line tool in use" width="574" height="359" /></a></p>
<p><a href="http://www.codeistry.com/assets/files/gcalc.zip">Download gcalc here: http://www.codeistry.com/assets/files/gcalc.zip</a></p>
<p><img class="alignleft size-full wp-image-285" title="Using Google Calculator in firefox's search box." src="http://www.codeistry.com/blog/wp-content/uploads/2009/04/screenshot36.png" alt="Using Google Calculator in firefox's search box." width="217" height="138" />It’s a little python script that talks to Google, using it&#8217;s calculator syntax. You&#8217;ll get the same answers if you type the queries into google</p>
<p>To use the script, just download the zip file, extract the file inside and put it somewhere on your path; I&#8217;ve started putting these kind of things in <kbd>~/bin</kbd>. I originally found the script here (http://vrai.net/page.php?block=scripts) but it didn’t work too well, so I fixed it up. I&#8217;ve tested it on Linux, but it should work anywhere Python is installed.</p>
<p>If you’re using that script on Linux, then <kbd>chmod +x gcalc</kbd> it to allow it to be executed. If you&#8217;re using Windows, you might have to add &#8216;.py&#8217; to the end of the filename. Then the syntax is very simple:</p>
<p><kbd>gcalc “1 hour 5 minutes in seconds”</kbd><br />
1 hour 5 minutes = 3900 seconds</p>
<p><kbd>gcalc “100 + 2 * 5″</kbd><br />
100 + (2 * 5) = 110</p>
<p><kbd>gcalc “41000 yen in british pounds”</kbd><br />
41,000 Japanese yen = 277.129372 British pounds</p>
<p>Here are <a href="http://www.google.co.uk/help/calculator.html">complete instructions on the syntax that Google Calculator supports</a>.</p>
<p>Also, in the screenshot above I&#8217;m using Fish, the Friendly Interactive SHell because it does nice syntax highlighting, amongst many other cool things. <a title="Friendly Interactive Shell" href="http://www.ibm.com/developerworks/aix/library/au-spunix_fish/?ca=dgr-jw06GoFish&amp;S_TACT=105AGX59&amp;S_CMP=GRsitejw06">Fish is here</a>, if you want it.</p>
<p>Have fun!</p>
<p><strong>Update</strong>: 2011-04-19: I&#8217;ve updated the script to work again, after Google markup changes broke it.</p>
]]></content:encoded>
			<wfw:commentRss>http://codeistry.com/blog/2009/04/gcalc-command-line-version-of-google-calculator/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

