<?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>Pressing the Red Button</title>
	<atom:link href="http://www.pressthered.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pressthered.com</link>
	<description>Adventures in Software Development</description>
	<lastBuildDate>Sat, 12 Jul 2014 21:02:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.1</generator>
	<item>
		<title>Importing a List with BulkLoader</title>
		<link>http://www.pressthered.com/importing_a_list_with_bulkloader/</link>
					<comments>http://www.pressthered.com/importing_a_list_with_bulkloader/#comments</comments>
		
		<dc:creator><![CDATA[jim.richmond]]></dc:creator>
		<pubDate>Sat, 19 Jun 2010 06:16:59 +0000</pubDate>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[google app engine]]></category>
		<category><![CDATA[python]]></category>
		<guid isPermaLink="false">http://www.pressthered.com/?p=814</guid>

					<description><![CDATA[The latest bulkloader script (api version 1.3.4) does a much better job of exporting data when you auto generate a .yaml file. However it doesn&#8217;t handle the re-import of lists by default (it just treats them as strings). You can add an inline lambda function to the .yaml file to fix this. This handles lists [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>The latest bulkloader script (api version 1.3.4) does a much better job of exporting data when you auto generate a .yaml file. However it doesn&#8217;t handle the re-import of lists by default (it just treats them as strings). You can add an inline lambda function to the .yaml file to fix this. This handles lists of strings, but it can probably be modified to handle other types.</p>
<p>&#8211; property: mylist<br />
      external_name: mylist<br />
      <strong>import_transform: &#8220;lambda x: len(x) > 0 and eval(x) or &#8221;&#8221;</strong></p>
<p><strong>Why it works:</strong><br />
In your csv, your list should export like so:<br />
&#8220;[u&#8217;item1&#8242;, u&#8217;item2&#8242;, u&#8217;item3&#8242;]&#8221;<br />
Running an eval on this string, converts it to a list. The length check is like if/else statement, if len(x) > 0 convert it else use empty string.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.pressthered.com/importing_a_list_with_bulkloader/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>How to Delete an Index in an AppEngine Datastore</title>
		<link>http://www.pressthered.com/how_to_delete_an_index_in_an_appengine_datastore/</link>
		
		<dc:creator><![CDATA[jim.richmond]]></dc:creator>
		<pubDate>Mon, 19 Apr 2010 03:23:49 +0000</pubDate>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Google AppEngine]]></category>
		<category><![CDATA[python]]></category>
		<guid isPermaLink="false">http://www.pressthered.com/?p=804</guid>

					<description><![CDATA[If using Python, you can delete an index by first removing the entry in your index.yaml file, and then updating your site. Then you must issue this command: appcfg.py vacuum_indexes myapp/ With Django (what I am using), you use this command: manage.py vacuum_indexes What is nice about the process is that, for each index that [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If using Python, you can delete an index by first removing the entry in your index.yaml file, and then updating your site. Then you must issue this command:<br />
<strong>appcfg.py vacuum_indexes myapp/</strong></p>
<p>With Django (what I am using), you use this command:<br />
<strong>manage.py vacuum_indexes</strong></p>
<p>What is nice about the process is that, for each index that has been removed from your index.yaml, it will confirm whether you want to delete it or not. So you get a second chance to make sure you are right. If you delete the wrong index, it&#8217;s going to take some <a href="http://code.google.com/appengine/articles/index_building.html">time for it to rebuild</a>, and portions of your site could be down.</p>
<p><strong>Why do I need this:</strong><br />
I don&#8217;t think you would see a noticeable speed improvement to your data inserts, updates, or deletes by having a few less unused indexes, but it couldn&#8217;t hurt. Also you are limited to 100 indexes (as of April 2010) so this how you free them up.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Google AppEngine: appcfg.py update check failed</title>
		<link>http://www.pressthered.com/google_appengine_appcfgpy_update_check_failed/</link>
		
		<dc:creator><![CDATA[jim.richmond]]></dc:creator>
		<pubDate>Wed, 14 Apr 2010 04:55:18 +0000</pubDate>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Google AppEngine]]></category>
		<category><![CDATA[python]]></category>
		<guid isPermaLink="false">http://www.pressthered.com/?p=800</guid>

					<description><![CDATA[I started getting this error in Windows when running &#8216;manage runserver&#8217; in django on Google AppEngine: appcfg.py update check failed: EOF occurred in violation of protocol This error is related to not having the SSL module for python installed. The easy fix is to install it by running &#8220;easy_install ssl&#8221; from the command prompt. However, [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I started getting this error in Windows when running &#8216;manage runserver&#8217; in django on Google AppEngine:</p>
<p><strong>appcfg.py update check failed: EOF occurred in violation of protocol</strong></p>
<p>This error is related to not having the SSL module for python installed. The easy fix is to install it by running &#8220;easy_install ssl&#8221; from the command prompt. However, using Python 2.5, I received errors and it did not work. </p>
<p>The longer, more involved fix is to compile the SSL module for python. This was a hassle but after about an hour I finally got it working.</p>
<p>Here is the tutorial I used to install the ssl module:<br />
<a href="http://beautifulisbetterthanugly.com/posts/2009/aug/19/compile-ssl-115-python-25-or-lower/">http://beautifulisbetterthanugly.com/posts/2009/aug/19/compile-ssl-115-python-25-or-lower/</a></p>
<p>I also had to follow the troubleshooting section on this link:<br />
<a href="http://wiki.cython.org/InstallingOnWindows">http://wiki.cython.org/InstallingOnWindows</a><br />
because I did not have the python library file (libpython25.a).</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Solving &#8220;InvalidSenderError: Unauthorized sender&#8221; in AppEngine</title>
		<link>http://www.pressthered.com/solving_invalidsendererror_unauthorized_sender_in_appengine/</link>
					<comments>http://www.pressthered.com/solving_invalidsendererror_unauthorized_sender_in_appengine/#comments</comments>
		
		<dc:creator><![CDATA[jim.richmond]]></dc:creator>
		<pubDate>Tue, 09 Mar 2010 06:12:19 +0000</pubDate>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Google AppEngine]]></category>
		<category><![CDATA[python]]></category>
		<guid isPermaLink="false">http://www.pressthered.com/?p=794</guid>

					<description><![CDATA[You might get this message in Google AppEngine when sending an email message and specifying a custom from address. To get it to work you must add the address as a developer for your application (or use the email address you signed up with). Steps to Add a Developer Email Address: Log in to your [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>You might get this message in Google AppEngine when sending an email message and specifying a custom from address. To get it to work you must add the address as a developer for your application (or use the email address you signed up with). </p>
<p><strong>Steps to Add a Developer Email Address:</strong></p>
<ol>
<li>Log in to your Google App Engine Account.</li>
<li>Under Administration, click Permissions, and add the email address.</li>
<li>Log out, and check for the validation email.</li>
</ol>
<p><strong>More Info:</strong><br />
This is quite a hassle. I understand the reason is to cut back on spam but not only do you have to have a valid email account but you must create a google account for it.<br />
In my case, I just wanted to send notifications out but I don&#8217;t monitor the sender address (but I do include a contact link in the email).<br />
Darn spammers!</p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.pressthered.com/solving_invalidsendererror_unauthorized_sender_in_appengine/feed/</wfw:commentRss>
			<slash:comments>10</slash:comments>
		
		
			</item>
		<item>
		<title>Testing Email Locally with AppEngine Patch on Windows</title>
		<link>http://www.pressthered.com/testing_email_locally_with_appengine_patch_on_windows/</link>
		
		<dc:creator><![CDATA[jim.richmond]]></dc:creator>
		<pubDate>Sat, 06 Mar 2010 05:21:52 +0000</pubDate>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Google AppEngine]]></category>
		<guid isPermaLink="false">http://www.pressthered.com/?p=785</guid>

					<description><![CDATA[If you need to get email working on your windows dev machine for Google AppEngine, here is one method: Download Fake Sendmail for Windows. Unzip the files and copy them into a new folder. Add this new folder to your windows PATH, by right clicking on My Computer -> Properties. Click Advanced Tab -> Environmental [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If you need to get email working on your windows dev machine for Google AppEngine, here is one method:</p>
<ol>
<li>Download <a href="http://glob.com.au/sendmail/">Fake Sendmail for Windows.</a> Unzip the files and copy them into a new folder.</li>
<li>Add this new folder to your windows PATH, by right clicking on My Computer -> Properties. Click Advanced Tab -> Environmental Variables. Edit the PATH variable under System variables. Append your path to the end of the string. Do not replace the existing paths, just add it to the end preceded by a semi colon. Ex: &#8220;;c:\apps\fakesendmail&#8221;</li>
<li>In your fakesendmail folder, you must configure the &#8220;sendmail.ini&#8221; file. You have two choices:
<ul>
<li>Use your own custom smtp server settings (if you have one), by setting &#8220;smtp_server&#8221;, &#8220;auth_username&#8221;, &#8220;auth_password&#8221;, and &#8220;default_domain&#8221;</li>
<li>Use Windows default smtp service by setting &#8220;smtp_server&#8221; to &#8220;C:\Inetpub\mailroot\Pickup&#8221; and &#8220;default_domain&#8221; to &#8220;localhost&#8221;. This second choice will not send your emails but most likely will store your emails in the &#8220;C:\Inetpub\mailroot\Queue&#8221;.</li>
</ul>
</li>
<li>Open a new command console (must reopen the console to pick up the new path variable). Run the appengine patch from your apps root folder with the following argument:<br />
<strong> &#8220;manage runserver &#8211;enable_sendmail&#8221;</strong></li>
</ol>
<p><strong>Some Additional Info:</strong><br />
This will resolve the error message &#8220;SMTP AUTH extension not supported by server&#8221;.</p>
<p>These steps were derived from this <a href="http://groups.google.com/group/app-engine-patch/msg/9cca92df4b993d6c?pli=1">google discussion</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Removing U3 from USB Drive</title>
		<link>http://www.pressthered.com/removing_u3_from_usb_drive/</link>
					<comments>http://www.pressthered.com/removing_u3_from_usb_drive/#comments</comments>
		
		<dc:creator><![CDATA[jim.richmond]]></dc:creator>
		<pubDate>Thu, 04 Feb 2010 05:11:19 +0000</pubDate>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[tools]]></category>
		<guid isPermaLink="false">http://www.pressthered.com/?p=776</guid>

					<description><![CDATA[Here is how to remove the U3 application from your USB drive and prevent it from starting up every time you plug in your USB stick. For Windows: Download and run this Windows uninstaller from U3. Works in XP, Vista and Windows 7, and others. Macintosh Follow the sandisk instructions ro remove U3. Additional Information [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Here is how to remove the U3 application from your USB drive and prevent it from starting up every time you plug in your USB stick.</p>
<p><strong>For Windows:</strong><br />
<a href="http://u3uninstall.s3.amazonaws.com/U3Uninstall.exe">Download and run this Windows uninstaller from U3.</a><br />
Works in XP, Vista and Windows 7, and others.</p>
<p><strong>Macintosh</strong><br />
<a href="http://communities.sandisk.com/sandisk/board/message?board.id=u3&#038;thread.id=1066">Follow the sandisk instructions ro remove U3.</a></p>
<p><strong>Additional Information</strong><br />
You can always <a href=" http://u3.com/support/default.aspx#CQ3">visit the U3 support site</a> for more info.</p>
<p><strong>Why Remove It?</strong><br />
I find it annoying that it pops up every time you plug it in and you have wait to use your drive (10 seconds on my machine). I&#8217;d keep it if they made it easier to disable that functionality. However I have been using <a href="http://portableapps.com/">PortableApps</a>, an open alternative to U3. The apps that are available for <a href="http://portableapps.com/">PortableApps</a> are not commercial apps but they suit my needs.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.pressthered.com/removing_u3_from_usb_drive/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Shopper Talk Goes Live</title>
		<link>http://www.pressthered.com/shopper_talk_goes_live/</link>
		
		<dc:creator><![CDATA[jim.richmond]]></dc:creator>
		<pubDate>Mon, 07 Dec 2009 04:15:06 +0000</pubDate>
				<category><![CDATA[Shopper Talk]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[google app engine]]></category>
		<category><![CDATA[twitter]]></category>
		<guid isPermaLink="false">http://www.pressthered.com/?p=740</guid>

					<description><![CDATA[My latest project for Twitter. Try it out! http://shoppertalk.appspot.com It&#8217;s unbreakable. Ok, that&#8217;s not true, but I do need some testers. It&#8217;s a Django app running on Google App Engine. It utilizes the Twitter api and their OAuth implementation (so you can log in with your Twitter account). Currently only the Amazon product catalog is [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>My latest project for Twitter. Try it out! </p>
<p><a href="http://shoppertalk.appspot.com">http://shoppertalk.appspot.com</a></p>
<p>It&#8217;s unbreakable. Ok, that&#8217;s not true, but I do need some testers. </p>
<p>It&#8217;s a <a href="http://djangoproject.com">Django</a> app running on <a href="http://code.google.com/appengine/">Google App Engine</a>. It utilizes the Twitter api and their OAuth implementation (so you can log in with your Twitter account).</p>
<p>Currently only the Amazon product catalog is available for browsing, but more will be added. </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Fixing Desktop.ini popup on Windows Start</title>
		<link>http://www.pressthered.com/fixing_desktopini_popup_on_windows_start/</link>
					<comments>http://www.pressthered.com/fixing_desktopini_popup_on_windows_start/#comments</comments>
		
		<dc:creator><![CDATA[jim.richmond]]></dc:creator>
		<pubDate>Thu, 05 Nov 2009 06:03:08 +0000</pubDate>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">http://www.pressthered.com/?p=729</guid>

					<description><![CDATA[If you have a file called desktop.ini open in Notepad when Windows starts, here is how to fix it. You just need to delete this file from the Program Menu startup folder. Go to the Notepad window that has the desktop.ini file. In the menu, click File -> Save As. In the &#8220;Save as type&#8221;, [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If you have a file called desktop.ini open in Notepad when Windows starts, here is how to fix it. You just need to delete this file from the Program Menu startup folder.</p>
<ol>
<li> Go to the Notepad window that has the desktop.ini file.</li>
<li> In the menu, click File -> Save As.</li>
<li> In the &#8220;Save as type&#8221;, select &#8220;All Files&#8221;.</li>
<li> You will see the desktop.ini file in the list, right click, and select Delete.</li>
<li> Cancel the Save As, and close the Notepad window.</li>
<li> Now it will not appear anymore when you reboot.</li>
</ol>
<p><strong>How Can This Happen:</strong><br />
Most likely it was some installation process that incorrectly placed the file in the startup folder. In my case it was <a href="http://www.mozy.com">Mozy</a> file. </p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.pressthered.com/fixing_desktopini_popup_on_windows_start/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>UrlEncode in Python</title>
		<link>http://www.pressthered.com/urlencode_in_python/</link>
					<comments>http://www.pressthered.com/urlencode_in_python/#comments</comments>
		
		<dc:creator><![CDATA[jim.richmond]]></dc:creator>
		<pubDate>Wed, 04 Nov 2009 05:36:55 +0000</pubDate>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[python]]></category>
		<guid isPermaLink="false">http://www.pressthered.com/?p=719</guid>

					<description><![CDATA[To urlencode a querystring or form data in python you can use the urllib module: use urllib # you have to pass in a dictionary print urllib.urlencode({'id':'100', 'name':'john smith'}) # then you get 'id=100&#038;name=john+smith' Urlencoding Unicode and UTF8 Values #this works fine print urllib.urlencode({name:'José'}) #you have to be careful with unicode strings # this will [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>To urlencode a querystring or form data in python you can use the urllib module:</strong></p>
<pre name="code" class="python">
use urllib
# you have to pass in a dictionary
print urllib.urlencode({'id':'100', 'name':'john smith'})

# then you get 'id=100&name=john+smith'

</pre>
<p><strong>Urlencoding Unicode and UTF8 Values</strong></p>
<pre name="code" class="python">
#this works fine
print urllib.urlencode({name:'José'})

#you have to be careful with unicode strings
# this will throw an error:
print urllib.urlencode({name:u'José'})
# UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in 
# position 11: ordinal not in range

#since the default ascii conversion can't handle the 'é',
# you have to be explicit in what charset you are using
print urllib.urlencode({'name':u'José'.encode('utf8')})

</pre>
<p><strong>Additional Info:</strong><br />
<a href="http://docs.python.org/library/urllib.html#urllib.urlencode">Python Doc for urllib module</a><br />
<a href="http://www.joelonsoftware.com/articles/Unicode.html">Unicode Primer</a></p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.pressthered.com/urlencode_in_python/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>How to Create an IE8 Accelerator</title>
		<link>http://www.pressthered.com/how_to_create_an_ie8_accelerator/</link>
		
		<dc:creator><![CDATA[jim.richmond]]></dc:creator>
		<pubDate>Tue, 03 Nov 2009 06:43:35 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[IE8]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://www.pressthered.com/?p=678</guid>

					<description><![CDATA[Accelerators in Internet Explorer 8 are a new feature that allows you to select text and perform actions on it (like look up a word, map an address, etc.). This tutorial creates an accelerator that lets you select a song title or artist and listen to the music.]]></description>
										<content:encoded><![CDATA[<p>Accelerators in Internet Explorer 8 are a new feature that allows you to select text and perform actions on it (like look up a word, map an address, etc.). This tutorial creates an accelerator that lets you select a song title or artist and listen to the music.</p>
<div id="attachment_682" style="width: 326px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-682" loading="lazy" src="http://www.pressthered.com/wp-content/uploads/2009/11/contextmenu.jpg" alt="IE 8 Context Menu" title="Listen To Music Preview" width="316" height="189" class="size-full wp-image-682" srcset="http://www.pressthered.com/wp-content/uploads/2009/11/contextmenu.jpg 316w, http://www.pressthered.com/wp-content/uploads/2009/11/contextmenu-300x179.jpg 300w" sizes="(max-width: 316px) 100vw, 316px" /><p id="caption-attachment-682" class="wp-caption-text">IE 8 Context Menu</p></div>
<p>Code is included that utilizes a JQuery front-end against a PHP webservice. To get the demo working on your own machine, some familiarity with JQuery and PHP is required.<br />
<strong><br />
Try The Demo</strong></p>
<p>If you are using IE8, you can install the demo with this link:</p>
<p><a href="#" onclick="window.external.AddService('http://www.pressthered.com/musiclookup/lookup.xml');return false;">Install &#8220;Listen To Music&#8221; Accelerator</a></p>
<p>You will get the message below, check the &#8220;Make this my default&#8230;&#8221;, and click Add.<br />
<div id="attachment_683" style="width: 405px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-683" loading="lazy" src="http://www.pressthered.com/wp-content/uploads/2009/11/install.jpg" alt="Install Popup" title="install" width="395" height="289" class="size-full wp-image-683" srcset="http://www.pressthered.com/wp-content/uploads/2009/11/install.jpg 395w, http://www.pressthered.com/wp-content/uploads/2009/11/install-300x219.jpg 300w" sizes="(max-width: 395px) 100vw, 395px" /><p id="caption-attachment-683" class="wp-caption-text">Add Accelerator Popup</p></div></p>
<p>Once you have it installed it, you can select text on a web page and right click to bring up the menu. Hover over &#8220;Listen to Music&#8221; for a selection of available songs.<br />
contextmenu</p>
<p><strong>Try it out by selecting an artist or title below:</strong></p>
<p><i>Michael Jackson seems to be popular, and who doesn&#8217;t know Thriller.</i></p>
<p>Once a song is selected, you are forwarded to the <a href="http://www.grooveshark.com">GrooveShark</a> site where you can listen to the full song for free. </p>
<p><strong><br />
The Tutorial</strong></p>
<p><strong>Step 1: Set Up Your Development Environment</strong></p>
<p>You will need a web server that runs PHP (Apache or IIS will work). Create a virtual directory called &#8220;musiclookup&#8221;. Copy all the files included in the <a href="/musiclookup/musiclookup-source.zip">tutorial code</a> to the &#8220;musiclookup&#8221; directory you created. In this demo, we use localhost as the server, if you have another server name, you can manually update the references to localhost in the code.</p>
<p><strong>Step 2: Testing your Environment</strong></p>
<p>Now you have to test that the code works on your own machine and the rest of the steps are a breeze. Test the lookup page by going to:</p>
<p><em>http://localhost/musiclookup/lookup.html?s=Thriller</em></p>
<p>If a song list appears, then you are good to go:<br />
<div id="attachment_687" style="width: 545px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-687" loading="lazy" src="http://www.pressthered.com/wp-content/uploads/2009/11/testclient.jpg" alt="This is what should appear when testing your local install." title="Test" width="535" height="386" class="size-full wp-image-687" srcset="http://www.pressthered.com/wp-content/uploads/2009/11/testclient.jpg 535w, http://www.pressthered.com/wp-content/uploads/2009/11/testclient-300x216.jpg 300w" sizes="(max-width: 535px) 100vw, 535px" /><p id="caption-attachment-687" class="wp-caption-text">This is what should appear when testing your local install.</p></div></p>
<p>If you don&#8217;t get the song list, there are some troubleshooting tips in the trouble.txt file included in the source. </p>
<p><strong>Step 3: Creating Your Accelerator Installation File</strong></p>
<p>IE Accelerators are installed by reading a specially formatted XML file. We are going use a modified version of the default installation file that Microsoft provides: </p>
<pre>
&lt;?xml version="1.0" encoding="UTF-8"?>
&lt;os:openServiceDescription
    xmlns:os="http://www.microsoft.com/schemas/openservicedescription/1.0">
    &lt;os:homepageUrl>http://localhost/musiclookup&lt;/os:homepageUrl>
    &lt;os:display>
        &lt;os:name>Listen to Music&lt;/os:name>
        &lt;os:icon>http://localhost/musiclookup/favicon.ico&lt;/os:icon>
        &lt;os:description>Listen to music using GrooveShark's TinySong api.&lt;/os:description>
    &lt;/os:display>
    &lt;os:activity category="Listen">
        &lt;os:activityAction context="selection">
            &lt;os:preview action="http://localhost/musiclookup/lookup.html?s={selection}" />
            &lt;os:execute action="http://localhost/musiclookup/goto.php" method="get">
                &lt;os:parameter name="s" value="{selection}" type="text" /> 
            &lt;/os:execute>
        &lt;/os:activityAction>
    &lt;/os:activity>
&lt;/os:openServiceDescription> 

</pre>
</p>
<p>We&#8217;ll start by editing the basic details. Open the file called lookup.xml in the musiclookup folder you created and review the following settings:</p>
<ul>
<li><b>homepageUrl</b>: Modify this url if you used a server other than localhost.</li>
<li><b>name</b>: Change the name to &#8220;My Music Lookup&#8221; (or some other custom name)</li>
<li><b>icon</b>: The url of an icon that is displayed in the context menu. You can leave this.</li>
<li><b>description</b>: A simple description can be entered here. You can leave this also.</li>
</ul>
<p><strong>Step 4: Setting up the Preview Action</strong></p>
<p>The preview action is the url that will display the preview page:</p>
<pre>
&lt;os:preview action="http://localhost/musiclookup/lookup.html?s={selection}" />

</pre>
<p>We tested the preview page in step 2, so you can use the url here (unless you have a server name). One item to note is the &#8220;{selection}&#8221; text. This text is replaced with what the user selected when your preview page is displayed. Your preview page can then read this url variable and act on it. More url variables can be found in <a href="http://msdn.microsoft.com/en-us/library/cc289775(VS.85).aspx">Micrsoft&#8217;s documentation</a>.</p>
<p><strong>Step 5: Setting up the Execute Action</strong></p>
<p>The execute action is the url that you are forwarded to when you click the context menu.:</p>
<pre>
&lt;os:execute action="http://localhost/musiclookup/goto.php" method="get">
  &lt;os:parameter name="s" value="{selection}" type="text" /> 
&lt;/os:execute>

</pre>
<p>In our case we use a simple php page to redirect to the third party site that plays the music.</p>
<p><strong>Step 6: Testing Your Accelerator</strong></p>
<p>To test your accelerator, you must create a link to install it. A special Microsoft javascript function is used to call your xml file. You can see an example of this in the test.html file in the musiclookup folder:<br />
<div id="attachment_681" style="width: 510px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-681" src="http://www.pressthered.com/wp-content/uploads/2009/11/testpage.jpg" alt="Here you can test your accelerator." title="Test Page" width="500" class="size-full wp-image-681" srcset="http://www.pressthered.com/wp-content/uploads/2009/11/testpage.jpg 564w, http://www.pressthered.com/wp-content/uploads/2009/11/testpage-300x184.jpg 300w" sizes="(max-width: 564px) 100vw, 564px" /><p id="caption-attachment-681" class="wp-caption-text">Here you can test your accelerator.</p></div></p>
<p>Once you have it installed, you can select text on your page and see the preview. If you want to make changes to the configuration file, you can reinstall by simply clicking your install link again. You can also manually remove an Accelerator by going to the &#8220;Tools -> Manage Add-ons&#8221; menu item.</p>
<p><strong>How The JQuery Front End Works:</strong><br />
What is neat about the preview action, is that it brings up a mini page that can run html and javascript like any other page. The preview page is a html page that references JQuery to call the web service and get some simple animation effects.</p>
<p><strong>How the PHP Web Service Works:</strong><br />
The php code calls GrooveShark&#8217;s service (tinysong.com). It is a RESTful interface that returns results in plain text. The php code parses the results and reformats them into json to make it easier to use by the front end. The php web service also acts as a proxy because your preview page can not call a web service (<a href="http://tinysong.com">tinysong</a>) from another domain.</p>
<p><strong>Making Improvements</strong><br />
There is certainly room for new feature and improvement. The preview page could be modified to include additional information or pull data from additional sources. While Grooveshark does not allow using their music player widgets, other services do (like Amazon, Real Networks or iTunes). The back end could be modified to pull from their web services and listen to the music directly on the preview page (although you don&#8217;t get to listen to the full song like you do when going to GrooveShark&#8217;s site).</p>
<p><strong>The End</strong><br />
I hope you enjoyed the tutorial and that you get some use out of the accelerator. Feel free to ask any questions or make any suggestions. </p>
<p><strong>Additional Resources</strong></p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/cc289775(VS.85).aspx">Microsoft&#8217;s Documentation on Accelerators</a></li>
<li><a href="http://www.grooveshark.com/">GrooveShark</a></li>
<li><a href="http://apidocs.tinysong.com/">TinySong API Documentaion</a></li>
<li><a href="http://jquery.com/">JQuery</a></li>
<li><a href="http://developer.yahoo.com/php/howto-parseRestPhp.html">Parsing REST Results in PHP</a></li>
</ul>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
