make comment status open by default
[kuro5hin_to_wordpress] / k5_to_wordpress_diary_importer.py
index c41cb95bd4cb29f78b8ba6f829eb5f3567e2f64e..8c26222e0fec3ea034dfc1ee4562ebd9e2d0cd02 100755 (executable)
@@ -74,11 +74,12 @@ def process_file(input_text, filename):
     post.date = post_date
     post.terms_names = wp_terms 
     post.post_status = "pending"
-
-    wp.call(NewPost(post))
+    post.comment_status = "open"
     
+    new_post_id = wp.call(NewPost(post))
     
 for filename in sys.argv[1:]:
     with open(filename, "r", encoding="latin1") as f:
         process_file(f.read(), filename)
 
+

Benjamin Mako Hill || Want to submit a patch?