| Comments

Before Windows Live Writer was even publically released, I was glad to have been an early beta user/tester of the product.  The team thought early about an extensible model and it has been my content authoring tool ever since.  It has allowed me to use *my* preferred content workflow with my cloud providers/formatters/tracking and other such plug-ins due to this extensibility.

Flickr4Writer screenshotOne of the first plugins available was one of mine I called Flickr4Writer.  It was pretty popular (as most ‘firsts’ are) and I got a lot of good feedback that changed the functionality and user interface.  Is it the best design/code?  Probably not, but it seems to have served the needs of many folks and I’m happy about that.  I put the code into the Open Source world around the same time and it never received much uptake there and only one contribution of literal code (plenty of feedback). 

I depended on an early library that was created called FlickrNet.  I contributed a few small fixes during my development of Flickr4Writer to the cause.  This has been a very popular library and I think even used in some close-to-official Flickr apps for the Windows platform.  It served my purpose fine for a LONG time…until 2 days ago.

Because Flickr4Writer was pretty much complete and ‘bug-free’ for the mainstream cases, it hadn’t been touched in years and there was never any need.  I felt no need to fiddle with code at all that didn’t need to be messed with.  Another factor also was that Live Writer plugins are pretty locked on .NET 2.0 for loading, so there was no real incentive for me to move to anything else.  Two days ago I started getting emails that Flickr4Writer was not working anymore.  One writer sent me a very kind note detailing what he felt the problem was due to the recent API changes required by Flickr.  One 27-June-2014 the Flickr API went SSL-only and pretty much all my code broke.  Well, to be true, the version of FlickrNet I was using no longer worked.  It was time for me to update.

I spent a few hours today switching to the latest FlickrNet library (and using NuGet now since it is published that way now) and take the time to switch over all the now-obsolete API usage my app was using.  I hit a few speed bumps along the way but got it done.  I sent the bits to a few of the folks that emailed me and they indicated it was working so I’m feeling good about publishing it.  So here is the update to Flickr4Writer, version 1.5 and the steps:

  1. Close Windows Live Writer completely
  2. Uninstall any previous version of Flick4Writer from Control Panel on your machine
  3. Run the new installer for Flickr4Writer by downloading it here.
  4. Launch Windows Live Writer again
  5. Go to the Plugin Options screen and select ‘Flickr Image Reference’ and click Options
  6. Step #5 should launch the authentication flow again to get new tokens. 
  7. Pay attention to the permission screen on Flickr web site as you will need the code provided when you authorize
  8. Enter the code and click OK
  9. Resume using Flickr4Writer

This worked for a set of folks and a few tests I did on my machines.  Performing the re-authentication is key to get the updated tokens for the API usage for this plugin.  I apologize about making folks uninstall/re-install but the installer code was one thing that was really old and I just didn’t want to spend too much time getting that working so I just created a new one.

I’m really glad people find Flickr4Writer useful still and I apologize for not having an update sooner (I actually didn’t get the notice that Flickr indicates was sent out…probably in my spam somewhere) but I appreciate those users who alerted me to the problem quickly!

Hope this helps!

| Comments

I’ve just completed my upgrade to my site of the official 2.0 release of Subtext, the Open Source blogging engine that I use to manage content on this site.  You can read the full announcement from grand poohba Haack himself here.

I’m loving this release because of the improvements made but also a little selfishly because the modifications I’ve made to my own fork I’ve been using have made it into this release!  These modifications really make this the best platform for me when using Live Writer.  This may not make a difference to a lot of you, but it really is exciting for me to see my check-ins make it into the release and to not have to use my custom assemblies anymore!

Thanks to the Subtext team for supporting my contributions and I look forward to seeing how I can participate in v3!  Get your Subtext 2.0 upgrade today!

| Comments

This blog runs on SubText.  I heart SubText.  I know there are others out there but for me SubText has met most of my needs.  And when it hasn’t I modify it.  Which brings me to this post.  There was a thread on an email list I belong to about Windows Live Writer (I heart Live Writer too :-)) and categories (adding new categories on the fly).  This got me to crack open the source and hunt.  Alas, there was no support for this.  I’ve been ranting about WordPress API support for SubText on the developer list and I think if I rant one more time it will probably get assigned to me.  Please keep in mind that my modifications were solely intended to make Live Writer the best tool for me…these are targeted at Live Writer functionality and may/may not add value to other areas of functionality.  So on with the show…

The Slug

One of the features in SubText is the ability to auto generate URLs based on the title of the blog post.  Well, I didn’t like that.  I usually want my URLs to be a slight derivative of the URL.  My workflow, then, has been to post as draft, go to the web interface, change and then enable the syndication.  I am sick of doing that.  So let’s start with that first.  You see in blog terms the end part of your URL in called a “slug.”  SubText calls this a ‘friendly url’ and other engines may call it something else.  Here I’m going to call it a slug.  My colleague Jason Mauer has a custom blog engine he uses where he’s implemented almost every blogging API in his set.  I’ve been geekly jealous of his API for some time…now it is time to change that.

I’m not going to go into the philosophical reasons why I want a different URL slug and why I want different ones.  We can debate that over a Mt. Dew some time if you’d like.

SubText uses the MetaWeblog API by default.  The developers chose to implement the spec of MetaWeblog (as they should have) and thus the slug is not a part of the newPost spec and the Post struct used to identify the structure of a post.  So my modification was a few steps.  If you are familiar with the latest source (1.9.5b) of SubText, I’ll be referring to line numbers in there.  First, I had to modify that Post struct for the MetaWeblogAPI implementation.  Now some may shirk that this is a no-no…and I might agree…so if modifying something that isn’t going to conform to a spec that really isn’t full anymore, then move along.  I modified about line 63 and added the following:

public string wp_slug;

I actually could have used wp_slug or mt_basename, both of which mean the same thing and both of which are sent to the API by Live Writer…so I just picked one.  Now my struct has the information when it passes it along for creation/edit of the post via Live Writer.

The next step was to modify the implementation of the post.  In MetaWeblog.cs at about line 234 I added:

if (!string.IsNullOrEmpty(post.wp_slug))
{
    entry.EntryName = post.wp_slug;
}

I also added this to the editPost method to ensure compatibility on edit.

The final step was to modify my wlwmanifest.xml file to announce to Live Writer that I now support this feature.  This is done by adding to the <options> node of this manifest:

<supportsSlug>Yes</supportsSlug>

Then do a refresh of the account settings in Live Writer.  When you do that, in a new post click the little ‘up’ arrow just underneath the editing area and you should now see a Slug field:

Now I don’t have to post a draft and login to change!

New Categories

The thread actually started with wanting to create new categories during a post.  SubText is one of the engines that doesn’t expose this API directly just yet, so some altering had to be done.  Here’s what I did.  I chose to mirror the WordPress newCategory method to do this. 

First I added IWordPressApi.cs to Subtext.Framework.XmlRpc.  The complete code within it is:

using System;
using CookComputing.XmlRpc;

namespace Subtext.Framework.XmlRpc
{

    public struct WordpressCategory
    {
        public string name;
    }

    public interface IWordPressApi
    {
        [XmlRpcMethod("wp.newCategory", 
            Description = "Adds a new category to the blog engine.")]
        int newCategory(
          string blogid,
          string username,
          string password,
          WordpressCategory category);
    }
}

I then went into MetaWeblog.cs and implemented that interface with:

public int newCategory(string blogid, string username, string password, WordpressCategory category)
{
    LinkCategory newCategory = new LinkCategory();
    newCategory.CategoryType = CategoryType.PostCollection;
    newCategory.Title = category.name;
    newCategory.IsActive = true;
    newCategory.Description = category.name;

    newCategory.Id = Links.CreateLinkCategory(newCategory);

    return newCategory.Id;
}

I chose to ignore the slug/description fields (again, thus ignoring the spec which isn’t ideal) at this time, partly because I was getting errors and partly because I decided that I didn’t need them anyway.  I don’t use the description field in categories in SubText, so I just set the description to also be the title.  I also had to modify the wlwmanifest.xml file with:

<supportsNewCategories>Yes</supportsNewCategories>

and refresh my Live Writer account profile to pick up the changes.  The result is now my category options in Live Writer include an “add” feature:

Done with both of those.

Future Posting

This is something I started to look at and added the information to the MetaWeblog API, but it seems that SubText doesn’t filter out future posts in the UI – or at least my quick scan didn’t reveal it did.  I’ve moved on away from this one since I don’t future post right now, but I’ll come back to it in a while.  What I did do, however, to prevent me from thinking SubText supported this was modify my wlwmanifest.xml file to include this definition in the options:

<futurePublishDateWarning>Yes</futurePublishDateWarning>

This way at least if the idiot in me *thinks* I can do it, Live Writer will warn me.

So that’s it!  These little adjustments make my Live Writer + SubText experience AWESOME.  Live Writer truly is one of the best tools Microsoft puts out (aside from Silverlight of course).  I’m going to submit these modifications to the SubText team and see what sticks.  I assume none will since they are admittedly partial.  But I’ve been suggesting on the dev list that SubText expose a WordPress API and I have a feeling I’ll need to start working on that for the team.

Hope this helps some of you!

| Comments

For about a year now I've been using Amazon S3 services.  Mostly I'm using it for image storage for my blog and web site.  I decided to stop using Flickr for screenshot stuff and keep it to 'photographs' when I can.  I signed up for an S3 account and have been using it for screenshot type stuff since then.  If you don't know, S3 is a service that basically enables 'object' storage in the cloud.  An object can be anything really, but I'm treating it like a remote host for images.

The one thing Amazon doesn't provide themselves is a tool to manage your account...it is really an API only.  There are plenty out there that have implemented user interfaces around S3 services.  My two favorites are the S3 plugin for Firefox and BucketExplorerI use the Firefox one more than anything for uploading just because it was faster for what I needed.

UPDATE: While I still use the Firefox extension and always have it installed, I find myself using CloudBerry Explorer a LOT more.  It is the most full-featured (free) Amazon S3 tool I've seen and I love it.  They keep adding little subtle things to that make my process even easier!  Check it out today!

But the problem is that neither of the tools really incorporated *why* I was using S3 for me, which was primarily with my blog.  So a year ago I grabbed some of the sample code from the S3 developer site and whipped up a quick-and-dirty plugin for Windows Live Writer that I've been using.  I already had my Flickr4Writer plugin that I used for Flickr, but like I mentioned, I was using S3 for other image hosting now.  I was lazy though and only did a read version that inserted an image.  I was still relying on the other tools to upload, change permissions, etc. -- my workflow sucked.

Well as a part of The Code Trip, we set goals to release projects on CodePlex.  I decided to put this project out on CodePlex as far as I had it.  I immediately had a partner in Aaron Lerch.  He jumped in and within a day basically put in the remaining features that were lacking.

The result is the S3 Browser for Windows Live Writer project:

The initial 0.91 beta release is available on the project now.  Please give it a spin if you are a Live Writer and Amazon S3 user!

| Comments

the windows live team released an update to live writer.  get it now.  new insert video feature, upload to picassaweb when publishing to blogger, better image handling (i didn't know there was any bad because i use www.flickr4writer.com :-)).

keep the good stuff coming!