A blog about .NET, Graffiti, Community Server, and Kevin's life

Announcing the DotText-CS-Converter tool

As I mentioned in a previous post, I created a conversion tool to convert .Text content to Community Server. It is now available for download with source code included (see link below).

The tool is a GUI wizard that can be run on any machine. You do not need to have Community Server installed on the same box. Your .Text and CS installations can be on the same or different SQL servers. However you will need to have the ability to connect directly to your SQL Server(s) over the internet from the machine this utility is being run on. It uses custom sql commands to read .Text data, and it uses the Community Server business and data objects to save the CS data. So, in theory, it should be saving the CS data about the same way as if you had created it from admin screens.

It converts users, weblogs, posts, articles, comments, trackbacks, referrals, view counts, links, and categories. The only kind of .Text content it does NOT convert is .Text photo galleries. I plan on adding that into a future version of this tool, so if you need to convert .Text photo galleries you may want to hold off on upgrading your blog.

If you have an earlier version of .Text (i.e. version .93 or .94) you can apply the v0.95 sql upgrade scripts to upgrade your schema, and then run this tool. If you are upgrading in this way, make sure the blog_config.IsActive column is populated before running this tool. Thanks to Grant Carpenter for providing this upgrade info.

I used this tool to convert my blog to Community Server, and today several other people volunteered to test it and also used it to successfully convert blogs. I made several fixes and tweaks as a result of their tests and comments (thanks guys!). There very well may still be bugs in the converter, so I recommend that you make a copy of your .Text and Community Server databases (and sites) and run this tool on the copy first. I did this by installing .Text 0.95 and CS 1.0 on my dev machine, and pointed them both to a local sql server database that was a copy of my live site's. This way you can verify that your configuration and content will be converted correctly before you run it on your live site(s). If you can't do this, you may want to wait a day or two before running this tool to allow time for any remaining bugs to be caught and fixed. Or if you are feeling lucky you can go for it all right now. =)

Click Here to Download the DotText-CS-Converter utility

  1. Unzip the file.
  2. Read the READ_ME_FIRST.txt file for more information and detailed directions.
  3. Run the DotText-CS-Converter.exe program.

For questions or help, email me or just ask in the CommunityServer.org forums so everyone can see the answer. I will post any updates to this tool on my blog and in the Community Server forums. My next blog post is going to be a "behind the scenes look" at the making of this tool!

UPDATE - 3/8/05

Unfortunately there was indeed a bug in the 1.0 release, which sometimes occured if you converted two or more blogs at the same time. This should be fixed now, and the updated version is uploaded at the same link as before (see above). You can tell if you have this updated version by looking in the included READ_ME_FIRST.txt file. At the top of the file it should say version 1.1 instead of 1.0. Please redownload the utility if you downloaded it before 9:15 AM E.T. on March 8, 2005. Thanks!

UPDATE 2 - 3/8/05

DotText-CS-Converter does NOT create the blog subdirectories under /blogs. That's because in order for it to run anywhere like it can, it only does database conversion. You will probably need to do this manually by using FTP, it only takes a minute unless you have a huge number of blogs. You want to create a directory the same name as your blog under your blogs folder (/blogs in a default install), and then put an empty default.aspx file in that directory.

I will add this step to the Read_Me file. I am also looking into adding something to the utility to make the creation of the directories more automated. See this CS Forums post for info on that.

UPDATE 3 - 3/8/05 5:32 PM

I just released a new version of this tool - Version 1.2. I changed the file name to DotText-CS-Converter_v1.2.zip and updated the download link above. This version includes a fix and an enhancement:

Fix: A bug was found where if you checked the "auto create an empty gallery" option, and were converting two or more .Text blogs that had the same username, you would get an error because it would try to create a CS Gallery with the same name more than once. This has been corrected in v1.2.

Enhancement: I added a new conversion option to create the necessary blog directories (and default.aspx files) during conversion on the machine the utility is being run from. See Update #2 for the background on this. Now, if you leave this option enabled, all you will need to do is to upload those directories to the /blogs folder on your Community Server web site. More detailed info about this is included in the read_me file.

» Similar Posts

  1. Version 2.2 of the DotText-CS-Converter is now available
  2. Version 2.1 of the DotText-CS-Converter is available
  3. Version 2 of DotText-CS-Converter is released!

» Trackbacks & Pingbacks

  1. 先日紹介していたネタですが、次のコンバーターが出てきました。どうもフォーラムを見ている限りはこちらの方がよさそうです。

    Shinichi Haramizu's Blog — March 8, 2005 6:37 PM
  2. For those few of you who subscribe to my blog via RSS or ATOM and read


    it in an aggregator instead of...

    Kevin Harder — March 8, 2005 6:39 PM
  3. Public Class GeoffAppleby — March 8, 2005 9:09 PM
  4. DotText-CS-Converter is a conversion program to convert all .Text content to Community Server. Read my...

    Kevin Harder — March 16, 2005 12:16 AM
  5. DotText-CS-Converter is a conversion program to convert all .Text v0.95 content to Community Server....

    Kevin Harder — March 24, 2005 1:06 AM
  6. Como prometí, unos comentarios de como me fue con la migración de .Text a Community Server.

    Nazul's Weblog — March 27, 2005 7:23 PM
  7. geek' — June 19, 2005 5:08 PM
  8. As you can see (well, not you that use the rss), I've changed the software for my blog to Community Server....

    Hardcode — October 25, 2005 6:23 PM

» Comments

  1. Paul Scott avatar

    Great work Kevin. I've been following your progress. Looks like you ended up with a very useful tool.

    Paul Scott — March 8, 2005 1:05 AM
  2. Geoff Appleby avatar

    Hey man,


    You've done well. I'm currently trying to get the folks at CodeBetter upgraded. I've noticed a wierd behaviour - if i select multiple users to be converted in one hit, then it it always crashes out during the first user.


    If i select them one at a time, then it works.



    However, my question is:


    When I do a conversion, is it possible to get it so that the urls end up identical?


    For example, I have a post on codebetter with a URL of http://codebetter.com/blogs/geoff.appleby/archive/2005/02/26/56013.aspx.


    When I ran the conversion localy at home, the same blog post was http://localhost/blogs/geoff.appleby/archive/2005/02/26/58028.aspx.


    What i want is for it to retain the '56013.aspx' part of it. Do you think it can be done? If not, I won't even try to delve into your source :)



    --Geoff

    Geoff Appleby — March 8, 2005 4:25 AM
  3. Derick Bailey avatar

    DotText-CS-Converter: Thank you Kevin Harder!

    Derick Bailey — March 8, 2005 7:46 AM
  4. kevin avatar

    Geoff,


    That last number in the URL for Community Server is the cs_Posts.PostID value, which is an identity column. So it could be done, but not the way this tool is currently saving data by using the CS backend. I'll investigate this further.

    kevin — March 8, 2005 9:32 AM
  5. Vermyndax avatar

    Hi Kevin...



    I ran into a problem, here's a post of the log file:



    ============================================================


    DotText-CS-Converter Log File


    3/8/2005 2:49:51 PM: New Converstion Job Started


    ============================================================



    3/8/2005 2:49:51 PM: Created User Vermyndax


    3/8/2005 2:49:52 PM: Created Weblog Vermyndax's Lair


    3/8/2005 2:49:53 PM: Retrieved .Text content for Weblog Vermyndax's Lair


    3/8/2005 2:49:53 PM: Converting posts for Weblog Vermyndax's Lair


    3/8/2005 2:50:35 PM: Finished converting posts for Weblog Vermyndax's Lair


    3/8/2005 2:50:35 PM: Converting articles for Weblog Vermyndax's Lair


    3/8/2005 2:50:45 PM: Finished converting articles for Weblog Vermyndax's Lair


    3/8/2005 2:50:45 PM: Converting links for Weblog Vermyndax's Lair


    3/8/2005 2:50:46 PM: Finished converting links for Weblog Vermyndax's Lair


    3/8/2005 2:50:46 PM: Error occured during conversion!


    Error Message: Violation of UNIQUE KEY constraint 'IX_cs_Sections_Validation'. Cannot insert duplicate key in object 'cs_Sections'.


    The statement has been terminated.


    Stack Trace: at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)


    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()


    at CommunityServer.Data.SqlCommonDataProvider.CreateUpdateDeleteSection(Section section, DataProviderAction action)


    at CommunityServer.Components.Sections.AddSection(Section section)


    at KevinHarder.DotText_CS_Converter.Converters.CreateEmptyGallery(Int32 settingsID, String groupName)


    at KevinHarder.DotText_CS_Converter.Converters.CreateUser(String username, String password, String email, Int32 settingsID, StringCollection roles, Boolean autocreateGallery)


    at KevinHarder.DotText_CS_Converter.Conversion.Convert()



    ...I have the 1.1 version according to the readme... any ideas?

    Vermyndax — March 8, 2005 3:53 PM
  6. Geoff Appleby avatar

    Thanks kevin, that would be great.

    Geoff Appleby — March 8, 2005 5:18 PM
  7. kevin avatar

    For those of you reading the comments, I replied to Vermyndax and explained what the error was on the CS Forums here:


    http://www.communityserver.org/forums/476141/ShowPost.aspx#476141



    The fix for this issue is included in version 1.2

    kevin — March 8, 2005 5:30 PM
  8. coo11 avatar

    great job!



    and i'm holding on for the gallery converter section! yeah!

    coo11 — March 8, 2005 9:49 PM
  9. Mario G. Contreras Arriaga avatar

    Your Converter tools is really great. Thank you.




    I migrate a .Text site with 5 blogs and now I'm working in my own site. Now that I'm working on this project I realize that the additional (and optional) Entry Name is not migrated.



    I have a lot of post with this attribute. This can help me to see a specific post like this:



    http://www.nazul.net/blog/archive/2005/03/11/CsMigration.aspx



    Instead of:



    http://www.nazul.net/blog/archive/2005/03/11/1542.aspx



    In reallity, both versions works but the RSS feed (and all .Text) uses the first one if the name is specified.



    This value is really important for me to be passed to CS because this way my URLs will still be valid since the migration tool (because the identity columns) doesn't preserves the id of the post.



    Are you planning to include this in a future release? If not, Can you tell me what (and where) should I do to modify in the source code in order to be able to pass this value?



    Thank you.

    Mario G. Contreras Arriaga — March 11, 2005 6:50 PM

Comments are closed