This commit is contained in:
parent
c185dbb075
commit
5d947bf90c
1 changed files with 9 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue