projects
/
kuro5hin_to_wordpress
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
67dc510
)
make comment status open by default
master
author
Benjamin Mako Hill
<mako@atdot.cc>
Sat, 17 Feb 2018 17:59:35 +0000
(09:59 -0800)
committer
Benjamin Mako Hill
<mako@atdot.cc>
Sat, 17 Feb 2018 17:59:35 +0000
(09:59 -0800)
k5_to_wordpress_diary_importer.py
patch
|
blob
|
history
diff --git
a/k5_to_wordpress_diary_importer.py
b/k5_to_wordpress_diary_importer.py
index c41cb95bd4cb29f78b8ba6f829eb5f3567e2f64e..8c26222e0fec3ea034dfc1ee4562ebd9e2d0cd02 100755
(executable)
--- 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)
+
Benjamin Mako Hill
||
Want to submit a patch?