blog

AIvolution – Artificial Intelligence (AI) and Digital Technologies in the EU

Last Thursday, November 16th, we had the conference AIvolution, about AI and digital technologies in the EU, in the Brussels site of the European Parliament (EP). I had the pleasure of organizing and chairing the conference with MEP Eva-Maria Poptcheva…
Read more

将老新浪博客的信息搬家到WP

使用了CRIFAN的脚本和以下的方法. http://blog.sina.com.cn/s/blog_65db998401016jdl.html 以下为引用 新浪博客用了2、3年了,其实还是蛮好用的,只是也太缺少变化,主题就那几种,很久不更新。 很羡慕网上看到的各种个人站点,觉得作为一个IT从业人员,拥有一个自己的站点也是件不错的事情。 于是去注册了个域名,名字就是我常用的网名。买了个虚拟主机,装上wordpress。 麻烦的是如何把新浪博客里攒下的文章导入进来,曾经blogbus的博客搬家工具是可以把各大博客导入到他们的站点,而他们的站点就是基于wordpress。 但是现在似乎新浪把blogbus的搬家工具给封了,用不了。在网上搜刮了1个多小时,找到了crifan大侠的作品,功能强大,简便易用。http://www.crifan.com/crifan_released_all/website/python/blogstowordpress/ 详细的说明都有了,而我们操作起来也非常简单。代码下载下来,直接python执行就好。 BlogsToWordpress.py -s http://blog.sina.com.cn/bluemonster0808 -g no -w http://bluemonster.cn/wordpress/wp-content/uploads/pic -s指定博客首页 -g 指定不开启google翻译 -w 指定图片路径。因为之前的图片都是存在新浪,博客里的img src都是新浪的,所以要指定为你预备替换的图片路径,比如我就放在自己的wordpress默认图片路径下 不过,新浪博客的图片地址不是img src=,而是这样的 img src=”http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif” real_src=”http://bluemonster.cn/wordpress/wp-content/uploads/pic/65db99844a73dcd762b5b.jpg” width=”98″ height=”346″ alt=”C++产生伪随机数” title=”C++产生伪随机数” 然后这个脚本里替换了real_src而没有替换src,导致wordpress里图片不能显示。 这里的src和real_src是给JS脚本动态加载图片用的。 自己用文本编辑器改一下就好,比如vim下一条命令就够了 :%s/src=”http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif” real_//g