<?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>Niels' Homepage &#187; Gallery plugin</title>
	<atom:link href="http://www.heirbaut.nl/category/projects/gallery-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.heirbaut.nl</link>
	<description>Everything I want to put on the web</description>
	<lastBuildDate>Tue, 23 Feb 2010 19:44:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Release of NanoBlogger Gallery plugin 0.6.0</title>
		<link>http://www.heirbaut.nl/2006/08/29/release-of-nanoblogger-gallery-plugin-060/</link>
		<comments>http://www.heirbaut.nl/2006/08/29/release-of-nanoblogger-gallery-plugin-060/#comments</comments>
		<pubDate>Tue, 29 Aug 2006 19:45:51 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Gallery plugin]]></category>

		<guid isPermaLink="false">http://www.heirbaut.nl/?p=63</guid>
		<description><![CDATA[ 	There is a new release of the NanoBlogger Gallery plugin. The previous version had a problem when run in Bash versions below 3.1. There are some differences when initializing arrays from a &#8217;string&#8217; using $IFS.
In Bash 3.1 you can do this:

1
2
3
4
5
6
7
8
#!/bin/bash
&#160;
a=&#34;1.2.3&#34;
IFS='.'
declare -a arr=&#40; $a &#41;
echo &#34;${#arr[@]}&#34;
&#160;
# Outputs 3 in version 3.1 and 1 in [...]]]></description>
			<content:encoded><![CDATA[<p> 	There is a new release of the NanoBlogger Gallery plugin. The previous version had a problem when run in Bash versions below 3.1. There are some differences when initializing arrays from a &#8217;string&#8217; using <code>$IFS</code>.</p>
<p>In Bash 3.1 you can do this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">a</span>=<span style="color: #ff0000;">&quot;1.2.3&quot;</span>
<span style="color: #007800;">IFS</span>=<span style="color: #ff0000;">'.'</span>
<span style="color: #7a0874; font-weight: bold;">declare</span> <span style="color: #660033;">-a</span> <span style="color: #007800;">arr</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #007800;">$a</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${#arr[@]}</span>&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Outputs 3 in version 3.1 and 1 in version 3.0</span></pre></td></tr></table></div>

<p>But if you instead do this then it works in both versions:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">a</span>=<span style="color: #ff0000;">&quot;1.2.3&quot;</span>
<span style="color: #007800;">IFS</span>=<span style="color: #ff0000;">'.'</span>
<span style="color: #7a0874; font-weight: bold;">declare</span> <span style="color: #660033;">-a</span> arr
<span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #ff0000;">&quot;arr=( <span style="color: #007800;">$a</span> )&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${#arr[@]}</span>&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Outputs 3 in version 3.1 and 3.0</span></pre></td></tr></table></div>

<p>So hopefully the Gallery plug-in is better prepared for the real world :). Thanks to <a href="http://courses.capcollege.bc.ca/faculty/cgratham/blog/index.html">Chris Gratham</a> for helping me out with this.</p>
<p>The new version can be downloaded <a href="http://www.heirbaut.nl/downloads/gallery/gallery-0.6.0.tar.gz">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heirbaut.nl/2006/08/29/release-of-nanoblogger-gallery-plugin-060/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Release of Gallery plug-in 0.5.0</title>
		<link>http://www.heirbaut.nl/2006/08/25/release-of-gallery-plug-in-050/</link>
		<comments>http://www.heirbaut.nl/2006/08/25/release-of-gallery-plug-in-050/#comments</comments>
		<pubDate>Fri, 25 Aug 2006 07:32:13 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[Gallery plugin]]></category>

		<guid isPermaLink="false">http://www.heirbaut.nl/?p=61</guid>
		<description><![CDATA[ 	Version 0.5.0 of the NanoBlogger Gallery plug-in has just been released. It does not offer any extra features and is just a bug fix release to make the plug-in work with all versions of NanoBlogger from 3.0 and up.
It has been tested on the for the following releases:

3.0
3.1
3.2
3.2.3
3.3 RC5

The major problem that needed to [...]]]></description>
			<content:encoded><![CDATA[<p> 	Version 0.5.0 of the NanoBlogger Gallery plug-in has just been released. It does not offer any extra features and is just a bug fix release to make the plug-in work with all versions of NanoBlogger from 3.0 and up.</p>
<p>It has been tested on the for the following releases:</p>
<ul>
<li>3.0</li>
<li>3.1</li>
<li>3.2</li>
<li>3.2.3</li>
<li>3.3 RC5</li>
</ul>
<p>The major problem that needed to be fixed is that the plug-in uses standard NanoBlogger calls as often as possible. This means that the standard entry format can be used and even that (from version 3.3) the format field can be used to put markup into the entry.</p>
<p>Unfortunately the NanoBlogger API has changed a bit between versions. The call to <code>read_metadata</code> does not fill the same return variable in the versions mentioned above:</p>
<ul>
<li><code>$NB_Metadata</code> for version 3.0 and 3.1</li>
<li><code>$META_DATA</code> for versions 3.2 and 3.2.3</li>
<li><code>$METADATA</code> for version 3.3</li>
</ul>
<p>There was already a function in the plug-in to determine for two given version numbers which was the newer one because the parameters to <code>read_metadata</code> also needed to have <code>$METADATA_CLOSETAG</code> specified from version 3.3 and up if the entry&#8217;s body is requested. So the plug-in already had to choose between two different calls based on the NanoBlogger version.</p>
<p>But everything seems to be fixed for now. The new plug-in can be downloaded <a href="http://www.heirbaut.nl/downloads/gallery/gallery-0.5.0.tar.gz">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heirbaut.nl/2006/08/25/release-of-gallery-plug-in-050/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NanoBlogger plug-ins</title>
		<link>http://www.heirbaut.nl/2006/07/02/nanoblogger-plug-ins/</link>
		<comments>http://www.heirbaut.nl/2006/07/02/nanoblogger-plug-ins/#comments</comments>
		<pubDate>Sun, 02 Jul 2006 14:38:59 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[Code plugin]]></category>
		<category><![CDATA[Gallery plugin]]></category>

		<guid isPermaLink="false">http://www.heirbaut.nl/?p=51</guid>
		<description><![CDATA[ 	New releases of the code and gallery plug-ins for NanoBlogger. The code plug-in now no longer causes two blank line to be sent to stdout. The gallery plug-in now handles different versions of NanoBlogger better, i.e. the version check to determine which version of NanoBlogger is running does not cause an error anymore. It [...]]]></description>
			<content:encoded><![CDATA[<p> 	New releases of the <a href="http://www.heirbaut.nl/category/projects/code-plugin/">code</a> and <a href="http://www.heirbaut.nl/category/projects/gallery-plugin/">gallery</a> plug-ins for NanoBlogger. The code plug-in now no longer causes two blank line to be sent to stdout. The gallery plug-in now handles different versions of NanoBlogger better, i.e. the version check to determine which version of NanoBlogger is running does not cause an error anymore. It also delays the cleanup of meta files on Apple Mac OS X so I hope this is handles better now.</p>
<ul>
<li>The new gallery plug-in can be downloaded <a href="http://www.heirbaut.nl/downloads/gallery/gallery-0.4.0.tar.gz">here</a>.</li>
<li>The new code plug-in can be downloaded <a href="http://www.heirbaut.nl/downloads/nbcode/nbcode-0.2.0.tar.gz">here</a>.</li>
</ul>
<p>Enjoy and if there are any questions or problems contact me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heirbaut.nl/2006/07/02/nanoblogger-plug-ins/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Gallery Plugin version 0.3.0</title>
		<link>http://www.heirbaut.nl/2006/04/02/gallery-plugin-version-030/</link>
		<comments>http://www.heirbaut.nl/2006/04/02/gallery-plugin-version-030/#comments</comments>
		<pubDate>Sun, 02 Apr 2006 15:51:03 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[Gallery plugin]]></category>

		<guid isPermaLink="false">http://www.heirbaut.nl/?p=48</guid>
		<description><![CDATA[ 	A new release (0.3.0) of the Gallery Plugin for NanoBlogger to avoid problems with meta files on Mac OS X. These are files starting with ._ and contain data on files not stored on the native file system HFS.
This release will test if the plugin is running on Mac OS X and delete all [...]]]></description>
			<content:encoded><![CDATA[<p> 	A new release (0.3.0) of the Gallery Plugin for NanoBlogger to avoid problems with meta files on Mac OS X. These are files starting with <code>._</code> and contain data on files not stored on the native file system HFS.</p>
<p>This release will test if the plugin is running on Mac OS X and delete all picture files (<code>*.jpg</code> and <code>*.png</code>) starting with <code>._</code> in the current gallery directory.</p>
<p>The new version can be downloaded <a href="http://www.heirbaut.nl/downloads/gallery/gallery-0.3.0.tar.gz">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heirbaut.nl/2006/04/02/gallery-plugin-version-030/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Version 0.2.0 of the Gallery Plugin</title>
		<link>http://www.heirbaut.nl/2005/12/25/version-020-of-the-gallery-plugin/</link>
		<comments>http://www.heirbaut.nl/2005/12/25/version-020-of-the-gallery-plugin/#comments</comments>
		<pubDate>Sun, 25 Dec 2005 18:27:26 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[Gallery plugin]]></category>

		<guid isPermaLink="false">http://www.heirbaut.nl/?p=23</guid>
		<description><![CDATA[ 	Version 0.2.0 of the Picture Gallery Plugin is available. This version should play nice with versions of NanoBlogger &#60;3.3.
Beware: This plugin has only be tested with versions 3.1 and 3.3 RC3 of NanoBlogger. If I have time I will try to test the plugin for other versions. But don&#8217;t let that stop you from [...]]]></description>
			<content:encoded><![CDATA[<p> 	Version 0.2.0 of the Picture Gallery Plugin is available. This version should play nice with versions of NanoBlogger &lt;3.3.</p>
<p>Beware: This plugin has only be tested with versions 3.1 and 3.3 RC3 of NanoBlogger. If I have time I will try to test the plugin for other versions. But don&#8217;t let that stop you from doing the same and provide me with feedback :).</p>
<p>You can download it <a href="http://www.heirbaut.nl/downloads/gallery/gallery-0.2.0.tar.gz">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heirbaut.nl/2005/12/25/version-020-of-the-gallery-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Gallery plugin release &#8211; 0.1.0</title>
		<link>http://www.heirbaut.nl/2005/12/21/new-gallery-plugin-release-010/</link>
		<comments>http://www.heirbaut.nl/2005/12/21/new-gallery-plugin-release-010/#comments</comments>
		<pubDate>Wed, 21 Dec 2005 13:07:04 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[Gallery plugin]]></category>

		<guid isPermaLink="false">http://www.heirbaut.nl/?p=22</guid>
		<description><![CDATA[ 	After trying to add a second picture gallery to this site the plugin would overwrite the title and the introductory text for all galleries with the ones from the latest gallery. This has been fixed in the new release together with a minor bug.
You can get this release here
]]></description>
			<content:encoded><![CDATA[<p> 	After trying to add a second picture gallery to this site the plugin would overwrite the title and the introductory text for all galleries with the ones from the latest gallery. This has been fixed in the new release together with a minor bug.</p>
<p>You can get this release <a href="http://www.heirbaut.nl/downloads/gallery/gallery-0.1.0.tar.gz">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.heirbaut.nl/2005/12/21/new-gallery-plugin-release-010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First release of a Picture Gallery Plugin for NanoBlogger</title>
		<link>http://www.heirbaut.nl/2005/12/09/first-release-of-a-picture-gallery-plugin-for-nanoblogger/</link>
		<comments>http://www.heirbaut.nl/2005/12/09/first-release-of-a-picture-gallery-plugin-for-nanoblogger/#comments</comments>
		<pubDate>Fri, 09 Dec 2005 20:23:00 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[Gallery plugin]]></category>

		<guid isPermaLink="false">http://www.heirbaut.nl/?p=17</guid>
		<description><![CDATA[ 	As mentioned in a previous post we visited a Sinterklaas celebration where we took a lot of pictures. The problem was that putting them on-line using NanoBlogger was a bit cumbersome. After some investigation on the NanoBlogger Yahoo group I found that a man named Chris had written a picture gallery plugin. After contacting [...]]]></description>
			<content:encoded><![CDATA[<p> 	As mentioned in a previous post we visited a Sinterklaas celebration where we took a lot of pictures. The problem was that putting them on-line using NanoBlogger was a bit cumbersome. After some investigation on the NanoBlogger Yahoo group I found that a man named <a href="http://mathfreak.ws">Chris</a> had written a picture gallery plugin. After contacting him about it, he was so kind as to make it available to me. As it was still in a somewhat rudimentary state and I really like to tinker, I started writing my own plugin.</p>
<p>It is now in a quite usable state so I am sharing this with the rest of the world. Its usage is (hopefully) quite simple:</p>
<h3>Usage</h3>
<ol>
<li>Install the plugin <code>gallery.sh</code> in the NanoBlogger plugin directory. The plugin can be downloaded <a href="http://www.heirbaut.nl/downloads/gallery/gallery-0.0.1.tar.gz">here</a>.</li>
<li>Create a directory named <code>galleries</code> in the NanoBlogger image directory. Any sub-directory of <code>galleries</code> will be considered a gallery.</li>
<li>Place the pictures (JPG or PNG format) in the sub-directory of <code>galleries </code>that you created.</li>
<li>Adjust the template <code>main_index.htm</code> to include the variable <code>$NB_GalleryLinks</code></li>
<li>Run <code>nb -u all</code>.</li>
</ol>
<p>The created gallery will get the title of the sub-directory in which the pictures are stored.</p>
<p>These are the basics. But the plugin also gives the possibility to:</p>
<ul>
<li>Prepend an introductory text</li>
<li>Annotate arbitrary pictures</li>
</ul>
<h3>Prepend introductory text</h3>
<p>Create a file named <code>intro.txt</code> in the place the pictures are stored using <code>nb --draft intro.txt</code> and treat it like you would treat a regular entry for NanoBlogger. The title you set in the entry will be the title for the gallery.</p>
<h3>Annotate pictures</h3>
<p>Create a file named <code>annotations.txt</code> and put a line for each picture you want annotated using the following format:</p>
<pre><code>&lt;picture file&gt;,&lt;annotation&gt;

</code></pre>
<p>Picture file is the local file name of the picture. Do not include paths, just use the bare file name. Everything after the comma is then considered an annotation for the picture.</p>
<p>To make the gallery a bit more pleasant-looking adjust your website&#8217;s style sheet. You can use <a href="http://www.heirbaut.nl/styles/heirbaut_nl.css">this</a> as an example.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heirbaut.nl/2005/12/09/first-release-of-a-picture-gallery-plugin-for-nanoblogger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
