<?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" >

<channel>
	<title>Even the wrong words seem to rhyme &#187; gallery2</title>
	<atom:link href="http://www.kevinblake.co.uk/tag/gallery2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kevinblake.co.uk</link>
	<description>a blog-life by Kevin Blake</description>
	<lastBuildDate>Sat, 04 Feb 2012 19:58:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Gallery2 remote API C# wrapper</title>
		<link>http://www.kevinblake.co.uk/gallery2-remote-api-c-wrapper/586/</link>
		<comments>http://www.kevinblake.co.uk/gallery2-remote-api-c-wrapper/586/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 17:59:22 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[gallery2]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.kevinblake.co.uk/?p=586</guid>
		<description><![CDATA[I stumbled across the Gallery.NET Toolkit on Twitter, while I should have been doing something more useful; some great work from @rmaclean (thanks for sharing / codeplexing  it). The API wraps up a lot of the Gallery2 remote services into some easy to use C# functions. Hopefully I&#8217;ll find an excuse to use this one day.]]></description>
			<content:encoded><![CDATA[<p>I stumbled across the <a href="http://gallery2.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=29252" target="_blank">Gallery.NET Toolkit</a> on Twitter, while I should have been doing something more useful; some great work from <a href="http://www.twitter.com/rmaclean" target="_blank">@rmaclean</a> (thanks for sharing / codeplexing  it).</p>
<p>The API wraps up a lot of the Gallery2 remote services into some easy to use C# functions.</p>
<div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.kevinblake.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://www.kevinblake.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.kevinblake.co.uk/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.kevinblake.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="csharp" style="font-family:monospace;">Actions a <span class="sy0">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span class="kw3">new</span></a> SADev.<span class="me1">Gallery2</span>.<span class="me1">Protocol</span>.<span class="me1">Actions</span><span class="br0">&#40;</span><span class="st0">&quot;http://www.blakepics.com&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="kw4">string</span> authToken <span class="sy0">=</span> a.<span class="me1">Login</span><span class="br0">&#40;</span><span class="st0">&quot;*************&quot;</span>, <span class="st0">&quot;*************&quot;</span><span class="br0">&#41;</span>.<span class="me1">AuthToken</span><span class="sy0">;</span>
a.<span class="me1">FetchAlbums</span><span class="br0">&#40;</span>authToken<span class="br0">&#41;</span>.<span class="me1">Albums</span>.<span class="kw1">ForEach</span><span class="br0">&#40;</span>
    album <span class="sy0">=&gt;</span>
    <span class="br0">&#123;</span>
        Console.<span class="me1">WriteLine</span><span class="br0">&#40;</span>album.<span class="me1">Title</span><span class="br0">&#41;</span><span class="sy0">;</span>
        a.<span class="me1">FetchImages</span><span class="br0">&#40;</span>authToken, album.<span class="me1">Name</span><span class="br0">&#41;</span>.<span class="me1">Images</span>.<span class="kw1">ForEach</span><span class="br0">&#40;</span>image <span class="sy0">=&gt;</span>
            Console.<span class="me1">WriteLine</span><span class="br0">&#40;</span><span class="st0">&quot;<span class="es0">\t</span>&quot;</span> <span class="sy0">+</span> image.<span class="me1">Url</span><span class="br0">&#41;</span>
        <span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="br0">&#125;</span>
    <span class="br0">&#41;</span><span class="sy0">;</span>
Console.<span class="me1">ReadKey</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>
<p>Hopefully I&#8217;ll find an excuse to use this one day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinblake.co.uk/gallery2-remote-api-c-wrapper/586/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>GalleryTweet &#8211; Twitter for your Gallery2</title>
		<link>http://www.kevinblake.co.uk/gallerytweet-twitter-for-your-gallery2/530/</link>
		<comments>http://www.kevinblake.co.uk/gallerytweet-twitter-for-your-gallery2/530/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 14:13:24 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blakepics]]></category>
		<category><![CDATA[gallery2]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tinyurl]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[twitterpic]]></category>

		<guid isPermaLink="false">http://www.kevinblake.co.uk/?p=530</guid>
		<description><![CDATA[This post is no longer being maintained due to budget constraints - please check the project page for the latest information: http://codex.gallery2.org/Gallery2:Modules:gallerytweet I&#8217;m releasing the updated module for Gallery2 under the name of GalleryTweet. It was prompted by a few people mentioning they couldn&#8217;t get my earlier hack to work &#8211; so I thought I&#8217;d [...]]]></description>
			<content:encoded><![CDATA[<p><code><strong>This post is no longer being maintained due to budget constraints - please check the project page for the latest information: <a href="http://codex.gallery2.org/Gallery2:Modules:gallerytweet" target="_blank">http://codex.gallery2.org/Gallery2:Modules:gallerytweet</a></strong></code></p>
<p>I&#8217;m releasing the updated module for Gallery2 under the name of GalleryTweet.  It was prompted by a few people mentioning they couldn&#8217;t get my <a href="http://www.kevinblake.co.uk/twitter-your-gallery-2/423/">earlier hack</a> to work &#8211; so I thought I&#8217;d build something that was (slightly) more robust, and might stand to work on installations other than my own.</p>
<p>You might want to skip my ramblings and jump straight to the download, so here&#8217;s a link for you folks:</p>
<ul>
<li><a href="http://www.kevinblake.co.uk/wp-content/uploads/2009/04/gallerytweet.zip">Download GalleryTweet module<br />
</a></li>
</ul>
<ol>
<li>Install by unzipping to the root of your Gallery2 installation, and activate through the plugins panel.<a href="http://www.kevinblake.co.uk/wp-content/uploads/2009/04/activate.gif" rel="lightbox"><img class="aligncenter size-full wp-image-532" style="border: 1px solid black;" title="activate" src="http://www.kevinblake.co.uk/wp-content/uploads/2009/04/activate.gif" alt="activate" width="668" height="96" /><br />
</a></li>
<li>Once logged in, edit your Twitter settings through the left navigation<a href="http://www.kevinblake.co.uk/wp-content/uploads/2009/04/menu.gif" rel="lightbox"><img class="aligncenter size-full wp-image-535" style="border: 1px solid black;" title="menu" src="http://www.kevinblake.co.uk/wp-content/uploads/2009/04/menu.gif" alt="menu" width="191" height="115" /><br />
</a></li>
<li>You should enter your twitter username / password, and the format you&#8217;d like to send your Tweets out with.<a href="http://www.kevinblake.co.uk/wp-content/uploads/2009/04/twitter-settings.gif" rel="lightbox"><img class="aligncenter size-full wp-image-536" style="border: 1px solid black;" title="twitter-settings" src="http://www.kevinblake.co.uk/wp-content/uploads/2009/04/twitter-settings.gif" alt="twitter-settings" width="587" height="246" /><br />
</a></li>
<li>Now while you&#8217;re browsing the Gallery, Tweet about any images using the link below the thumbnail<a href="http://www.kevinblake.co.uk/wp-content/uploads/2009/04/tweet.gif" rel="lightbox"><img class="aligncenter size-full wp-image-533" style="border: 1px solid black;" title="tweet" src="http://www.kevinblake.co.uk/wp-content/uploads/2009/04/tweet.gif" alt="tweet" width="398" height="324" /></a></li>
</ol>
<p>Please drop me a message on <a href="http://www.twitter.com/kevinblake" target="_blank">Twitter @kevinblake</a> if you&#8217;ve found the plugin useful, can&#8217;t get it work, or have any other feedback.  That download link again, in case you missed it the first time:</p>
<ul>
<li><a href="http://www.kevinblake.co.uk/wp-content/uploads/2009/04/gallerytweet.zip">Download GalleryTweet module</a></li>
</ul>
<p>Happy Tweeting!</p>
<p><code><strong>This post is no longer being maintained due to budget constraints - please check the project page for the latest information: <a href="http://codex.gallery2.org/Gallery2:Modules:gallerytweet" target="_blank">http://codex.gallery2.org/Gallery2:Modules:gallerytweet</a></strong></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinblake.co.uk/gallerytweet-twitter-for-your-gallery2/530/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter your Gallery 2</title>
		<link>http://www.kevinblake.co.uk/twitter-your-gallery-2/423/</link>
		<comments>http://www.kevinblake.co.uk/twitter-your-gallery-2/423/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 16:04:54 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blakepics]]></category>
		<category><![CDATA[gallery2]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tinyurl]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[twitterpic]]></category>

		<guid isPermaLink="false">http://www.kevinblake.co.uk/?p=423</guid>
		<description><![CDATA[Seems everyone is talking about Twitter nowadays.  The Hudson River picture launched it into the media world as the best news source on the planet, and Obama&#8216;s adoption of the tool has given America the same pleasure that Britain experienced when our Prime Minister, Stephen Fry starting getting &#8216;back in touch with the people&#8217;, in [...]]]></description>
			<content:encoded><![CDATA[<p>Seems everyone is talking about <a href="http://www.twitter.com" target="_blank">Twitter</a> nowadays.  The <a href="http://community.brandrepublic.com/blogs/gordons_republic/archive/2009/01/16/hudson-bay-air-crash-bought-to-you-by-twitter.aspx" target="_blank">Hudson River</a> picture launched it into the media world as the best news source on the planet, and <a href="http://twitter.com/BarackObama" target="_blank">Obama</a>&#8216;s adoption of the tool has given America the same pleasure that Britain experienced when our Prime Minister, <a href="http://twitter.com/stephenfry" target="_blank">Stephen Fry</a> starting getting &#8216;back in touch with the people&#8217;, in October 2008.</p>
<p>The Hudson River picture wouldn&#8217;t have been possible without the non-affiliated <a href="http://www.twitpic.com" target="_blank">TwitPic</a> &#8211; which never truly got the recognition it deserved.  Without it, the infamous picture would have only been a 140 character description, and nobody will have noticed or cared.  Still, that&#8217;s the nature of buzzwords I guess.  If they don&#8217;t cause a buzz, they&#8217;re just words.</p>
<p>Anyway, TwitPic is yet another disparate service like <a href="http://www.flickr.com" target="_blank">Flickr</a>, <a href="http://www.panoramio.com/" target="_blank">Panoramio</a> or <a href="http://www.facebook.com" target="_blank">Facebook</a> that&#8217;s had me tempted away from uploading some of my photos to Gallery2 / Blakepics.  With Facebook, I&#8217;ve integrated my own application there; Panoramio and Flickr, stolen the best parts of each.</p>
<p>And now with a hack to the tagging module in Gallery 2 I can emulate all I want from TwitPic as well, and tuck another service onto the shelf at the back at the cupboard.  So as usual, I thought I&#8217;d share.</p>
<p><strong>What it is&#8230;</strong></p>
<ul>
<li>Tweet any photos on Gallery just by adding the tag &#8216;twitter&#8217; to your photo.</li>
<li>Automatically takes the photos title as your Tweet text.</li>
<li>Processes all URLs through TinyURL, giving you a warm and fuzzy Tiny URL</li>
</ul>
<p><strong>What it isn&#8217;t&#8230;</strong></p>
<ul>
<li>A seamless Gallery2 module.  There&#8217;s some hacking to do.</li>
<li>Multi-user.  If you share your Gallery, there&#8217;s some more work to do.</li>
</ul>
<p>If you make improvements in these areas or any others &#8211; please let me know <img src='http://www.kevinblake.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Requirements</strong></p>
<ul>
<li><a href="http://gallery.menalto.com/" target="_blank">Gallery 2</a></li>
<li>Tagging module</li>
<li>Twitter account</li>
</ul>
<p><strong>Things you need to do</strong></p>
<ol>
<li><a href="http://www.kevinblake.co.uk/wp-content/uploads/2009/02/twittertag.zip">Download my Twitter Tags class</a></li>
<li>Unzip to the root of your Gallery installation</li>
<li>Edit /modules/tags/classes/TwitterTag.class with your twitter username/pass, and Gallery URL.</li>
<li>Edit /modules/tags/classes/TagsHelper.class
<ol>
<li> Add this just above the line &#8216;class TagsHelper&#8217;<br />
<code>GalleryCoreApi::requireOnce('modules/tags/classes/TwitterTag.class');</code></li>
<li> Then just above<br />
<code> return TagsHelper::assignTagById($itemId, $tagId);</code><br />
Add<br />
<code> TwitterTag::Tweet($itemId, $tagId);</code></li>
</ol>
</li>
<li>Tag any photos you want to appear on Twitter with &#8216;twitter&#8217;.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinblake.co.uk/twitter-your-gallery-2/423/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Statistical New Years Resolutions on Blakepics</title>
		<link>http://www.kevinblake.co.uk/statistical-new-years-resolutions-on-blakepics/416/</link>
		<comments>http://www.kevinblake.co.uk/statistical-new-years-resolutions-on-blakepics/416/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 13:10:56 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blakepics]]></category>
		<category><![CDATA[gallery2]]></category>
		<category><![CDATA[new year]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.kevinblake.co.uk/?p=416</guid>
		<description><![CDATA[Last year, like the year before that, I made a resolution to caption 35% of the photos on Blakepics (up from 20%). There were 4,040 photos added over the past year, and approx. 25% of all photos are now captioned. So I didn&#8217;t reach my goal. 1,344 photos were captioned, and if it weren&#8217;t for [...]]]></description>
			<content:encoded><![CDATA[<p>Last year, like the year before that, I <a href="http://www.kevinblake.co.uk/inline-captioning-on-gallery2-blakepicscom/156/">made a resolution to caption 35% of the photos on Blakepics</a> (up from 20%).  There were 4,040 photos added over the past year, and approx. 25% of all photos are now captioned.  So I didn&#8217;t reach my goal.  1,344 photos were captioned, and if it weren&#8217;t for all those new ones it&#8217;d be standing at 30%.</p>
<p>Fortunately, BBC News have now deemed <a href=" http://news.bbc.co.uk/1/hi/uk/7806776.stm" target="_blank">New Years Resolutions to be bad for your health</a>.  So like <a href="http://news.bbc.co.uk/1/hi/health/6067908.stm" target="_blank">bread</a>, <a href="http://news.bbc.co.uk/1/hi/health/2053840.stm" target="_blank">second-hand smoke</a>, <a href="http://news.bbc.co.uk/1/hi/health/713375.stm" target="_blank">guilt</a> and <a href="http://news.bbc.co.uk/1/hi/health/7349980.stm" target="_blank">vitamins</a>, I&#8217;ve given them up.</p>
<p>But I thought to myself, &#8220;I&#8217;ve been captioning loads of photos every week&#8221;.  I did.  &#8220;I bet it&#8217;s the rest of those <a href="http://www.blakepics.com/main.php?g2_view=members.MembersList" target="_blank">free-loaders</a> not pulling their weight&#8221;.  So I&#8217;ve given the <a href="http://www.blakepics.com/main.php?g2_view=captionstatus.Captionstatus&amp;g2_itemId=7" target="_blank">Caption Status</a> page on Blakepics a much-needed overhaul.  If you&#8217;re logged in, you&#8217;ll now see how you&#8217;re doing with captioning your own photos &#8211; and even if you&#8217;re not, you can see a member list with how many photos everyone&#8217;s captioned, as well as click-through to a list of them all.</p>
<p>Turns out I was wrong.  A lot of those free-loaders are doing a better job than me.  In fact, whilst 25.01% of total photos are captioned &#8211; 25.04% of my own photos are captioned.  Since most of them on there are mine, I guess I shouldn&#8217;t be surprised.</p>
<p>So it seems as though I can&#8217;t prove <strong>everything</strong> with statistics.  Not if that something is how successful my 2008 Resolution has been.</p>
<p>Happy New Year Everyone!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinblake.co.uk/statistical-new-years-resolutions-on-blakepics/416/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Automatically Geotagging your Gallery</title>
		<link>http://www.kevinblake.co.uk/automatically-geotagging-your-gallery/344/</link>
		<comments>http://www.kevinblake.co.uk/automatically-geotagging-your-gallery/344/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 21:42:12 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blakepics]]></category>
		<category><![CDATA[gallery2]]></category>
		<category><![CDATA[geotagging]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[mashup]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.kevinblake.co.uk/?p=344</guid>
		<description><![CDATA[As always, an imminent holiday has inspired me to update the entire system behind geotagging my photos.  Likewise, needing to plan said holiday has given me the opportunity to procrastinate and do something else instead. Wishlist A repository I can drop files created by the Genie BGT-31 GPS tracker. Automatically convert the tracks into GPX [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_348" class="wp-caption alignright" style="width: 160px"><a href="http://www.kevinblake.co.uk/wp-content/uploads/2008/11/blakepics-tags.jpg" rel="lightbox"><img class="size-thumbnail wp-image-348" title="blakepics-tags" src="http://www.kevinblake.co.uk/wp-content/uploads/2008/11/blakepics-tags-150x150.jpg" alt="Tags from Blakepics" width="150" height="150" /></a><p class="wp-caption-text">Automatically add geonames.org tags to Gallery</p></div>
<p>As always, an imminent holiday has inspired me to update the entire system behind geotagging my photos.  Likewise, needing to plan said holiday has given me the opportunity to procrastinate and do something else instead.</p>
<p><strong>Wishlist</strong></p>
<ul>
<li>A repository I can drop files created by the Genie BGT-31 GPS tracker.</li>
<li>Automatically convert the tracks into GPX format.</li>
<li>Automatically stamp any photos within <a href="http://www.blakepics.com" target="_blank">Blakepics</a> with their longitude / latitude values into the EXIF information.</li>
<li>Use that EXIF information to populate the database for the <a href="http://gallery.menalto.com/" target="_blank">Gallery2</a> maps module.</li>
<li>Use <a href="http://www.geonames.org/" target="_blank">geonames</a> to get some basic tags, and automatically add those to the tags database.</li>
</ul>
<p>I can happily report all of the above is happily running on a schedule on the Blakepics server.   Whilst I realise a lot of these options aren&#8217;t particularly available on a shared hosting server, I&#8217;m going to talk about them anyway.</p>
<p><strong>A small disclaimer</strong></p>
<p>Be under no illusion, a lot of these scripts are hacked together with no thought given to scalability, stability, or re-use.  They&#8217;d be a lot better off as a proper Gallery2 module to be honest &#8211; and hopefully someone will beat me to it in making that a reality.  However, for the time being &#8211; this is all provided as-is <img src='http://www.kevinblake.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>NMEA repository</strong></p>
<p>The repository is quite simple with an SFTP server running (sshd for example), and <a href="http://filezilla-project.org/" target="_blank">FileZilla</a> on the client</p>
<p><strong>Convert the tracks to GPX</strong></p>
<ol>
<li>Install the rather excellent gpsbabel.<br />
<code>yum install gpsbabel</code></li>
<li>Run this <a href="http://www.kevinblake.co.uk/wp-content/uploads/2008/11/convert-to-gpx.txt">convert-to-gpx.pl.txt</a> perl script to combine all your nmea tracks to create a single gpx file.</li>
</ol>
<p><strong>Stamp the photos</strong></p>
<ol>
<li>Get the <a href="http://www.carto.net/projects/photoTools/gpsPhoto/" target="_blank">gpsPhoto perl script</a>.  You might find you need to install some perl modules:<br />
<code>perl -eshell -MCPAN<br />
install <em>modulename</em></code></li>
<li>Use this <a href="http://www.kevinblake.co.uk/wp-content/uploads/2008/11/geocode-photospl.txt">geocode-photos.pl.txt</a> script to find any matching photos from your Gallery, and tag them.  Note that I limit them to only photos I&#8217;ve uploaded myself, as I don&#8217;t want to go messing around with other peoples (and they were probably not at the same location anyway)</li>
</ol>
<p><strong>Fill the Gallery2 maps module with the EXIF data</strong></p>
<p>There&#8217;s a maintenance task to use the EXIF data to power the maps module of Gallery2, so using <a href="http://www.roelbroersma.nl/index.php/2008/07/29/gallery2-cron-job-to-automate-build-all-thumbnailresizes" target="_blank">Roel Broersma&#8217;s excellent script to run the maintenance tasks</a>, these can be scheduled with the extra line:</p>
<p><code>wget --quiet --output-document=/dev/null --cookies=on --load-cookies $TMP_PATH/myg2cookies "$G2_URL/main.php?g2_controller=core.AdminMaintenance&amp;g2_form%5Baction%5D%5BrunTask%5D=1&amp;g2_taskId=PopulateGPSEXIFInfos&amp;g2_authToken=$AUTHTOKEN"</code></p>
<p><strong>Give some meaning to your location data with geonames</strong></p>
<p>Geonames provides a reverse-lookup to get some more human readable descriptions of your photos.  So I use this to put in the country, region and town data into my Gallery.  You can go a bit further and get details of nearby landmarks from Wikipedia to add if you like, but i don&#8217;t find it too useful for my purposes.</p>
<ol>
<li>You&#8217;ll need some more perl modules<br />
<code>perl -eshell -MCPAN<br />
install Image::ExifTool;<br />
install Image::ExifTool::Location;<br />
install Geo::GeoNames;<br />
install Data::Dumper;</code></li>
<li>Get my <a href="http://www.kevinblake.co.uk/wp-content/uploads/2008/11/write-geoname-tagspl.txt">write-geoname-tags.pl.txt</a> perl script, which is actually a combination of all the previous scripts.  This will query the web service, and update your tags.</li>
</ol>
<p><strong>It all sounds very complicated&#8230;</strong></p>
<p>Well, yes.  My aim isn&#8217;t to create the easiest system to set-up, it&#8217;s to create the easiest system to use.  Uploading a single NMEA track list now causes all of the above to happen automatically.  That said, I recognise that it&#8217;s not for the faint-hearted.</p>
<p>So why not try one of these easier solutions:</p>
<ul>
<li><a href="http://www.gpsbabel.org/os/Windows_FE.html" target="_blank">GPS Babel GUI</a> (Windows / Linux command-line tools available)</li>
<li><a href="http://code.google.com/p/gpicsync/" target="_blank">GPicSync</a> (Linux / Windows)</li>
<li><a href="http://freefoote.dview.net/linux_gpscorr.html" target="_blank">GPS Correlate</a> (Linux only)</li>
<li><a href="http://www.flickr.com" target="_blank">Flickr</a> (all)</li>
</ul>
<p><strong>What next?</strong></p>
<p>Add all of these scripts mentioned above to a cron task, and forget all about it.  You can probably combine the whole lot into a single job (I wanted to keep them separate, so some could be run nightly, and others weekly or monthly).</p>
<p>Hopefully this is the humble beginnings of a more efficient and elegant solution.  For now I&#8217;m at least getting a lot more data into and out of my photos</p>
<p>Do let me know if you make any improvements, or have any ideas for viable new features &#8211; I&#8217;d be interested to hear from you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinblake.co.uk/automatically-geotagging-your-gallery/344/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Some Blakepics caption stats</title>
		<link>http://www.kevinblake.co.uk/some-blakepics-caption-stats/161/</link>
		<comments>http://www.kevinblake.co.uk/some-blakepics-caption-stats/161/#comments</comments>
		<pubDate>Sun, 20 Jan 2008 14:03:42 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blakepics]]></category>
		<category><![CDATA[gallery2]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.kevinblake.co.uk/technology/some-blakepics-caption-stats/161/</guid>
		<description><![CDATA[&#8220;Nothing motivates people more than celebrating achievements along the way&#8221;. I found that on the New Jersey Association of Partners in Education site (NJAPIE for short), so it must be true. Anyway, I&#8217;ve written another of those Gallery2 modules to show some stats on how the 2008 captioning is going. It&#8217;s more for my own [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/assets/blakepics-stats.gif" style="margin-left: 10px" align="right" border="1" height="155" width="225" />&#8220;Nothing motivates people more than celebrating achievements along the way&#8221;.  I found that on the <a href="http://www.njapie.org/toolkit/howto.html" target="_blank">New Jersey Association of Partners in Education</a>  site (NJAPIE for short), so it must be true.</p>
<p>Anyway, I&#8217;ve written another of those Gallery2 modules to show some stats on how the 2008 captioning is going.  It&#8217;s more for my own curiosity and to stop me copying huge reams of SQL into Query Browser.  But you never know, you might look at it and say &#8220;oh&#8221; as well.  So, if that sounds like fun you can click <a href="http://www.blakepics.com/main.php?g2_view=captionstatus.Captionstatus" target="_blank">Caption Status </a>either here or on the Blakepics left nav.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinblake.co.uk/some-blakepics-caption-stats/161/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Your pictures &#8230; everywhere</title>
		<link>http://www.kevinblake.co.uk/your-pictures-everywhere/157/</link>
		<comments>http://www.kevinblake.co.uk/your-pictures-everywhere/157/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 21:11:21 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gallery2]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.kevinblake.co.uk/technology/your-pictures-everywhere/157/</guid>
		<description><![CDATA[Whilst researching Gallery 2 extensions today, I stumbled across the news that PictureSync now supports Gallery2 as an upload medium. I like having all my photos on my own site, so I can do what I like with them without having to pay through the nose to get at the originals, or worrying about migrating [...]]]></description>
			<content:encoded><![CDATA[<p>Whilst researching Gallery 2 extensions today, I stumbled across the news that <a href="http://picturesync.net/" target="_blank">PictureSync</a> now supports Gallery2 as an upload medium.  I like having all my photos on my own site, so I can do what I like with them without having to pay through the nose to get at the originals, or worrying about migrating them when the next big thing comes along.</p>
<p>That said, I think I often miss out on some of the more social aspects of photography that networks like Flickr, or Facebook provide.   So personally, I&#8217;m looking forward to the Windows release of this product so I can try it out for myself.   Have any of you Mac users out there tried PictureSync?  What did you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinblake.co.uk/your-pictures-everywhere/157/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inline captioning on Gallery2 / Blakepics.com</title>
		<link>http://www.kevinblake.co.uk/inline-captioning-on-gallery2-blakepicscom/156/</link>
		<comments>http://www.kevinblake.co.uk/inline-captioning-on-gallery2-blakepicscom/156/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 15:45:11 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[gallery2]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.kevinblake.co.uk/technology/inline-captioning-on-gallery2-blakepicscom/156/</guid>
		<description><![CDATA[Approximately 20% of the 17,500 photos on Blakepics have captions of any kind. This can be attributed to a whole number of different things. I&#8217;m very lazy. I have far too many photos. I put far too many of them on-line. Captioning photos on Gallery2 is harder than it should be. Well, one of my [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/assets/ajax-change-title.jpg" style="margin-left: 15px" align="right" border="1" height="311" width="206" />Approximately 20% of the 17,500 photos on Blakepics have captions of any kind.  This can be attributed to a whole number of different things.</p>
<ol>
<li>I&#8217;m very lazy.</li>
<li>I have far too many photos.</li>
<li>I put far too many of them on-line.</li>
<li>Captioning photos on Gallery2 is harder than it should be.</li>
</ol>
<p>Well, one of my new years resolutions last year was &#8220;caption more photos&#8221;, and without any specific goals &#8211; I can say I succeeded tremendously.  So this year I thought I&#8217;d quantify it so I can feel ever warmer, fuzzier and smug that I fulfilled an ambition for 2008.  So I&#8217;m aiming to have captions on a massive 35% of them by years end (that&#8217;s a minimum of 2,500 more photos), and to help &#8211; I&#8217;ve armed Blakepics.com with a whole new module.  I think I&#8217;m finally starting to get to grips with at least some of the Gallery2 API.</p>
<p>So if you have an account on Blakepics.com, you can help out by using this new method of adding captions to your photos.  Whenever you&#8217;re viewing an album you own or have permissions for (and you&#8217;re signed-in of course), you&#8217;ll notice a new box called &#8220;Change Title&#8221; below each thumbnail.   Just type your new title into that and click the icon to the right, or just hit enter.  The image title will be updated without any reloading the page, or taking you to new forms.  Which is especially cool if you&#8217;re just browsing the photos and want to quickly update something.</p>
<p>I&#8217;ve found it a huge improvement, even over bulk-edit &#8211; but please let me know your thoughts.  And if you&#8217;re interested in this module for your own Gallery, please get in touch.  It might not be ready for distribution, but I&#8217;m happy to hear from any willing beta testers.<br />
<br clear="left" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinblake.co.uk/inline-captioning-on-gallery2-blakepicscom/156/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Geonaming your Geotags &#8211; Automatic picture captions</title>
		<link>http://www.kevinblake.co.uk/geonaming-your-geotags-automatic-picture-captions/151/</link>
		<comments>http://www.kevinblake.co.uk/geonaming-your-geotags-automatic-picture-captions/151/#comments</comments>
		<pubDate>Sat, 06 Oct 2007 11:39:12 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gallery2]]></category>
		<category><![CDATA[geotagging]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[trackstick]]></category>

		<guid isPermaLink="false">http://www.kevinblake.co.uk/technology/geonaming-your-geotags-automatic-picture-captions/151/</guid>
		<description><![CDATA[This time last year, I wrote about how to Geotag your photos using a simple GPS device and oodles of free software. Not much has changed in that process since, except now there&#8217;s a lot more software to choose from and the clever folks over at Trackstick.com have made it a lot easier to export [...]]]></description>
			<content:encoded><![CDATA[<p>This time last year, I wrote about how to <a href="http://www.kevinblake.co.uk/geo-tagging-the-universe-one-step-at-a-time/81/">Geotag your photos</a> using a simple GPS device and oodles of free software.  Not much has changed in that process since, except now there&#8217;s a lot more software to choose from and the clever folks over at <a href="http://www.trackstick.com/" target="_blank">Trackstick.com</a> have made it a lot easier to export your GPX tracks.</p>
<p>The spatially-aware web is producing a lot more services for us to use, and now Geonames.org some excellent reverse geocoding functionality.  That&#8217;s the process of taking geo-data (such as longitude and latitude) and getting place names back.  Which is really cool for tagging, titling or adding descriptions to your geocoded pictures.</p>
<p>They provide an impressive array of web services in both JSON and XML ranging from postal code searches, to reverse geocoding based on the community-based Wikipedia entries.  And if that&#8217;s not enough for you, you can download a copy of their huge database and manipulate it off-line however you want.</p>
<p>So me, I wrote some JavaScript to take advantage of the reverse geocoding and tied it into the Blakepics Gallery2 Tags module.  I&#8217;ll take the Wikipedia entries as an example, because that returns the most landmarks for me.  The example code at the bottom of the page actually makes use of two more web services in addition.</p>
<p><img src="http://www.kevinblake.co.uk/images/assets/geonames_encoding.gif" border="1" alt="" width="505" height="133" /><br />
The URL to call the web service is pretty simple enough:</p>
<p><code>var url = "http://ws.geonames.org/findNearbyWikipediaJSON?lat=" + lat + "&amp;lng=" + lon + "&amp;radius=10";</code></p>
<p>I&#8217;ve kept everything in JavaScript rather than building any back-end code whatsoever, so you need to make sure to use the JSON web services and take advantage of the script tags to avoid any cross-domain security policies.  The <a href="http://www.xml.com/pub/a/2005/12/21/json-dynamic-script-tag.html" target="_blank">JSONScriptRequest </a>library can be a powerful ally here.  This leaves my server to do more important things, but it all depends on your needs for the app.</p>
<p><code>url += "&amp;callback=showWikipediaNames";<br />
bObj3 = new JSONscriptRequest(url);<br />
// Build the dynamic script tag<br />
bObj3.buildScriptTag();<br />
// Add the script tag to the page<br />
bObj3.addScriptTag();<br />
</code></p>
<p>Then on the callback<br />
<code>function showWikipediaNames(wikijsonData) {<br />
var wikiobjects = wikijsonData.geonames;<br />
if (wikijsonData.geonames) {<br />
for (var i=0;i&lt;wikiobjects.length;i++) {<br />
addSuggestion(wikiobjects[i].title)<br />
}<br />
}<br />
bObj3.removeScriptTag();<br />
}</code></p>
<p>With me so far?  The final step in the process is to add the call to the JavaScript into your Gallery2 templates.</p>
<p><code>&lt;a href="#" onclick="return showGeoNameOptions(this, {$block.gpsinfo.LoadGPSInfo.lat}, {$block.gpsinfo.LoadGPSInfo.lon});"&gt;GeoNames&lt;/a&gt;<br />
</code></p>
<p>And before you know it, you have suggestions from geonames on how to tag your photos.  Now you can go away and make it suggest some titles and descriptions too.  If anyone&#8217;s interested in packaging this up into a slightly better Gallery module (or any other application), drop me a line.  If this is enough for you, download my example and use it as you see fit.</p>
<h3>Download</h3>
<ul>
<li><a href="http://www.kevinblake.co.uk/assets/code/examples/geonaming_gallery2_tags.zip">Download example code for Geonaming Tags on Gallery2</a> (use at your own risk).</li>
</ul>
<h4>Pre-requisites</h4>
<ul>
<li><a href="http://gallery.menalto.com" target="_blank">Gallery 2</a></li>
<li><a href="http://codex.gallery2.org/Gallery2:Modules:tags" target="_blank">Tags module</a></li>
<li>Some images with Longitude/Latitude stored into the EXIF data</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinblake.co.uk/geonaming-your-geotags-automatic-picture-captions/151/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobile Blakepics with Gallery2, AddViaEmail, Gmail, Symbian and Shozu</title>
		<link>http://www.kevinblake.co.uk/mobile-blakepics-with-gallery2-addviaemail-gmail-symbian-and-shozu/135/</link>
		<comments>http://www.kevinblake.co.uk/mobile-blakepics-with-gallery2-addviaemail-gmail-symbian-and-shozu/135/#comments</comments>
		<pubDate>Wed, 12 Sep 2007 21:09:10 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blakepics]]></category>
		<category><![CDATA[gallery2]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.kevinblake.co.uk/uncategorized/mobile-blakepics-with-gallery2-addviaemail-gmail-symbian-and-shozu/135/</guid>
		<description><![CDATA[The plan was to get photos on Blakepics without the hassle of using computers, web browsers, memory card readers, cables, wires or Royal Mail. The secondary goal of the whole thing is to be a bit cool &#8211; so naturally it&#8217;s a mash-up of a number of different partially connected services, and I&#8217;ll briefly mention [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.blakepics.com/mobileart/12092007013.jpg.html"><img class="g2image_float_right" title="12092007013.jpg" src="http://www.blakepics.com/d/50488-2/12092007013.jpg?g2_GALLERYSID=95c12351021eed4f78d42ea002125dbe" border="0" alt="12092007013.jpg" width="150" height="150" align="right" /></a><br />
The plan was to get photos on Blakepics without the hassle of using computers, web browsers, memory card readers, cables, wires or Royal Mail.  The secondary goal of the whole thing is to be a bit cool &#8211; so naturally it&#8217;s a mash-up of a number of different partially connected services, and I&#8217;ll briefly mention Facebook just so that we can check that one off and call it Web 2.0.</p>
<p>So, first step &#8211; <a href="http://gallery.menalto.com" target="_blank">Gallery2</a> has an AddViaEmail module.  Install that, signup for a Google Mail account and get yourself a really obscure email address.  Once you&#8217;ve got the AddViaEmail installed and configured (yep, it supports Google&#8217;s SSL pop3 servers), you can send emails to that address and have them automagically added to a specific album on your Gallery2 server.</p>
<p>You could stop here if you like &#8211; most mobile phones come with email software nowadays.  So you can write an email, attach your images, and off they go.  But I find email on the little keypads really annoying.  And there&#8217;s all that typing, clicking, and making sure you get things right to worry about.   You&#8217;re not exactly cutting edge, with email &#8230; are you?  Besides, we&#8217;ve only made use of three different vaguely related services.  That&#8217;s not what the web of the future is all about.  I&#8217;ve heard about it in fairy tales.</p>
<p>So, get yourself a <a href="http://www.shozu.com" target="_blank">Shozu</a> account.  They provide a really cool backup / Share-It service and comes complete with a Symbian application which you can install on your brand new ultra-shiny Nokia N95.  For example.  If you use this, you can get yourself some single-click access to uploading your photos.  Actually, it&#8217;s a 3-click minimum.  But it&#8217;s better than typing email addresses or searching for contacts.  They provide a bunch of other ways of sharing your photos, such as uploading to the BBC for consideration as part of their stories.  Or more usefully to a WordPress blog or Facebook to humiliate your mates before they&#8217;ve got home from the pub and had a chance to de-tag all your new compromising photos.</p>
<p>But alas, AddViaEmail and Shozu don&#8217;t play very nicely.  So, here are some changes to make to your php script (don&#8217;t be scared, it won&#8217;t bite).</p>
<p>/modules/addviaemail/classes/AddViaEmailHelper.class &#8211; Fix problems with the mime type&#8230;<br />
<code>list ($ret, $item) = GalleryCoreApi::addItemToAlbum($pathToSaveFile . $filename,$filename, $filename, $summary, '', <strong>$mimeType</strong>, $targetDestination);</code><br />
-&gt;<br />
<code>list ($ret, $item) = GalleryCoreApi::addItemToAlbum($pathToSaveFile . $filename,$filename, $filename, $summary, '', <strong>'image/jpeg'</strong>, $targetDestination);</code><br />
You&#8217;ll also need to disable the subject line spam checker as Shozu will send your email with the subject line as the name of the image.</p>
<p>So just remove this:</p>
<p><code>$header_info-&gt;subject == $subjectToMatch  &amp;&amp;</code></p>
<p>The spam checker is actually quite a cool function, so one of these days I&#8217;ll come back an regular expression that.  But quite likely, I probably won&#8217;t post it here.  So work it out for yourself <img src='http://www.kevinblake.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>See, and that&#8217;s all there is to it.  I can now upload loads of photos direct through my phone (as I did with the image at the top of the page), and you could too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinblake.co.uk/mobile-blakepics-with-gallery2-addviaemail-gmail-symbian-and-shozu/135/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

