Exporting all posts from a .Text (dottext) blog via RSS

I recently started moving my personal blog from .Text (dottext) to WordPress. WordPress has the ability to import from many other blogging systems, but .Text is not one of them. Luckily WordPress is able to import an RSS file. The only problem: .Text has a hard limit of the 10 most recent posts in the RSS feed. There is the option to change this number in the admin interface, but it does not work. I knew that what I needed was an RSS feed of all of my posts from the last 6 years, all at once. So I dug out the code.

It turns out that it was not very difficult to solve this problem, some minor changes and we have an unlimited* number of posts in the feed at the same time. As an extra bonus I turned off the aggbug, which is appended to every post in the RSS feed and is used to provide statistics to .Text. Below I have shown the 2 lines of code that have to be changed in order to get your super feed.

from Entries.cs

121: return GetConditionalEntries(99999999,PostType…etc);

from RssWriter.cs

42: this.UseAggBugs = false;

I appreciate that many of you are likely to be as lazy as me, so here are the pre-compiled DLL’s.

Method:

  1. Backup everything including database and DLL files
  2. Extract the 2 DLL files that you downloaded above and place them in the bin folder of your .Text folder on your webserver
  3. Open your RSS feed in your browser and save it as RSS.xml
  4. Overwrite the new DLL’s with the backed up originals
  5. Profit!

Disclaimer: Although I can’t imagine what would go wrong, something might. I am not responsible for any Bad Things that happen as a result of following the advice in this post including, but not limited to: explosions, fires and massive data loss. If any Good Things happen, then I am responsible. If you are afraid of my pre-compiled DLL’s, just compile your own.

If you need the .Text source code, it can be downloaded from the GDN workspace here.

In a future post I will cover exporting comments from .Text and importing them into WordPress.

*there is a limit, it is 99,999,999 posts. I figure you probably have less than that, but if you need more then just change the 99999999 in Entries.cs to a number of your choice.