将wordpress xml导出文件拆分为较小的文件,以导入到新的wordpress安装中。
choppedpress的Python项目详细描述
简介
choppedpress允许您将wordpressXML导出文件拆分为较小的文件,这些文件可用于将文章、评论、标记和类别导入新的wordpress安装。
示例
假设您已经完成了将所有文章、注释和标记导出到名为my-blog-YEAR-MONTH-DATE.xml的文件中的过程,然后可以使用以下命令将其拆分为几个较小的xml文件:
choppedpress my-exported-wordpress.xml
这将生成two(这是默认值)名为out01.xml和out02.xml的XML文件。生成文件的名称和/或要生成的文件数量可以通过使用choppedpress–help显示的适当标志来指定。
Usage: choppedpress <INFILE> [[<OUTFILE>] [<TAG>] [<NUMBER>]]
ChoppedPress lets you split the WordPress XML export file into smaller files that can be used to import your posts, comments, tags and categories into a new WordPress installation.
- Options:
--version show program’s version number and exit -h, --help show this help message and exit -i <FILE>, --infile=<FILE> The XML file generated by WordPress -o <FILE>, --outfile=<FILE> The name for the smaller XML files. [default: out] -t TAG, --tag=TAG The XML tag that represents your data. [default: /rss/channel/item] -n NUMBER, --number=NUMBER How many new files should be generated. [default: 2]
安装
ChoppedPress is available at PyPI,所以 安装它就像执行一样简单:
pip install choppedpress
或者您可以下载最新版本并使用setup.py:
git clone git@github.com:omaciel/choppedpress.git cd choppedpress python setup.py build install