1
0
Fork 0

another checkpoint, off to party redux

This commit is contained in:
Andy Wingo 2008-02-22 19:30:20 +01:00
parent bdc98f612b
commit cb1e7fd756

View file

@ -38,7 +38,7 @@ def post_comments(post):
sql = ('select comment_ID, comment_author, comment_author_email,' sql = ('select comment_ID, comment_author, comment_author_email,'
' comment_author_url, comment_author_IP,' ' comment_author_url, comment_author_IP,'
' comment_date, comment_date_gmt, comment_content, comment_approved' ' 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'],)) cur.execute(sql, (post['id'],))
keys = ('id', 'author', 'author_email', 'author_url', 'author_ip', keys = ('id', 'author', 'author_email', 'author_url', 'author_ip',
'date', 'date-gmt', 'content', 'approved') 'date', 'date-gmt', 'content', 'approved')
@ -70,7 +70,7 @@ def write_comment(comment, dir):
def make_post_key(post): def make_post_key(post):
d = post['date'] d = post['date']
pre = '%d/%02d/%02d/%s' % (d.year, d.month, d.day, post['name']) 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 write_post(post, categories, comments):
def make_metadata(): def make_metadata():