Saturday, 28 February 2009

Premature Announcement of Nerdy Wonderment!

This post is really premature but I’m really excited. I’ve written my first Liver Writer plug-in! I didn’t say you would be excited.

Windows Live Writer is my primary blogging tool on Windows and OS X (via Parallels). The software has a really nice Windows Live style interface and allows you (the user) to write into a content area styled the same as your blog. You can save drafts locally and online and of course you have all the little niceties like Spell Checker. The best bit by far though is it’s extensibility.

Live Writer provides a simple but powerful .NET 2.0 (bring on 3.5) API that can be used to extend Live Writer’s functionality. Plug-ins I have already installed allow me to insert Flickr & Facebook photos, insert styled code examples and broadcast new blog entries to Twitter.

There was something I felt was missing though, and I was unable to find an existing plug-in that exactly fit my requirement. While my blog is obviously hosted with Blogger, my main site http://www.dogma.co.uk is hosted privately. The two are visually separate entities at the moment, but I hope to bring them under one design, once I come up with a design that I like. As a rule then, when I want to link to something from my blog, I first upload the file to a sub folder of my main site and add the link in my post. Until the creation of my plug-in – have you guessed what it is yet? – I would use Visual Studio 2008 to upload the file, as it is my primary FTP client.

My only FTP client, I am irrationally against installing software that is designed solely as an FTP client, this irrationality does not include plug-ins however.

My plug-in is a FTP client for Windows Live Writer. In it’s current state it is functional, but I will not release it into the wild yet as it is not very pretty, and is missing some important features. Hence the “premature” prefix of the title.

The plug-in, currently going under the name “Attach File”, at this moment allows you to specify FTP details and the HTTP equivalent URL for FTP area. These details are stored in Live Writer, so you only need to enter them once, the settings can obviously be updated as required.

Once the details are stored, you have access to an option called “Attach File…” from the main Live Writer window.

Clicking “Attach File…” brings up a dialog box with a list of files and folders, this list can be traversed up or down to the root folder you specified in your settings.

When you have located the folder that contains the links you require, you can either double click on the desired file to add the corresponding anchor tag to your post, or you can select a number of files and/or folders.

Selecting more than one file or folder will insert an unordered list of anchor tags into the blog post. Awesome.

Why is it unfinished? Well firstly it is still pretty ugly with no images or application icons. The main reasons though, is the complete lack of error handling and a few missing features that I would to see in the plug-in before it is released.

  1. Most importantly, the ability to upload a file to the FTP area.
  2. The ability to create multiple FTP profiles.
  3. The list and item templates are not hard coded into the plug-in. I am going to provide an interface to allow the user to amend the header, footer and item templates of the unordered lists and the link template of the individual anchor tags.

I really can’t wait to get the thing finished, but was bubbling with excitement and my wife is out.

As ever, any comments are appreciated. If you have similar plug-in or if you are interested in my humble project, I’d love to know. When the project is released, I’ll be putting it on CodePlex.

Twitter Updates