X-Git-Url: https://projects.mako.cc/source/kuro5hin_to_wordpress/blobdiff_plain/67dc510ff5b8776de8d688f8ed5486d3d1359fe2..ec8d73f090bc56455efbadda708276de6f9f9dc0:/k5_to_wordpress_diary_importer.py?ds=inline 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) +