<?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>LiquidFoot &#187; google</title>
	<atom:link href="http://www.liquidfoot.com/tag/google/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.liquidfoot.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 02 Jan 2012 22:56:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Library Search Google Gadget</title>
		<link>http://www.liquidfoot.com/2009/01/15/library-search-google-gadget/</link>
		<comments>http://www.liquidfoot.com/2009/01/15/library-search-google-gadget/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 16:26:18 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[igoogle]]></category>
		<guid isPermaLink="false">http://www.liquidfoot.com/?p=223</guid>
		<description><![CDATA[I’ve been going through a bunch of old stuff I’ve written as I clean up things. There will be a rash of posts where I take code I’ve written in different projects to see how things work and that are potentially useful, just no implemented in anything that I may need in the future. The first one here is some code for a Google gadget I wrote to search our online catalog a few years ago when the API was released.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been going through a bunch of old stuff I&#8217;ve written as I clean up things. There will be a rash of posts where I take code I&#8217;ve written in different projects to see how things work and that are potentially useful, just no implemented in anything that I may need in the future. The first one here is some code for a Google gadget I wrote to search our online catalog a few years ago when the API was released.</p>
<p>If you&#8217;re not one of the of the cool kids who uses <a href="http://www.google.com/ig">iGoogle</a>, you&#8217;ll need to set yourself up to use this code. I just looked at the <a href="http://code.google.com/apis/gadgets/docs/dev_guide.html">developer&#8217;s guide</a>, and it seems a bit more fleshed out than it was when I first took a whack at the code <img src='http://www.liquidfoot.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  The really cool thing about these gadgets is that they are essentailly just an XML file with some JavaScript/HTML thrown in.</p>
<p>I thought it might be a nice feature to just provide a search box for people to launch a catalog search. This is just a simple HTML form.</p>
<pre class="html">&amp;lt;form target="_parent" name="searchform" action="http://lion.wm.edu/uhtbin/cgisirsi/0/0/057/5" id="searchform"&gt;
    &amp;lt;input id="searchInput" style="width: 100%;" name="searchdata1" type="text" accesskey="f" /&gt;
    &amp;lt;input id="library" name="library" type="hidden" value="SWEM" /&gt;
    &amp;lt;input id="user_id" name="user_id" type="hidden" value="SWEPUB" /&gt;
    &amp;lt;input id="sourceid" name="sourceid" type="hidden" value="gadget" /&gt;
&amp;lt;/form&gt;</pre>
<p>This is just HTML code that you would use on any search page. Nothing fancy. Now on to creating the gadget..</p>
<p>There are two parts to the XML code for the spec. The root node (Module) has two elements, ModulePrefs and Content. The ModulePrefs element is relatively straight-forward:</p>
<pre class="xml">&amp;lt;ModulePrefs
    title="Swem Catalog Search"
    height="40"
    description="Search Swem's online catalog from iGoogle"
    author="Wayne Graham"
    author_email="dontspamme@gmail.com" screenshot=""
    author_location="Williamsburg, Virginia"
    title_url="http://swem.wm.edu"&gt;
    &amp;lt;Require feature="analytics" /&amp;gt;
&amp;lt;/ModulePrefs&amp;gt;</pre>
<p>The attributes of the ModulePrefs element (title, height, description, etc.) should be pretty self explanitory. I wanted to be able to track usage of the gadget, so I eneabled Google analytics for the widget by requiring the analytics feature. Now for the meat.</p>
<p>What I did was write a short CSS definition and some JavaScript to actually display a form in the Content element of the Module.</p>
<pre class="xml">&amp;lt;Content type="html"&amp;gt;&amp;lt;![CDATA[
&amp;lt;style&amp;gt;
    #subLibrary {
        font-family:arial, sans-serif;
        font-size:10px;
        color:#676767;
    }
    #link {
        font-family:Garamond, serif;
        font-size:32px;
        color:black;
        text-decoration:none;
    }
    #searchGoButton {
        font-weight:bold;
    }
&amp;lt;/style&amp;gt;
&amp;lt;script&amp;gt;
function displaySearchBar (prefs) {
    var lang = prefs.getString("mylang");
    if (lang == "") {
        lang = prefs.getString(".lang");
    }
    var html =
        '&amp;lt;form target="_parent" name="searchform" action="http://lion.wm.edu/uhtbin/cgisirsi/0/0/0/57/5" id="searchform"&amp;gt;' +
        '&amp;lt;table style="width:100%"&amp;gt;' +
        '&amp;lt;tr&amp;gt;' +
        '&amp;lt;td style="padding-bottom:4px"&amp;gt;' +
        '&amp;lt;a target="_parent" id="link" href="http://lion.wm.edu/uhtbin/webcat"&amp;gt;Catalog&amp;lt;/a&amp;gt;' +
        '&amp;lt;span style="vertical-align: sub;"&amp;gt;Swem&amp;lt;/span&amp;gt;' +
        '&amp;lt;/td&amp;gt;' +
        '&amp;lt;td width=100%&amp;gt;' +
        '&amp;lt;input id="searchInput" style="width:100%" name="searchdata1" type="text" accesskey="f" value="" /&amp;gt;' +
        '&amp;lt;input id="library" name="library" type="hidden" value="SWEM" /&amp;gt;' +
        '&amp;lt;input id="user_id" name="user_id" type="hidden" value="SWEPUB" /&amp;gt;' +
        '&amp;lt;input id="sourceid" name="sourceid" type="hidden" value="gadget" /&amp;gt;' +
        '&amp;lt;/td&amp;gt;' +
        '&amp;lt;td&amp;gt;' +
        '&amp;lt;input type="submit" name="go" id="searchGoButton" value="Search" /&amp;gt;' +
        '&amp;lt;/td&amp;gt;' +
        '&amp;lt;td&amp;gt;' +
        '&amp;amp;amp;nbsp;' +
        '&amp;lt;/td&amp;gt;' +
        '&amp;lt;/tr&amp;gt;' +
        '&amp;lt;/table&amp;gt;'
        '&amp;lt;form&amp;gt;';
    document.write(html);
}
displaySearchBar(new _IG_Prefs(__MODULE_ID__));
_IG_Analytics("analytics-id", "/google-gadget");
&amp;lt;/script&amp;gt;
]]&amp;gt;
&amp;lt;/Content&amp;gt;</pre>
<p>Once you&#8217;re done, you can test everything with the directions on the <a href="http://code.google.com/apis/gadgets/docs/tools.html">Developer Tools page</a>. There are even really nice resources to tell you how to <a href="http://code.google.com/apis/gadgets/docs/tools.html#Host">host this on Google Code</a>.</p>
<p>As a finished product, this is what the gadget looks like in iGoogle:</p>
<p><img class="alignnone size-medium wp-image-235" title="gadget" src="http://www.liquidfoot.com/wp-content/uploads/2009/01/gadget-300x46.png" alt="gadget" width="300" height="46" /></p>
<p>For the folks that use iGoogle as their home page, this can be valuable tool for them. Next up, I need to brush off my code for generating Sherlock/Opensearch extensions for Firefox and IE&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2009/01/15/library-search-google-gadget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Scholar</title>
		<link>http://www.liquidfoot.com/2006/04/21/google-scholar/</link>
		<comments>http://www.liquidfoot.com/2006/04/21/google-scholar/#comments</comments>
		<pubDate>Fri, 21 Apr 2006 23:04:52 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[google]]></category>
		<guid isPermaLink="false">http://www.liquidfoot.com/?p=218</guid>
		<description><![CDATA[While Google Calendar has been getting most of the press these days, I noticed a few new features over at Google Scholar that were quite impressive. First, in an effort to help folks stay up-to-date on current research in a given field (their example is quantum computing), you can change the sort ordering from everything [...]]]></description>
			<content:encoded><![CDATA[<div class="body">
<p>While Google Calendar has been getting most of the press these days, I noticed a few new features over at <a href="http://scholar.google.com/">Google Scholar</a> that were quite impressive.</p>
<p>First, in an effort to help folks stay up-to-date on current research in a given field (their example is <a href="http://scholar.google.com/scholar?q=quantum+computing">quantum computing</a>), you can change the sort ordering from everything to &#8220;<a href="http://scholar.google.com/scholar?q=quantum+computing&amp;hl=en&amp;lr=&amp;scoring=r">Recent articles</a>&#8220;. The good folks at Google then attempt to rank the articles &#8220;by looking at the prominence of the author&#8217;s and journal&#8217;s previous papers, how many citations it already has, when it was written, and so on&#8221; (http://googleblog.blogspot.com/2006/04/keeping-up-with-recent-research.html).</p>
<p>Trying this out for my own personal interests (<a href="http://scholar.google.com/scholar?hl=en&amp;lr=&amp;scoring=r&amp;q=virginia+social+history&amp;btnG=Search">Virginia social history</a>), I was pleasantly surprised at how well the actual results were that got returned. In fact, the top result was Pulitizer Prize winning author Rhyss Isaac&#8217;s <em>Landon Carter&#8217;s Uneasy Kingdon</em>. Not too shabby for a computer algorithm <img src='http://www.liquidfoot.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The other, perhaps more interesting (and more useful) item is the ability to export results to citation managers (you have to set it in the preferences). They currently support BibTeX, EndNote, RefMan, and Refworks. This seems to work reasonably well&#8230;at least for modern works. My test case was a book we&#8217;re digitizing published in 1863 (<em><a href="http://scholar.google.com/scholar?hl=en&amp;lr=&amp;q=%22Bastiles+of+the+North%22&amp;btnG=Search">Bastiles of the North</a></em>). Probably because its from a citation, and not the actual work, I never got to the import stage in RefWorks.</p>
<p>Now, if Google would just open up their search API for GoogleScholar&#8230;</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2006/04/21/google-scholar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

