From cb1e7fd7568b62ab96f3ce94544a63cf8111a29b Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 22 Feb 2008 19:30:20 +0100 Subject: another checkpoint, off to party redux --- wordpress-to-dir.py | 4 ++-- 1 file 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(): -- cgit v1.2.3-54-g00ecf