Index: trunk/tools/editor_trends/etl/store.py |
— | — | @@ -55,16 +55,16 @@ |
56 | 56 | fh = file_utils.create_txt_filehandle(self.rts.sorted, filename, |
57 | 57 | 'r', 'utf-8') |
58 | 58 | for line in file_utils.read_raw_data(fh): |
59 | | - if len(line) == 12: |
60 | | - editor = line[2] |
61 | | - #print 'Parsing %s' % contributor |
62 | | - if prev_editor != editor and prev_editor != -1: |
63 | | - editor_cache.add(prev_editor, 'NEXT') |
| 59 | + #if len(line) == 12: |
| 60 | + editor = line[0] |
| 61 | + #print 'Parsing %s' % editor |
| 62 | + if prev_editor != editor and prev_editor != -1: |
| 63 | + editor_cache.add(prev_editor, 'NEXT') |
64 | 64 | |
65 | | - data = prepare_data(line) |
66 | | - #print editor, data['username'] |
67 | | - editor_cache.add(editor, data) |
68 | | - prev_editor = editor |
| 65 | + data = prepare_data(line) |
| 66 | + print editor, data['username'] |
| 67 | + editor_cache.add(editor, data) |
| 68 | + prev_editor = editor |
69 | 69 | fh.close() |
70 | 70 | self.result.put(True) |
71 | 71 | |
— | — | @@ -159,7 +159,7 @@ |
160 | 160 | |
161 | 161 | tasks.join() |
162 | 162 | |
163 | | - print 'Creating indexes...' |
| 163 | + print '\nCreating indexes...' |
164 | 164 | db.add_index('id') |
165 | 165 | db.add_index('title') |
166 | 166 | db.add_index('ns') |
— | — | @@ -208,7 +208,7 @@ |
209 | 209 | break |
210 | 210 | |
211 | 211 | tasks.join() |
212 | | - print 'Creating indexes...' |
| 212 | + print '\nCreating indexes...' |
213 | 213 | db.add_index('editor') |
214 | 214 | db.add_index('username') |
215 | 215 | |