From ec8d73f090bc56455efbadda708276de6f9f9dc0 Mon Sep 17 00:00:00 2001 From: Benjamin Mako Hill Date: Sat, 17 Feb 2018 09:59:35 -0800 Subject: [PATCH] make comment status open by default --- k5_to_wordpress_diary_importer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/k5_to_wordpress_diary_importer.py b/k5_to_wordpress_diary_importer.py index c41cb95..8c26222 100755 --- a/k5_to_wordpress_diary_importer.py +++ b/k5_to_wordpress_diary_importer.py @@ -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) + -- 2.30.2