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'
|
t = 'gallery'
|
||||||
|
|
||||||
|
|
||||||
cmd = "post_id=$(wp post create --porcelain --post_category='Facebook' --post_date='%s' --post_content=%s --post_title='%s')" % (
|
cmd = "post_id=$(wp-cli post create --porcelain --post_category='Facebook' --post_date='%s' --post_content=%s --post_title='%s')" % (
|
||||||
str(dt),
|
dt.format('YYYY-MM-DD HH:mm:ss'),
|
||||||
quote(content),
|
quote(content),
|
||||||
dt.format('YYYY-MM-DD HH:mm')
|
dt.format('YYYY-MM-DD HH:mm')
|
||||||
)
|
)
|
||||||
|
@ -76,6 +76,13 @@ for c, post in enumerate(data):
|
||||||
f
|
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:
|
if len(out) == 1:
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue