This commit is contained in:
Peter Molnar 2019-02-22 10:57:47 +00:00 committed by GitHub
parent c185dbb075
commit 5d947bf90c

View file

@ -45,8 +45,8 @@ for c, post in enumerate(data):
t = 'gallery'
cmd = "post_id=$(wp post create --porcelain --post_category='Facebook' --post_date='%s' --post_content=%s --post_title='%s')" % (
str(dt),
cmd = "post_id=$(wp-cli post create --porcelain --post_category='Facebook' --post_date='%s' --post_content=%s --post_title='%s')" % (
dt.format('YYYY-MM-DD HH:mm:ss'),
quote(content),
dt.format('YYYY-MM-DD HH:mm')
)
@ -76,6 +76,13 @@ for c, post in enumerate(data):
f
))
out.append("wp-cli post update ${post_id} --post_content=%s --post_status='publish' --post_author='4'" % (
quote("%s\n\n[gallery]" % content)
))
out.append("wp-cli post update ${post_id} --post_date='%s'" % (
dt.format('YYYY-MM-DD HH:mm:ss')
))
if len(out) == 1:
continue
else: