最新消息:备用域名:https://yeeach.me

Live Spaces ->WordPress 迁移工具:Live Space Mover

技术 3248浏览 3评论

在dreamhost.com申请了一个域名yeeach.com,dreamhost.com主机提供了wordpress的直接支持,只需要点击一下就可以安装完成,倒也方便,需要把live spaces的同步到yeeach.com的wordpress上,google了一下,发现有一个较为实用的工具,使用很简单,帮助文档上基本上说明得很清楚。

几点需要注意的:

1、安装方法:

在页面上没有详细说明生成RSS 文件后怎样在wordpress中导入生成的文件,可以参看生成的

export_xxxxxxxx-xxxx.xml中的头部的说明文档

This is a WordPress eXtended RSS file generated by Live Space Mover as an export of
your blog. It contains information about your blog’s posts, comments, and
categories. You may use this file to transfer that content from one site to
another. This file is not intended to serve as a complete backup of your
blog.

To import this information into a WordPress blog follow these steps:

1.    Log into that blog as an administrator.
2.    Go to Manage > Import in the blog’s admin.
3.    Choose "WordPress" from the list of importers.
4.    Upload this file using the form provided on that page.
5.    You will first be asked to map the authors in this export file to users
    on the blog. For each author, you may choose to map an existing user on
    the blog or to create a new user.
6.    WordPress will then import each of the posts, comments, and categories
    contained in this file onto your blog

2、导出格式问题

导出的文件好像没有包含分类信息,导致导入wordpress后,全部为Uncategorized

 

 

http://blog.broom9.com/?page_id=519

A python script for importing blog entries from live space to WordPress.

Tested on Python 2.5 and Windows XP.

Based on the wonderful HTML parser library BeautifulSoup.

Can move both posts and comments (since version 0.9). Provides 3 modes : “postsOnly”,”commentsOnly” and “all” (default).

Hosted on Google Code, Source code svn is

svn checkout http://live-space-mover.googlecode.com/svn/trunk/ live-space-mover

If there are any problems when using this script, feel free to contact me. weiwei9 AT gmail dot com

User Guide
  1. Install Python runtime. I only tested this code on Python 2.5.
  2. Download the newest release zip from the download page, extract it. (Older versions may become unusable because of the HTML changes of Live Space).
  3. Download the BeautifulSoup.py, and place it in the same directory of live-space-mover.py, or install it into Python runtime by yourself
  4. Change your live space settings
    1. Make sure it is open for anyone
    2. Change time zone to be GMT (+00:00)
    3. Change date format to be yyyy/mm/dd, or mm/dd/yyyy, this probably depends on the locale setting of your system or browser. If the program fails and complains about date parsing, try to use the option -t to specify date time format.
  5. See 1st Note to fix something of Python.
  6. Run the live-space-mover.py script. In Windows, open the command line, change to the directory of live-space-mover.py, run command like this

    python live-space-mover.py -s http://yourspaceid.spaces.live.com/

    Replace the example values with your own. This will generate an XML file named “export_xxxxx.xml” in the same directory of this script, which is in WordPress export file format.
  7. Use the import function in WordPress to import the XML file generated in the last step.
Notes
  • If you met an “UnicodeDecodeError”, that’s probably because your live space contains Italian or other languages. There is a bug in Python 2.5, you need to fix it. Yes, fix Python library by your own hands :P
    If you installed Python to it’s default path on Windows, what you need to do is to change the file C:\Python25\Lib\sgmlib.py, in line 394
    if not 0 <= n <= 255:
    should be changed to
    if not 0 <= n <= 127:
    That’s all, I learned this from here
  • Since version 1.1, this program can resume fetching if it was broken by some unknown reason such as network error or server error. It will generate a file “entries.cache” in the working directory while fetching, to store the posts and comments it has downloaded. If it ends unsuccessfully, next time it will try to load posts and entries from that cache file first. So if this program fails because of some network problems, try to restart it. It won’t download the posts already in the cache again.
  • This mover heavily depends on some very weird and sucking patterns of HTML and JavaScript codes in live space. So it may become unusable at any time….in that case please inform me
  • As I studied, the metaWeblog API in WordPress seems not to support comments? WordPress supports other two kinds of XML-RPC interfaces, too, blogger and MovableType. The blogger API has been updated to GData, and the old API looks not supporting comments, too. The documentation of MovableType API is so complex….I can’t understand yet.So maybe it would be much easier to write a mover with PHP which can handle comments.
  • This script may generate log file and cache file in the working directory. If you met some errors, it would be very helpful to send the log file and error message to me. Thank you.
  • You can use command

    python live-space-mover.py -help

    to check other options of this script
  • Since version 1.0, the suggested usage method is to export an xml file then import it. The directly posting method with MetaWeblog interface has been deprecated but left in the release package for anybody’s needs.
Change Log

* Version 1.1
– BUG: Error when title is empty
– NEW: Add cache and resume ability

* Version 1.0
– Use XML file and import function of WordPress, instead of MetaWeblog and post
– Change some fetching codes according to the code changes of live space
– Fixed a bug of extracting email address of comment author

* Version 0.93
– Add Donate Link

* Version 0.92
– Fix some bugs

* Version 0.9
– NEW: Support moving comm
ents. Add file “my-wp-comments-post.php” for posting comments
– NEW: Add running modes, for only moving posts/comments, or both

* Version 0.2
– BUG: Error when reading live space in Italian or other languages. Actually it’s a bug of Python 2.5.
– BUG: Doesn’t jump out loop after moving the oldest entry.
– NEW: Support date format pattern specifying, added -t option
– NEW: Support starting from a specified entry, added -f option

* Version 0.1
– NEW: Starting, used to move my own live space

Thanks

Great Thanks for Michele Nasti and Oliver Diaz Herrera, they used this script, reported bugs to me and helped me to solve them. I’m not a patient guy and I don’t have many blogs to test this script too much. It’s them, the nice users, who made this script really usable.

It’s so wonderful to cooperate with guys all around the world ;-p

Donate

If you are feeling generous….

 

Technorati 标签: , , ,

转载请注明:出家如初,成佛有余 » Live Spaces ->WordPress 迁移工具:Live Space Mover

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (3)

  1. Thanks a lot to you... It was a great help from you and your great script that enabled us to move our spaces to Wordpress 😀
    Oliver17年前 (2007-10-02)回复
  2. Thanks a lot to you, to develop the script. The Saoblog in La Ventana de Saouri now is in Wordpress because of you and Oliver 😉 Greetings from Venezuela
    Saouri17年前 (2007-10-03)回复
  3. Hello, I am, Robert lots of info on here check out my page: http://MlhxAtD.spaces.live.com/
    SafkemPlayela15年前 (2008-10-21)回复