Preparing for release 0.3.0

This commit is contained in:
Marc Remolt 2011-06-13 19:02:25 +02:00
parent 90665484c7
commit 309ec660b9
3 changed files with 37 additions and 7 deletions

View File

@ -1,7 +1,7 @@
PATH PATH
remote: ./ remote: ./
specs: specs:
refinerycms-wordpress-import (0.2.0) refinerycms-wordpress-import (0.3.0)
bundler (~> 1.0) bundler (~> 1.0)
nokogiri (~> 1.4.4) nokogiri (~> 1.4.4)
refinerycms (~> 1.0.0) refinerycms (~> 1.0.0)

View File

@ -4,10 +4,7 @@ This litte project is an importer for WordPress XML dumps into refinerycms(-blog
You can find the source code on github: https://github.com/mremolt/refinerycms-wordpress-import You can find the source code on github: https://github.com/mremolt/refinerycms-wordpress-import
Keep in mind, this gem imports blog posts and pages, NOT the media files, as they are not Keep in mind that links to other pages of your blog are just copied, as WordPress exports them as <a>-Tags.
part of the XML dump! You have to manually readd them to Refinery.
The same goes for links to other pages on your site. WordPress exports them just as <a>-Tags.
If your site (blog) structure uses new urls, the links WILL break! For example, if you used If your site (blog) structure uses new urls, the links WILL break! For example, if you used
the popular WP blog url structure "YYYY-MM/slug", be warned that Refinery just uses "blog/slug". the popular WP blog url structure "YYYY-MM/slug", be warned that Refinery just uses "blog/slug".
So your inner site links will point to the old WP url. So your inner site links will point to the old WP url.
@ -84,6 +81,39 @@ If you want to clean the tables and import in one task:
rake wordpress:reset_and_import_pages[file_name] rake wordpress:reset_and_import_pages[file_name]
Finally, if you want to reset and import all data including media (see below):
rake wordpress:full_import[file_name]
== Importing media files
The WP XML dump contains absolute links to media files linked inside posts, like:
http://www.mysite.com/wordpress/wp-content/uploads/2011/05/cv.txt
The dump does NOT contain the files itself! To get them imported, this gem downloads the files
from the given URL and imports them to refinery. So for a working media import the old site with
the media URLs must still be online.
After importing the files, this gem replaces the old links in pages and blog posts with the
new generated ones. It parses all existing records searching for the right pattern. That
means, you have to import pages and posts FIRST to get the URLs replaced.
Now to the rake tasks for media import:
rake wordpress:reset_media
This task deletes all data from the media tables (images and resources), ensuring a clean import.
rake wordpress:import_and_replace_media[file_name]
This task imports all the WordPress media into Refinery. After the import it parses all
pages and blog posts, replacing the legacy links with the current refinery ones.
If you want to clean the tables and import in one task:
rake wordpress:reset_import_and_replace_media[file_name]
== Usage on ZSH == Usage on ZSH

View File

@ -4,8 +4,8 @@ Gem::Specification.new do |s|
s.name = "refinerycms-wordpress-import" s.name = "refinerycms-wordpress-import"
s.summary = "Import WordPress XML dumps into refinerycms(-blog)." s.summary = "Import WordPress XML dumps into refinerycms(-blog)."
s.description = "This gem imports a WordPress XML dump into refinerycms (Page, User) and refinerycms-blog (BlogPost, BlogCategory, Tag, BlogComment)" s.description = "This gem imports a WordPress XML dump into refinerycms (Page, User) and refinerycms-blog (BlogPost, BlogCategory, Tag, BlogComment)"
s.version = "0.2.0" s.version = "0.3.0"
s.date = "2011-06-05" s.date = "2011-06-13"
s.authors = ['Marc Remolt'] s.authors = ['Marc Remolt']
s.email = 'marc.remolt@googlemail.com' s.email = 'marc.remolt@googlemail.com'