<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Thunder Labs</title>
	<atom:link href="http://thunderlabs.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://thunderlabs.wordpress.com</link>
	<description>Coding thunder in a lab!</description>
	<lastBuildDate>Mon, 28 Sep 2009 18:11:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='thunderlabs.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Thunder Labs</title>
		<link>http://thunderlabs.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://thunderlabs.wordpress.com/osd.xml" title="Thunder Labs" />
	<atom:link rel='hub' href='http://thunderlabs.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Downloading Zenfolio Photos</title>
		<link>http://thunderlabs.wordpress.com/2009/09/28/downloading-zenfolio-photos/</link>
		<comments>http://thunderlabs.wordpress.com/2009/09/28/downloading-zenfolio-photos/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 18:11:30 +0000</pubDate>
		<dc:creator>bont</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thunderlabs.wordpress.com/?p=34</guid>
		<description><![CDATA[A friend asked me if I could get some images off of Zenfolio for her. They are displayed as background images of div blocks and so you cannot simply right click and &#8220;Save As&#8230;&#8221;. Getting the link for the image is not hard but it&#8217;s buried deep in the HTML. Once you load the image, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thunderlabs.wordpress.com&amp;blog=9401701&amp;post=34&amp;subd=thunderlabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A friend asked me if I could get some images off of <a href="http://zenfolio.com">Zenfolio</a> for her. They are displayed as background images of div blocks and so you cannot simply right click and &#8220;Save As&#8230;&#8221;. Getting the link for the image is not hard but it&#8217;s buried deep in the HTML. Once you load the image, you&#8217;ll find it&#8217;s not very big but if you change the URL you can download the larger version. For example:</p>
<p>http://img-a.zenfolio.com/img/v4/p1010183352-3.jpg</p>
<p>becomes:</p>
<p>http://img-a.zenfolio.com/img/v4/p1010183352-4.jpg</p>
<p>I whipped up a little javascript to get the URL and load it.</p>
<p><code>javascript:window.location=/url\((.+?)\)/.exec(document.getElementById('ctl02_PhotoFlipper-view1-img').getAttribute('style'))[1].replace(/-[0-9]+\.jpg/,'-4.jpg')</code></p>
<p>It doesn&#8217;t work if you&#8217;ve used the navigation on the side of the page (seen when viewing a single image) to get to the picture you want to download. The id of the HTML element will have changed to something like</p>
<p><code>ctl02_PhotoFlipper-view3-img</code></p>
<p>and the javascript won&#8217;t find it. Save the above code as a link in your bookmark bar and use it whenever you want to download an image from Zenfolio. I am not responsible if you misuse this code.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thunderlabs.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thunderlabs.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thunderlabs.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thunderlabs.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thunderlabs.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thunderlabs.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thunderlabs.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thunderlabs.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thunderlabs.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thunderlabs.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thunderlabs.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thunderlabs.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thunderlabs.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thunderlabs.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thunderlabs.wordpress.com&amp;blog=9401701&amp;post=34&amp;subd=thunderlabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thunderlabs.wordpress.com/2009/09/28/downloading-zenfolio-photos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec95532a307f19dccb3b7e3a2ebff6bd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bont</media:title>
		</media:content>
	</item>
		<item>
		<title>Custom Page Content in WordPress</title>
		<link>http://thunderlabs.wordpress.com/2009/09/13/custom-page-content-in-wordpress/</link>
		<comments>http://thunderlabs.wordpress.com/2009/09/13/custom-page-content-in-wordpress/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 17:25:48 +0000</pubDate>
		<dc:creator>bont</dc:creator>
				<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://thunderlabs.wordpress.com/?p=23</guid>
		<description><![CDATA[There is no immediately obvious way to replace the content of a WordPress page with your plugin output. I spent the last day hunting around online looking for a way to accomplish this. Hopefully the snippet below will save someone a lot of trouble. (Note: There will be a broken &#8216;Edit this entry.&#8217; link at [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thunderlabs.wordpress.com&amp;blog=9401701&amp;post=23&amp;subd=thunderlabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There is no immediately obvious way to replace the content of a WordPress page with your plugin output. I spent the last day hunting around online looking for a way to accomplish this. Hopefully the snippet below will save someone a lot of trouble. <span style="text-decoration:line-through;">(Note: There will be a broken &#8216;Edit this entry.&#8217; link at the bottom of the page if you&#8217;re logged in and are allowed to edit pages. I haven&#8217;t found a way to get rid of it yet.)</span></p>
<p><code> </code></p>
<pre>function posts($posts)
{
        if (isset($_GET['pagename']) &amp;&amp; isset($_GET['action']))
        {
                return array(array());
        }

        return $posts;
}
add_filter('the_posts', 'posts');

function content($content)
{
        if (isset($_GET['pagename']) &amp;&amp; isset($_GET['action']))
        {
                $content = 'my plugin output';
        }

        return $content;
}
add_filter('the_content', 'content');</pre>
<p>There is no magic, you&#8217;re simply tricking WordPress into thinking there is a page to display and then you add your own content. This is not intuitive but outputting custom page data doesn&#8217;t seem to be something WordPress was designed to do.</p>
<p><strong>Update  (09-16-09):</strong></p>
<p>There is a filter to change the &#8216;Edit this entry.&#8217; link; we can remove it from the output by returning an empty string.</p>
<pre>function edit_link($link)
{
        list(, $post_arg) = explode('&amp;', $link);  

        if ($post_arg === 'amp;post=')
        {
                return '';
        }
}
add_filter('get_edit_post_link', 'edit_link');</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thunderlabs.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thunderlabs.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thunderlabs.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thunderlabs.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thunderlabs.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thunderlabs.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thunderlabs.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thunderlabs.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thunderlabs.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thunderlabs.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thunderlabs.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thunderlabs.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thunderlabs.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thunderlabs.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thunderlabs.wordpress.com&amp;blog=9401701&amp;post=23&amp;subd=thunderlabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thunderlabs.wordpress.com/2009/09/13/custom-page-content-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec95532a307f19dccb3b7e3a2ebff6bd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bont</media:title>
		</media:content>
	</item>
		<item>
		<title>Spanish Word Definitions with Python</title>
		<link>http://thunderlabs.wordpress.com/2009/09/09/spanish-word-definitions-with-python/</link>
		<comments>http://thunderlabs.wordpress.com/2009/09/09/spanish-word-definitions-with-python/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 18:07:13 +0000</pubDate>
		<dc:creator>bont</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://thunderlabs.wordpress.com/?p=10</guid>
		<description><![CDATA[I love Python! Last night I created a small Python script for a friend, in a couple hours, to get the definitions of a list of Spanish words using SpanishDict. It works by sending a request to SpanishDict and parsing the HTML it gets back, only keeping the definition of the word. If you run [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thunderlabs.wordpress.com&amp;blog=9401701&amp;post=10&amp;subd=thunderlabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I love Python!</p>
<p>Last night I created a small Python script for a friend, in a couple hours, to get the definitions of a list of Spanish words using <a href="http://spanishdict.com">SpanishDict</a>. It works by sending a request to SpanishDict and parsing the HTML it gets back, only keeping the definition of the word. If you run it from the command line you have the choice of passing files or individual words. Here&#8217;s the help message:</p>
<p><code> </code></p>
<pre>Usage: spanishdict.py [options] file [file2, file3, ...]
Options:
  -h, --help            show this help message and exit
  -o OUTPUT             where to send the output, file name or '-'
to indicate stdout [default: {first file}.defs]
  --words               interpret the input as words, not file names [default: False]
  --delimiter=DELIMITER
                        delimiter between words in the files [default: \n]</pre>
<p>The script is available in <a href="http://code.google.com/p/bont/">my code repository</a> in the &#8216;python&#8217; directory or you can <a href="http://code.google.com/p/bont/source/browse/python/spanishdict.py">view it online</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thunderlabs.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thunderlabs.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thunderlabs.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thunderlabs.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thunderlabs.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thunderlabs.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thunderlabs.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thunderlabs.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thunderlabs.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thunderlabs.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thunderlabs.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thunderlabs.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thunderlabs.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thunderlabs.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thunderlabs.wordpress.com&amp;blog=9401701&amp;post=10&amp;subd=thunderlabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thunderlabs.wordpress.com/2009/09/09/spanish-word-definitions-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec95532a307f19dccb3b7e3a2ebff6bd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bont</media:title>
		</media:content>
	</item>
	</channel>
</rss>
