diff options
author | Andy Wingo | 2008-02-22 19:30:20 +0100 |
---|---|---|
committer | Andy Wingo | 2008-02-22 19:30:20 +0100 |
commit | cb1e7fd7568b62ab96f3ce94544a63cf8111a29b (patch) | |
tree | eb7696dfef7a111eb390a9611123a72851de2096 | |
parent | bdc98f612bd66a35d9a4b3eeb46d26c362bc7dd9 (diff) | |
download | tekuti-cb1e7fd7568b62ab96f3ce94544a63cf8111a29b.tar.gz tekuti-cb1e7fd7568b62ab96f3ce94544a63cf8111a29b.zip |
another checkpoint, off to party redux
-rw-r--r-- | wordpress-to-dir.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wordpress-to-dir.py b/wordpress-to-dir.py index 7d60734..f8710df 100644 --- a/wordpress-to-dir.py +++ b/wordpress-to-dir.py @@ -38,7 +38,7 @@ def post_comments(post): sql = ('select comment_ID, comment_author, comment_author_email,' ' comment_author_url, comment_author_IP,' ' comment_date, comment_date_gmt, comment_content, comment_approved' - ' from wp_comments where comment_post_ID=%s where comment_approved!=\'spam\'') + ' from wp_comments where comment_post_ID=%s and comment_approved!=\'spam\'') cur.execute(sql, (post['id'],)) keys = ('id', 'author', 'author_email', 'author_url', 'author_ip', 'date', 'date-gmt', 'content', 'approved') @@ -70,7 +70,7 @@ def write_comment(comment, dir): def make_post_key(post): d = post['date'] pre = '%d/%02d/%02d/%s' % (d.year, d.month, d.day, post['name']) - return urllib.quote(pre, '').tolower() + return urllib.quote(pre, '').lower() def write_post(post, categories, comments): def make_metadata(): |