ailon's DevBlog: Development related stuff in my life

Diarist 2

4/30/2008 5:26:53 PM

diarist I came across Diarist blogging application for Windows Mobile last year when I was still running my personal blog on LifeType. Unfortunately back then there was a problem posting using Diarist to my blog in Cyrillic. Kevin Daly (author of the Diarist) was very supportive and tried every possible way to solve that issue but unfortunately we were unable to solve it and I had to postpone blogging from my phone until the planned and delayed (due to my laziness) move to BlogEngine.NET.

Now I've moved to BE.NET and Yesterday I finally decided to try Diarist again. However there was a problem adding my blog to Diarist. It looked that there were some misunderstandings in the encoding department between the two. The most frustrating part was that I clearly remember that I tried Diarist with BE back in 2007 and it worked. Anyway I contacted Kevin and once again he was on it almost immediately.

Less than one day have passed and voila - new fixed version of Diarist is released!

Now, I provide support for a couple of projects (1, 2) and try to do it in a timely manner but Kevin's speed makes me blush.

Keep up the great work, Kevin and thank you very much!

Migrating from LifeType to BlogEngine.NET

4/8/2008 6:37:46 PM

Note: this post doesn't cover BlogEngine.NET installation.

Yesterday I've moved my personal blog (in Russian) from LifeType to BlogEngine.NET.

I've used LifeType blogging platform (formerly know as pLog) since 2003. It's a decent, mature blogging engine for both standalone blogs and multi-blog communities. I didn't move away from it because there's something seriously wrong with it. I just had several minor reasons for the move:

  1. I have a personal Windows/.NET hosting account, but my blog was hosted on my company's server because of the blogging engine's PHP nature;
  2. I can do my share of PHP coding but I feel more at home with .NET these days;
  3. The most frustrating thing and the one which was the main reason for the move and main obstacle - there's no way to export blog content from LifeType into some widely supported format (like BlogML)

Unsolved Problems

In case you are going to follow my path, I want to warn you right away:

  1. I've lost all comments in the old blog. Since there are no tools to export them and no comment RSS, I decided to sacrifice comments rather than try and create some tool to export them from the MySQL database and then map to the posts in the new blog
  2. Back links to your own posts will be broken. To resolve this you'd need to make a mapping table of your old and new post IDs and then replace all the links based on that. I decided to skip this

Migration

The only readily accessible way to export posts from LifeType is RSS feed. The number of posts in RSS feed is controlled by "Number of recent posts" setting in LifeType. Since we need them all you should set this value to something that is undoubtedly higher than the number of posts in your blog.

Basically one may think that this is it - just feed your feed (sorry) to BlogEngine.NET's Blog Importer and you are set. Unfortunately it's not that simple.

First of all, as of this writing (BE.NET v.1.3), it looks like Blog Importer has problems opening feeds with parameters in the URL. But since LifeType's rss.php can serve default RSS profile (can be set in configuration) this is not a major issue. However, in my case, Blog Importer still choked on my feed. Maybe it was the number of posts (1200) in my blog, maybe something else but it didn't work out that way.

Anyway even if Blog Importer doesn't choke on your feed, you wouldn't want to import your posts that way unless you've never touched LifeType's Resource Gallery. So, we just need to save our full RSS feed content as file by simply downloading it with your favorite download manager. Make sure you set locale of your blog to English US even if your blog is not in English. At least in my case importing with Russian locale resulted in incorrect dates.

You can specify File Path in Blog Importer. Everything under that path is considered a file by it and will be downloaded into your new blog as is and appropriate URLs in your content will be modified accordingly. Unfortunately if you've used Resource Gallery in LifeType most of your images will have an src attribute looking something like this: http://yourdomain.com/blog/resserver.php?blogId=1&resource=someimage.jpg

Setting File Path to http://yourdomain.com/blog/resserver.php? (or something like this) doesn't work. Fortunately the image is physically accessible at http://yourdomain.com/blog/gallery/1/someimage.jpg (I guess this can vary slightly in different installations).

What we need to do is open our saved RSS file and run a replace changing

http://yourdomain.com/blog/resserver.php?blogId=1&resource=

to

http://yourdomain.com/blog/gallery/1/

Now we need to place our static RSS file on the server, because there's no option to load RSS file from disk in Blog Importer. I don't know what MIME-TYPE it expects to get but I was unable to find an extension for it to accept my RSS file. Finally I've changed extension to .aspx and voila, my RSS was finally declared valid.

I've set File Path field to http://yourdomain.com/blog/gallery/1/, entered connection information for my BE.NET blog and pressed Import. In a matter of seconds all my posts were imported into Blog Engine.

However there were still some issues left.

  1. File Path URLs were replaced with http://localhost/... URLs (I did the import on my local machine which is the only logical approach, imho);
  2. Author wasn't set on my posts, even though I've tried importing with "Use Source Author" checked and unchecked and usernames in both blogs were identical.

I've solved both of these issues by running a find & replace in files on App_Data/posts/ directory replacing http://locahlost/ with just a slash, and <author /> with <author>ailon</author>. The later wont save you if you had more than one author in your blog.

After that I've just uploaded all the files to my hosting server and everything (except the known issues above) seems to be working fine.

Hope this helps someone.

kick it on DotNetKicks.com

Hi...

10/7/2007 1:44:55 PM

There are some things that I want to write down so I can revisit/reapply them later and which don't fit into my personal blog. These things aren't always appropriate for my company's developer blog too. So, after some thinking and considerations, I decided to launch this one.

I'll be writing here about .NET, PHP, JavaScript, HTML, Windows Mobile, databases, developer tools and similar stuff most of the time. I know some things about these areas but often have to concentrate on one technology and then, sometimes after several years, revisit the other one. And sometimes I have to learn what I already knew a year ago the hard way. So, this is what this blog is about - my personal quick reference/notebook.

Tags:

Copyright © 2003 - 2010 Alan Mendelevich
Powered by BlogEngine.NET 1.6.1.0