mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +01:00
Updated.
This commit is contained in:
parent
36c6aa2d3d
commit
e1f3393015
@ -32,6 +32,7 @@
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import csv
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if len(sys.argv) <= 1:
|
if len(sys.argv) <= 1:
|
||||||
@ -78,9 +79,11 @@ if __name__ == '__main__':
|
|||||||
cursor = db.cursor()
|
cursor = db.cursor()
|
||||||
cursor.execute("""SELECT word_stats.user_id, words.word,
|
cursor.execute("""SELECT word_stats.user_id, words.word,
|
||||||
word_stats.count
|
word_stats.count
|
||||||
FROM word_stats, words""")
|
FROM word_stats, words
|
||||||
|
WHERE word_stats.word_id = words.id""")
|
||||||
d = {}
|
d = {}
|
||||||
for (id, word, count) in cursor.fetchall():
|
for (id, word, count) in cursor.fetchall():
|
||||||
|
#print word, count
|
||||||
d.setdefault(id, {})[word] = count
|
d.setdefault(id, {})[word] = count
|
||||||
for (id, d) in d.items():
|
for (id, d) in d.items():
|
||||||
L = [channel, id]
|
L = [channel, id]
|
||||||
|
Loading…
Reference in New Issue
Block a user