June 2003 - Posts
Say "Ciao Marco" to the new member of Scott's club :)
Scott has just activate this account and I am impressed of the backend of http://weblogs.asp.net which is better than one of my italian weblog.. ;-)
[WebLogs @ ASP.NET]
Another week, another build. Release early, release often, right?
This build of PicBlog (binary available
here and source
here) has an improved support for HTML templates, where you can define your navigation widgets in an XML file (just to stay buzzword compliant). The format of the HTML template uses a series of predefined substitution tags, enclosed in curly brackets. This is the sample HTML template (template.htm) that you'll find in the distribution zip:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>{ALBUMNAME}</title>
<meta name="GENERATOR" content="PicBlog v1.0">
</head>
<body>
<h1>{ALBUMNAME}</h1>
<p><i>{ALBUMDATE}</i></p>
<p>{ALBUMDESCRIPTION}</p>
<hr/>
<img src="{IMAGEFILENAME}"/>
<p>{IMAGENOTES}</p>
<hr/>
<p>{FIRSTPAGE} {PREVPAGE} {NEXTPAGE} {LASTPAGE}</p>
</body>
</html>
It's very simple, but it shows all the available tags:
- {ALBUMNAME} - This tag gets replaced by the album's name, as defined in the top text box of the UI
- {ALBUMDESCRIPTION} - Replaced by the album's description
- {ALBUMDATE} - Replaced by the album's date in long date format
- {IMAGEFILENAME} - The name of the image file to be displayed in this page
- {IMAGENOTES} - The notes/comments added to this image
- {FIRSTIMAGE} - A link to the first image in the album
- {PREVIMAGE} - A link to the previous image in the album (it it exists)
- {NEXTIMAGE} - A link to the next image in the album (if it exists)
- {LASTIMAGE} - A link to the last image in the album
The last four tags are defined in the navigation.xml file
<?xml version="1.0" encoding="utf-8" ?>
<navigation>
<firstpage>|<<</firstpage>
<lastpage>>>|</lastpage>
<prevpage><</prevpage>
<nextpage>></nextpage>
</navigation>
These four nodes represent the navigation widgets to be used in your template. In this case, |<< is used to go to the first image, >>| for the last, < for the previous and > for the next. You can, of course, replace those with images or whatever you want.
Another thing finally fixed in this build is the "elastic form" capability, now the thumbnails reflow inside the scrollable pane in the middle of the form, allowing you to maximize the window and have lots of pictures displayed :)
Download, test, comment.
Now with a fully resizable window and no stinky string concatenation for building the summary XML file!
Thanks for all the suggestions, this should be a decently usable release. Get the binary and the source, play with it and tell me what you think.
And while we're on the subject, I need a nice icon for this :) Any suggestions?
(and test for
NewsGator posting :)
While waiting for some
feedback, last night I quickly started a PocketPC version of PicBlog. Let me
just say that VS.NET 2003 is absolutely fabolous for the ability to target both
Windows and PocketPC applications at the same time. I'm happily sharing code
between the two version, with little problems (for example, how do I create User
Controls on the device?)
Little
teaser:

[Now Playing: Groove Armada - Handsome Boy Modelling School Sunshine ( Groove Armada Sunset Dub ) (06:00)]
Get it here, it's the latest source drop for today. If you do some work on it, just let me know what you did so I can merge it back in my code.
It doesn't actually deserve a version change number, because this is the first version that actually is perfectly usable :)
Changes from the previous one are:
- Added an album description field
- Implemented a very simple HTML page creation system based on a template.
Get the code and play with it while I "prettify" the source :)
Here you can grab the current source for PicBlog.
Don't be scared by what you'll see inside there :). There are several things that can be improved (for example, the building of the XML file shouldn't be done by concatenating strings...) but there are some interesting parts. Not all the code is commented, by the way.
If you want to make some modifications, feel free to go wild and then send me your work, so I can incorporate it back into the main code. I'm still tweaking and fixing stuff around, so I'll try to merge your contributions in the best possible way.
Announcing PicBlog!

A tool that aims to simplify and speedup the process to upload pictures and notes to FTP sites.
A concern I've seen often reported by people taking pictures with a digital camera is the convoluted process they have to endure to make their picture available on the web: transfer the images to their PC, resize them to a "web acceptable" format, upload them to an FTP site and either create some HTML or use some web-based tool to add notes and comments to the images.
With PicBlog, just enter the name of the album you want to create, point it to the folder where the images are (and this could be the memory card in the camera itself!), click upload and you're done.
Well, almost. PicBlog resizes (if needed) and uploads the images to a FTP site, then creates an XML file that contains the list of all the pictures in this album and the related notes.
This is an example file (named wedding.xml):
<?xml version="1.0" ?>
<gallery>
<author>
<name>Paolo Marcucci</name>
<email>paolo@paolomarcucci.com</email>
<url>http://www.paolomarcucci.com</url>
</author>
<title>Wedding</title>
<date>Sunday, September 24, 2000</date>
<images>
<image>
<filename>9007-22.640x426.jpg</filename>
<notes>Some people have bodyguards, we had an aircraft carrier to keep an eye on the wedding...</notes>
</image>
<image>
<filename>9342-03.640x426.jpg</filename>
<notes>The Contract</notes>
</image>
<image>
<filename>9346-09.320x480.jpg</filename>
<notes>Someone in this picture is kinda worried and it's not me!</notes>
</image>
</images>
</gallery>
If anyone wants to take a look at the source (C#), just drop me a line.
I'll comment on a couple of interesting features I used in writing this program in some other posts tomorrow...
More Posts