Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #28 from huxuan/private

fix yaml header problems
  • Loading branch information...
commit 63c48bde926bd78167ae4deee3342dfbc30433a7 2 parents dcbbe79 + f173101
@thomasf authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 exitwp.py
View
7 exitwp.py
@@ -255,11 +255,12 @@ def get_attachment_path(src, dir, dir_prefix='a'):
out = None
yaml_header = {
'title': i['title'],
- 'date': i['date'],
+ 'date': datetime.strptime(i['date'], '%Y-%m-%d %H:%M:%S'),
'slug': i['slug'],
- 'status': i['status'],
- 'wordpress_id': i['wp_id'],
+ 'wordpress_id': int(i['wp_id']),
}
+ if i['status'] != u'publish':
+ yaml_header['published'] = False
if i['type'] == 'post':
i['uid'] = get_item_uid(i, date_prefix=True)
Please sign in to comment.
Something went wrong with that request. Please try again.