Windows Live Writer + SubV2 = Not bad, really

by matt 16. August 2006 22:43

So, as previously noted, I've been trying to get Windows Live Writer working nicely with SubV2. Once I realised that the MetaWeblog API is actually plumbed in, I tried it all out. An hour or two of tweaks to the code later, and it's working rather nicely.

There were a couple of problems. Null data in the XMLRPC structs were not being ignored, so an exception was thrown. Also, posts weren't getting created because the security was checking that you were logged in on the website, and well, you aren't. For now, I've just commented out the check (not in the least bit dodgy!)

I've even added RSD support, so that WLW can just look at the homepage and auto-configure everything. Super.

The RSD support comes from a new http handler Rsd.ashx. Unfortunately, the xml content is written from the code. I'm not sure how to write markup in an ashx file - I just got compile errors. I presume you could wrap everything in asp.net style controls, and take it from there. (I also need to add output caching. Add another todo to the list)

Part of the wizard tries to create a post, gets the homepage and works out the styles so that it can provide a web page preview. This fails. Creating the post is fine, but the fetch of the page doesn't work out too well. SubV2 makes heavy use of caching, but some of the cache code is very broken. I've already fixed a bug where cached items don't expire (the value in the web.config is never passed in - evidence of this is that I posted a comment on one of Darren's post two days ago, and it still hasn't appeared!) and I've cleaned up a lot of issues where the cache wasn't invalidated when posts and categories were created, deleted or edited. One I haven't sorted out is invalidating the list of posts - this doesn't get invalidated. Which means that the new post created by WLW doesn't get displayed on the homepage, and the whole auto-discovery process falls on it's face. Quickest way to fix? Set the cache timeout to 10 seconds.

So, bugs. The most obscure I've found so far is if you're highlighting text with the cursor keys + shift, you're at the end of the file, you go left, you can't de-select text by going right. Another biggie is editing a post and hitting publish create a new post, rather than updating the original. And when you get the latest posts, they don't get persisted anywhere, which is a shame.

And SubV2 doesn't support the newMediaObject method, so no uploading pictures.

But all in? I rather like it. Beats editing in FreeTextBox on a web page that times out after 10 minutes. Just got to fix some of those bugs...

Tags:

SingleUserBlog

Comments

Add comment


(Will show your Gravatar icon)

biuquote
  • Comment
  • Preview
Loading



About the author

Something about the author

Calendar

<<July 2010>>
MoTuWeThFrSaSu
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

View posts in large calendar

RecentComments

Comment RSS

License

Creative Commons License
Except where otherwise noted, content on this site is by Matt Ellis and is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.

©2010 Matt Ellis