Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Import/Export your blog <-> localhost with Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Type||Name||Latest commit message||Commit time|
|Failed to load latest commit information.|
= Script of "blog-import-export" blog2pstore.rb: This script backups your Blog to your localhost. You can backup - All articles - All categories pstore2blog.rb: This script imports your backup Blog to your new blog. You can imports - All articles - All categories = LICENCE Copyright 2011 ARAKI Yasuhiro <firstname.lastname@example.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. = DEPENDENCY This library uses only Ruby standard libraries. pstore xmlrpc/client = SYNOPSIS == How to export articles from your blog to localhost. 1. Open blog2pstore.rb and set parameters username = "username" password = "password" dbfile = "/tmp/blog-get" endhost = "endpoint.example.com" endpath = "/api/xmlrpc.cgi" 2. Just execute the following command: $ ruby blog2pstore.rb == How to import articles from localhost to your NEW blog 1. Open pstore2blog.rb and set parameters username = "username" password = "password" dbfile = "/tmp/blog-get" faildbfile = "/tmp/blog-fail" endurl = "endpoint.example.com" 2. Just execute the following command: $ ruby pstore2blog.rb == NOTE These codes takes a long minutes to succeed. Typically, it takes 3 to 10 articles per second.