-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.py
More file actions
35 lines (30 loc) · 760 Bytes
/
main.py
File metadata and controls
35 lines (30 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from bucket import Bucket
from dupestats import DupeStats
from authorset import AuthorSet
from rewriter import rewritechart
import os
if os.path.isdir("/charts"):
os.chdir("/charts")
bucket = Bucket(path="/charts")
else:
bucket = Bucket()
bucket.download()
bucket.extract()
if os.path.isdir("/charts"):
stat = DupeStats(path="/charts")
else:
stat = DupeStats()
stat.dupe_stats()
if os.path.isdir("/charts"):
authorSet = AuthorSet(chartdir="/charts")
else:
authorSet = AuthorSet()
authorSet.preprocess()
authorSet.process()
authorSet.processproposals()
authorSet.heatmap()
authorSet.dot()
charts = sorted(stat.get_charts())
for chart in charts:
dupeslist = stat.dupefinder(chart)
rewritechart(chart, dupeslist)