From 493678c336c5661a11c459c46d746a884c7ccbca Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Sun, 22 Nov 2009 17:21:16 +1100 Subject: [PATCH] Set draft post's kind to 'draft' to the blogging helper ignores them --- importer/wordpress.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/importer/wordpress.rb b/importer/wordpress.rb index 2d8fa53..4461f4c 100644 --- a/importer/wordpress.rb +++ b/importer/wordpress.rb @@ -109,8 +109,8 @@ module Importer :section => find_topmost_category(@categories[categories.first])[:slug], :title => get(post, 'title'), :created_at => get(post, 'wp:post_date_gmt'), - :kind => 'article', } + attributes[:kind] = attributes[:status] == 'publish' ? 'article' : 'draft' if attributes[:slug].empty? puts "WARNING: Error post #{attributes[:post_id]} has no slug, generating one"