0.1.2 • Published 7 years ago

migrate-wp-image v0.1.2

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

migrate-wp-image

迁移wordpress图片,并修改wordpress导出的xml文件

只需要实现图片上传接口,内置了基于七牛的实现

USAG

    # install
    npm i migrate-wp-image -g
    
    # run
    migrate-wp-image --qiniu qiniu.conf ./wordpress.2016-11-16.xml
    # or
    migrate-wp-image --fetcher fetch.js ./wordpress.2016-11-16.xml

fetch interface

fetch.js, 新的地址将用来批量替换xml中的文章的所有的图片链接,传入的参数来自xml中的post_typeattachment的项。

    module.exports = function (originImageUrl){
        return new Promise(function(resolve){
                // upload originImage and get originImageUrl
                // resolve(newImageUrl);
        });
    }

qinniu fetch config

    // inner qinniu image fetch config
    {
        "ACCESS_KEY": "ACCESS_KEY",
        "SECRET_KEY": "SECRET_KEY",
        "BUCKTE": "BUCKTE",
        "CDNSITE": "http://cdn.example.com/",
    }
0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago