V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
loserwn
V2EX  ›  Node.js

HEXO 迁移过程中,将原有 wordpress 迁移过程出错。YAML 报错,求解。

  •  
  •   loserwn · 2015-08-10 21:16:27 +08:00 · 3487 次点击
    这是一个创建于 3174 天前的主题,其中的信息可能已经有所发展或是发生改变。
    YAML不熟悉。感觉hexo-migrator-wordpress适配性可能还是存在问题。

    在使用命令:
    <code> $hexo migrate wordpress ~/Downloads/wordpress.2015-08-10.xml</code>

    中,报错:
    <code>
    ...
    INFO Post found: 一份儿借鉴的旅行笔记
    FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
    JS-YAML: can not read a block mapping entry; a multiline key may not be an implicit key at line 2, column 5:
    date: 2009-12-25 14:48:45
    ^
    ...
    </code>
    具体XML中大致位置:
    <code>
    32727 <excerpt:encoded><![CDATA[]]></excerpt:encoded>
    32728 <wp:post_id>161</wp:post_id>
    32729 <wp:post_date>2009-12-25 22:48:45</wp:post_date>
    32730 <wp:post_date_gmt>2009-12-25 14:48:46</wp:post_date_gmt>
    32731 <wp:comment_status>open</wp:comment_status>
    32732 <wp:ping_status>open</wp:ping_status>
    </code>

    其中 46秒 和 45秒 的区别是我特意修改了一次xml用于定位问题的。但是,整个xml文件中现在只有这个位置有跟这个时间点字符串有关的信息。

    现在不知道从哪里下手了。
    还请各位有经验的同学协助分享一下经验。
    2 条回复    2015-08-16 22:24:13 +08:00
    hanan321
        1
    hanan321  
       2015-08-16 14:31:04 +08:00
    文章的迁移建议先wp后台把数据导出为xml文件,再用exitwp转成md。
    https://github.com/thomasf/exitwp
    loserwn
        2
    loserwn  
    OP
       2015-08-16 22:24:13 +08:00
    @hanan321 感谢,我以为这么就都没有人理我了。。我去试试。非常感谢。 Orz
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3583 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 04:37 · PVG 12:37 · LAX 21:37 · JFK 00:37
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.