0
我想在今天早些时候将我的主博客转换为Octopress,所以我克隆了Octopress,并将其配置并部署到Heroku中。尝试将Blogger文章导入Octopress/Jekyll时出错
随后我就如何导入我的老博客文章到Octopress网,发现这个脚本作为它的答案:
https://gist.github.com/1578928
我导出的文件blog.xml
我。当我在要点中运行脚本时,出现以下错误。我刚刚开始使用Ruby,对此我不太了解。如果有人能帮助我,我会很高兴。该错误似乎是全新的,迄今为止我无法从我的搜索中找到任何答案。
import.rb:33:in `add': dunno ide (RuntimeError)
from import.rb:158:in `block in <main>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/nokogiri-1.5.2-x86-mingw32/lib/nokogiri/xml/node_set.rb:239:in `block in each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/nokogiri-1.5.2-x86-mingw32/lib/nokogiri/xml/node_set.rb:238:in `upto'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/nokogiri-1.5.2-x86-mingw32/lib/nokogiri/xml/node_set.rb:238:in `each'
from import.rb:157:in `<main>'
XML很好,我找不到任何称为“ide”的类型,除了在一篇文章中,我认为这不会有任何问题。 – 2012-05-20 12:45:49
我不确定这个XML是怎么样的(如果你不介意发表至少一些有用的信息),但是这是脚本如何处理'type':'type = node.search('类别 ')。first.attr(' 术语 ')。分裂(' #')。last'。所以本质上它解析'category'的术语,并期望找到'post'或者'comment'来做一些有意义的事情,或者'template','settings'来默默地忽略。哦,所有这些发生在“入口”节点内。 – dain 2012-05-20 15:59:50
我有使用博主,[import.rb gist](https://gist.github.com/dnagir/1765496)脚本和八章相同的问题。 * **避免**在ruby中引发异常:'else raise'dunno'+ type' * **或**从您导出的博客XML中删除注释。 – 2013-02-25 19:10:22