blob: 6f181d94cc3a5971c95c3e8e1e5ccd8cf33c946c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/usr/bin/python
import sys
import pickle
names = pickle.load(open(sys.argv[2]))
dirs = ['24-1-2012-16-56-57','27-1-2012-10-45-29']
for line in open(sys.argv[1]):
line = line.strip().split(',')
if line[1] != 'name':
line[0] = str(dirs.index(line[0]) + 1)
line[1] = str(names.index(line[1]) + 1)
print ','.join(line)
|