summaryrefslogtreecommitdiffstatshomepage
path: root/wordpress-to-dir.py
diff options
context:
space:
mode:
authorGravatar Andy Wingo2008-02-22 19:28:46 +0100
committerGravatar Andy Wingo2008-02-22 19:28:46 +0100
commitbdc98f612bd66a35d9a4b3eeb46d26c362bc7dd9 (patch)
tree8c40ddc1c8ca6a741158604ca166cbf1f41ade30 /wordpress-to-dir.py
parent77509e4d3fabf60b11a17972ec8276d8cc119811 (diff)
downloadtekuti-bdc98f612bd66a35d9a4b3eeb46d26c362bc7dd9.tar.gz
tekuti-bdc98f612bd66a35d9a4b3eeb46d26c362bc7dd9.zip
another checkpoint, off to party
Diffstat (limited to 'wordpress-to-dir.py')
-rw-r--r--wordpress-to-dir.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wordpress-to-dir.py b/wordpress-to-dir.py
index 82669ee..7d60734 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')
+ ' from wp_comments where comment_post_ID=%s where 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, '')
+ return urllib.quote(pre, '').tolower()
def write_post(post, categories, comments):
def make_metadata():