Mercurial > hg > cc > azure
annotate master/bin/finalMerge.py @ 64:b91e44355bbf
fix minor argument passing snafus
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Wed, 03 Jun 2020 22:08:01 +0000 |
parents | beae6309d4ec |
children |
rev | line source |
---|---|
36
9d4f130073b8
merge the uploaded results of fixAndMerge
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
1 #!/usr/bin/env python3 |
9d4f130073b8
merge the uploaded results of fixAndMerge
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
2 import sys,re |
9d4f130073b8
merge the uploaded results of fixAndMerge
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
3 mh={} |
9d4f130073b8
merge the uploaded results of fixAndMerge
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
4 ms={} |
38 | 5 mm={} |
6 for (i,m) in enumerate(['0','Jan','Feb','Mar','Apr','May','Jun', | |
7 'Jul','Aug','Sep','Oct','Nov','Dec']): | |
8 mm[m]=i | |
36
9d4f130073b8
merge the uploaded results of fixAndMerge
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
9 for l in sys.stdin: |
9d4f130073b8
merge the uploaded results of fixAndMerge
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
10 (h,m,y,c)=l.split() |
9d4f130073b8
merge the uploaded results of fixAndMerge
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
11 if h=='http': |
9d4f130073b8
merge the uploaded results of fixAndMerge
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
12 tab=mh |
9d4f130073b8
merge the uploaded results of fixAndMerge
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
13 else: |
9d4f130073b8
merge the uploaded results of fixAndMerge
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
14 tab=ms |
38 | 15 m=mm[m] |
36
9d4f130073b8
merge the uploaded results of fixAndMerge
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
16 key='%s\t%s'%(m,y) |
9d4f130073b8
merge the uploaded results of fixAndMerge
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
17 tab[key]=tab.get(key,0)+int(c) |
9d4f130073b8
merge the uploaded results of fixAndMerge
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
18 for (l,tab) in zip(['http','https'],[mh,ms]): |
38 | 19 for (k,v) in tab.items(): |
20 print(l,k,v,sep='\t') |