forked from Antar1011/Smogon-Usage-Stats
-
Notifications
You must be signed in to change notification settings - Fork 3
/
MonthlyAnalysis.sh
executable file
·60 lines (47 loc) · 1.91 KB
/
MonthlyAnalysis.sh
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
rm -r Stats
mkdir Stats
mkdir Stats/moveset
function process {
tier=$1
if [[ $tier == "moveset" ]]; then
return
fi
echo "Processing "$tier >> log.log
if [[ $tier == "gen8ou" ]] || [[ $tier == "gen8doublesou" ]] || [[ $tier == "gen8randombattle" || $tier == 'gen8oususpecttest' ]] || [[ $tier == "gen8doublesoususpecttest" ]]; then
python StatCounter.py $tier 1695 &&
python batchMovesetCounter.py $tier 1695 > Stats/moveset/$tier-1695.txt
# python MegaCounter.py Stats/chaos/$tier-1695.json > Stats/mega/$tier-1695.txt
else
python StatCounter.py $tier 1630 &&
python batchMovesetCounter.py $tier 1630 > Stats/moveset/$tier-1630.txt
# python MegaCounter.py Stats/chaos/$tier-1630.json > Stats/mega/$tier-1630.txt
fi
}
export -f process
function nextprocess {
tier=$1
if [[ $tier == "moveset" ]]; then
return
fi
echo "Processing "$tier >> log.log
if [[ $tier == "gen8ou" ]] || [[ $tier == "gen8doublesou" ]] || [[ $tier == "gen8randombattle" || $tier == 'gen8oususpecttest' ]] || [[ $tier == "gen8doublesoususpecttest" ]]; then
python StatCounter.py $tier 1825 &&
python batchMovesetCounter.py $tier 1825 > Stats/moveset/$tier-1825.txt
# python MegaCounter.py Stats/chaos/$tier-1825.json > Stats/mega/$tier-1825.txt
else
python StatCounter.py $tier 1760 &&
python batchMovesetCounter.py $tier 1760 > Stats/moveset/$tier-1760.txt
# python MegaCounter.py Stats/chaos/$tier-1760.json > Stats/mega/$tier-1760.txt
fi
python StatCounter.py $tier 0 &&
python batchMovesetCounter.py $tier 0 > Stats/moveset/$tier-0.txt
# python MegaCounter.py Stats/chaos/$tier-0.json > Stats/mega/$tier-0.txt
python StatCounter.py $tier 1500 &&
python batchMovesetCounter.py $tier 1500 > Stats/moveset/$tier-1500.txt
# python MegaCounter.py Stats/chaos/$tier-1500.json > Stats/mega/$tier-1500.txt
}
export -f nextprocess
ls -S Raw/ | parallel -j 5 process
ls -S Raw/ | parallel -j 5 nextprocess
./MonotypeAnalysis.sh