From: Benjamin Mako Hill Date: Sat, 17 Feb 2018 17:59:35 +0000 (-0800) Subject: make comment status open by default X-Git-Url: https://projects.mako.cc/source/kuro5hin_to_wordpress/commitdiff_plain?ds=sidebyside make comment status open by default --- 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) +