Merge pull request #70 from samosaara/master

Improves and unifies pokemon database, type subcommand
This commit is contained in:
Lazo 2017-06-30 18:53:05 -04:00 committed by GitHub
commit 83fa1c30e1
6 changed files with 595 additions and 1030 deletions

View file

@ -1,493 +0,0 @@
bulbasaur 0.61604
ivysaur 0.462721
venusaur 0.5451
charmander 0.724984
charmeleon 0.491232
charizard 0.601881
squirtle 0.708672
wartortle 0.748101
blastoise 0.64938
caterpie 0.718227
metapod 0.621901
butterfree 0.630765
weedle 0.638418
kakuna 0.773358
beedrill 0.802686
pidgey 0.460133
pidgeotto 0.906494
pidgeot 0.887968
rattata 0.478938
raticate 0.640308
spearow 0.459023
fearow 0.488446
ekans 0.463613
arbok 0.589331
pikachu 0.851867
raichu 0.751316
sandshrew 0.77978
sandslash 0.730616
nidoran 0.759855
nidorina 0.681913
nidoqueen 0.633158
nidoran 0.414212
nidorino 0.535174
nidoking 0.487512
clefairy 0.839059
clefable 0.863238
vulpix 0.555764
ninetales 0.92374
jigglypuff 0.800818
wigglytuff 0.777334
zubat 0.463772
golbat 0.376687
oddish 0.477076
gloom 0.558871
vileplume 0.386918
paras 0.602374
parasect 0.571063
venonat 0.38278
venomoth 0.642519
diglett 0.561415
dugtrio 0.476553
meowth 0.91165
persian 0.861286
psyduck 0.798752
golduck 0.674705
mankey 0.902441
primeape 0.89772
growlithe 0.65431
arcanine 0.864944
poliwag 0.535375
poliwhirl 0.550271
poliwrath 0.577639
abra 0.82454
kadabra 0.852543
alakazam 0.797661
machop 0.755805
machoke 0.623455
machamp 0.670823
bellsprout 0.817864
weepinbell 0.864195
victreebel 0.84222
tentacool 0.649035
tentacruel 0.0574754
geodude 0.645383
graveler 0.697487
golem 0.558651
ponyta 0.827553
rapidash 0.8708
slowpoke 0.72033
slowbro 0.683053
magnemite 0.705858
magneton 0.708434
farfetch'd 0.595665
doduo 0.619222
dodrio 0.62457
seel 0.931629
dewgong 0.858439
grimer 0.500468
muk 0.467463
shellder 0.501135
cloyster 0.483847
gastly 0.43826
haunter 0.485071
gengar 0.274986
onix 0.564071
drowzee 0.728724
hypno 0.839396
krabby 0.852155
kingler 0.795094
voltorb 0.322391
electrode 0.98033
exeggcute 0.863465
exeggutor 0.588666
cubone 0.724451
marowak 0.706728
hitmonlee 0.562188
hitmonchan 0.701743
lickitung 0.723693
koffing 0.63856
weezing 0.658479
rhyhorn 0.687025
rhydon 0.628743
chansey 0.858906
tangela 0.528551
kangaskhan 0.51619
horsea 0.775569
seadra 0.741227
goldeen 0.944483
seaking 0.516814
staryu 0.547556
starmie 0.608698
mr. 0.852766
scyther 0.685216
jynx 0.304172
electabuzz 0.8172
magmar 0.424369
pinsir 0.676132
tauros 0.663027
magikarp 0.590442
gyarados 0.454836
lapras 0.486099
ditto 0.622399
eevee 0.59138
vaporeon 0.716208
jolteon 0.801198
flareon 0.561471
porygon 0.40719
omanyte 0.706038
omastar 0.771284
kabuto 0.0760635
kabutops 0.602599
aerodactyl 0.675558
snorlax 0.50947
articuno 0.615042
zapdos 0.813707
moltres 0.74996
dratini 0.73172
dragonair 0.629152
dragonite 0.744656
mewtwo 0.846847
mew 0.815818
chikorita 0.861505
bayleef 0.901646
meganium 0.702821
cyndaquil 0.853288
quilava 0.850405
typhlosion 0.796257
totodile 0.610843
croconaw 0.678851
feraligatr 0.663142
sentret 0.504492
furret 0.763536
hoothoot 0.532158
noctowl 0.46978
ledyba 0.487187
ledian 0.418694
spinarak 0.702303
ariados 0.474765
crobat 0.485866
chinchou 0.602483
lanturn 0.632621
pichu 0.886557
cleffa 0.854177
igglybuff 0.890948
togepi 0.974374
togetic 0.919818
natu 0.673518
xatu 0.693199
mareep 0.894504
flaaffy 0.790988
ampharos 0.757293
bellossom 0.777804
marill 0.637
azumarill 0.541738
sudowoodo 0.524254
politoed 0.69556
hoppip 0.6714
skiploom 0.678718
jumpluff 0.576306
aipom 0.550648
sunkern 0.814766
sunflora 0.881064
yanma 0.452699
wooper 0.833696
quagsire 0.730816
espeon 0.732087
umbreon 0.144064
murkrow 0.201785
slowking 0.650835
misdreavus 0.374371
unown 0.324886
wobbuffet 0.618024
girafarig 0.692634
pineco 0.479762
forretress 0.670095
dunsparce 0.879011
gligar 0.624398
steelix 0.53062
snubbull 0.633274
granbull 0.573458
qwilfish 0.870388
scizor 0.286946
shuckle 0.383
heracross 0.312401
sneasel 0.233976
teddiursa 0.664395
ursaring 0.509506
slugma 0.501634
magcargo 0.566186
swinub 0.590632
piloswine 0.535605
corsola 0.673841
remoraid 0.807987
octillery 0.377279
delibird 0.417711
mantine 0.697284
skarmory 0.80817
houndour 0.321382
houndoom 0.375787
kingdra 0.643796
phanpy 0.719229
donphan 0.755039
porygon2 0.471431
stantler 0.645821
smeargle 0.895412
tyrogue 0.732042
hitmontop 0.657826
smoochum 0.613722
elekid 0.713664
magby 0.56141
miltank 0.676376
blissey 0.716088
raikou 0.792091
entei 0.164723
suicune 0.718651
larvitar 0.655129
pupitar 0.683949
tyranitar 0.740855
lugia 0.854093
ho-oh 0.456829
celebi 0.914585
treecko 0.789267
grovyle 0.710269
sceptile 0.7234
torchic 0.611063
combusken 0.566604
blaziken 0.823418
mudkip 0.601698
marshtomp 0.60155
swampert 0.582725
poochyena 0.659817
mightyena 0.729255
zigzagoon 0.826714
linoone 0.763825
wurmple 0.888278
silcoon 0.86649
beautifly 0.411765
cascoon 0.825882
dustox 0.590593
lotad 0.496519
lombre 0.702942
ludicolo 0.662457
seedot 0.527105
nuzleaf 0.620504
shiftry 0.59948
taillow 0.37519
swellow 0.287707
wingull 0.789535
pelipper 0.902759
ralts 0.939809
kirlia 0.959133
gardevoir 0.649517
surskit 0.767106
masquerain 0.801517
shroomish 0.597057
breloom 0.85317
slakoth 0.82493
vigoroth 0.898085
slaking 0.525411
nincada 0.960731
ninjask 0.208803
shedinja 0.715377
whismur 0.786548
loudred 0.522184
exploud 0.620426
makuhita 0.859654
hariyama 0.847462
azurill 0.490813
nosepass 0.288598
skitty 0.705455
delcatty 0.867468
sableye 0.449862
mawile 0.780275
aron 0.760185
lairon 0.426203
aggron 0.526279
meditite 0.73075
medicham 0.825481
electrike 0.703969
manectric 0.660832
plusle 0.90071
minun 0.911575
volbeat 0.619725
illumise 0.70883
roselia 0.74602
gulpin 0.721942
swalot 0.579722
carvanha 0.32407
sharpedo 0.807318
wailmer 0.378056
wailord 0.48029
numel 0.838816
camerupt 0.581801
torkoal 0.682765
spoink 0.645841
grumpig 0.6022
spinda 0.810219
trapinch 0.602283
vibrava 0.827242
flygon 0.760615
cacnea 0.643642
cacturne 0.673486
swablu 0.692523
altaria 0.914359
zangoose 0.955059
seviper 0.415772
lunatone 0.843258
solrock 0.503932
barboach 0.791458
whiscash 0.285956
corphish 0.818555
crawdaunt 0.443998
baltoy 0.758668
claydol 0.358909
lileep 0.480308
cradily 0.675871
anorith 0.55059
armaldo 0.510346
feebas 0.753104
milotic 0.869479
castform 0.824363
kecleon 0.712634
shuppet 0.523015
banette 0.592839
duskull 0.407622
dusclops 0.73202
tropius 0.572509
chimecho 0.833826
absol 0.803023
wynaut 0.707459
snorunt 0.27341
glalie 0.355935
spheal 0.657501
sealeo 0.686642
walrein 0.60321
clamperl 0.633663
huntail 0.593536
gorebyss 0.746509
relicanth 0.348452
luvdisc 0.682499
bagon 0.677044
shelgon 0.83147
salamence 0.653867
beldum 0.563534
metang 0.533696
metagross 0.53279
regirock 0.741491
regice 0.683548
registeel 0.623046
latias 0.982893
latios 0.876962
kyogre 0.384149
groudon 0.0902245
rayquaza 0.468595
jirachi 0.978042
deoxys 0.618088
turtwig 0.773515
grotle 0.604132
torterra 0.457409
chimchar 0.663174
monferno 0.631232
infernape 0.945496
piplup 0.745585
prinplup 0.405031
empoleon 0.262553
starly 0.26931
staravia 0.282412
staraptor 0.481331
bidoof 0.467715
bibarel 0.588023
kricketot 0.430597
kricketune 0.405649
shinx 0.631029
luxio 0.612493
luxray 0.235459
budew 0.703137
roserade 0.813278
cranidos 0.47046
rampardos 0.310159
shieldon 0.731566
bastiodon 0.774646
burmy 0.547375
wormadam 0.501587
mothim 0.332024
combee 0.766668
vespiquen 0.71957
pachirisu 0.892119
buizel 0.603754
floatzel 0.545801
cherubi 0.529458
cherrim 0.763485
shellos 0.60342
gastrodon 0.438932
ambipom 0.540427
drifloon 0.571655
drifblim 0.524227
buneary 0.538228
lopunny 0.53163
mismagius 0.332848
honchkrow 0.319731
glameow 0.605219
purugly 0.430523
chingling 0.791304
stunky 0.255749
skuntank 0.26677
bronzor 0.55897
bronzong 0.636318
bonsly 0.512233
mime 0.847604
happiny 0.839292
chatot 0.49433
spiritomb 0.70014
gible 0.476057
gabite 0.399648
garchomp 0.333349
munchlax 0.422614
riolu 0.624587
lucario 0.535689
hippopotas 0.740069
hippowdon 0.608923
skorupi 0.248446
drapion 0.517049
croagunk 0.566172
toxicroak 0.53118
carnivine 0.734641
finneon 0.291408
lumineon 0.303825
mantyke 0.763958
snover 0.96865
abomasnow 0.990744
weavile 0.286989
magnezone 0.75966
lickilicky 0.614629
rhyperior 0.416519
tangrowth 0.470169
electivire 0.794939
magmortar 0.372137
togekiss 0.898987
yanmega 0.32405
leafeon 0.901089
glaceon 0.810771
gliscor 0.649418
mamoswine 0.548716
porygon-z 0.367984
gallade 0.382547
probopass 0.488307
dusknoir 0.679651
froslass 0.936162
rotom 0.543941
uxie 0.81938
mesprit 0.772561
azelf 0.780311
dialga 0.272122
palkia 0.588943
heatran 0.291081
regigigas 0.927366
giratina 0.263429
cresselia 0.677861
phione 0.661622
manaphy 0.709464
darkrai 0.364973
shaymin 0.918656
arceus 0.899249

986
Data/pokemon.txt Executable file → Normal file
View file

@ -1,493 +1,493 @@
1 Bulbasaur bulbasaur 0.61604 grass poison
2 Ivysaur ivysaur 0.462721 grass poison
3 Venusaur venusaur 0.5451 grass poison
4 Charmander charmander 0.724984 fire
5 Charmeleon charmeleon 0.491232 fire
6 Charizard charizard 0.601881 fire flying
7 Squirtle squirtle 0.708672 water
8 Wartortle wartortle 0.748101 water
9 Blastoise blastoise 0.64938 water
10 Caterpie caterpie 0.718227 bug
11 Metapod metapod 0.621901 bug
12 Butterfree butterfree 0.630765 bug flying
13 Weedle weedle 0.638418 bug poison
14 Kakuna kakuna 0.773358 bug poison
15 Beedrill beedrill 0.802686 bug poison
16 Pidgey pidgey 0.460133 normal flying
17 Pidgeotto pidgeotto 0.906494 normal flying
18 Pidgeot pidgeot 0.887968 normal flying
19 Rattata rattata 0.478938 normal
20 Raticate raticate 0.640308 normal
21 Spearow spearow 0.459023 normal flying
22 Fearow fearow 0.488446 normal flying
23 Ekans ekans 0.463613 poison
24 Arbok arbok 0.589331 poison
25 Pikachu pikachu 0.851867 electric
26 Raichu raichu 0.751316 electric
27 Sandshrew sandshrew 0.77978 ground
28 Sandslash sandslash 0.730616 ground
29 Nidoran nidoran 0.759855 poison
30 Nidorina nidorina 0.681913 poison
31 Nidoqueen nidoqueen 0.633158 poison ground
32 Nidoran nidoran 0.414212 poison
33 Nidorino nidorino 0.535174 poison
34 Nidoking nidoking 0.487512 poison ground
35 Clefairy clefairy 0.839059 fairy
36 Clefable clefable 0.863238 fairy
37 Vulpix vulpix 0.555764 fire
38 Ninetales ninetales 0.92374 fire
39 Jigglypuff jigglypuff 0.800818 normal fairy
40 Wigglytuff wigglytuff 0.777334 normal fairy
41 Zubat zubat 0.463772 poison flying
42 Golbat golbat 0.376687 poison flying
43 Oddish oddish 0.477076 grass poison
44 Gloom gloom 0.558871 grass poison
45 Vileplume vileplume 0.386918 grass poison
46 Paras paras 0.602374 bug grass
47 Parasect parasect 0.571063 bug grass
48 Venonat venonat 0.38278 bug poison
49 Venomoth venomoth 0.642519 bug poison
50 Diglett diglett 0.561415 ground
51 Dugtrio dugtrio 0.476553 ground
52 Meowth meowth 0.91165 normal
53 Persian persian 0.861286 normal
54 Psyduck psyduck 0.798752 water
55 Golduck golduck 0.674705 water
56 Mankey mankey 0.902441 fighting
57 Primeape primeape 0.89772 fighting
58 Growlithe growlithe 0.65431 fire
59 Arcanine arcanine 0.864944 fire
60 Poliwag poliwag 0.535375 water
61 Poliwhirl poliwhirl 0.550271 water
62 Poliwrath poliwrath 0.577639 water fighting
63 Abra abra 0.82454 psychic
64 Kadabra kadabra 0.852543 psychic
65 Alakazam alakazam 0.797661 psychic
66 Machop machop 0.755805 fighting
67 Machoke machoke 0.623455 fighting
68 Machamp machamp 0.670823 fighting
69 Bellsprout bellsprout 0.817864 grass poison
70 Weepinbell weepinbell 0.864195 grass poison
71 Victreebel victreebel 0.84222 grass poison
72 Tentacool tentacool 0.649035 water poison
73 Tentacruel tentacruel 0.0574754 water poison
74 Geodude geodude 0.645383 rock ground
75 Graveler graveler 0.697487 rock ground
76 Golem golem 0.558651 rock ground
77 Ponyta ponyta 0.827553 fire
78 Rapidash rapidash 0.8708 fire
79 Slowpoke slowpoke 0.72033 water psychic
80 Slowbro slowbro 0.683053 water psychic
81 Magnemite magnemite 0.705858 electric steel
82 Magneton magneton 0.708434 electric steel
83 Farfetch'd farfetch'd 0.595665 normal flying
84 Doduo doduo 0.619222 normal flying
85 Dodrio dodrio 0.62457 normal flying
86 Seel seel 0.931629 water
87 Dewgong dewgong 0.858439 water ice
88 Grimer grimer 0.500468 poison
89 Muk muk 0.467463 poison
90 Shellder shellder 0.501135 water
91 Cloyster cloyster 0.483847 water ice
92 Gastly gastly 0.43826 ghost poison
93 Haunter haunter 0.485071 ghost poison
94 Gengar gengar 0.274986 ghost poison
95 Onix onix 0.564071 rock ground
96 Drowzee drowzee 0.728724 psychic
97 Hypno hypno 0.839396 psychic
98 Krabby krabby 0.852155 water
99 Kingler kingler 0.795094 water
100 Voltorb voltorb 0.322391 electric
101 Electrode electrode 0.98033 electric
102 Exeggcute exeggcute 0.863465 grass psychic
103 Exeggutor exeggutor 0.588666 grass psychic
104 Cubone cubone 0.724451 ground
105 Marowak marowak 0.706728 ground
106 Hitmonlee hitmonlee 0.562188 fighting
107 Hitmonchan hitmonchan 0.701743 fighting
108 Lickitung lickitung 0.723693 normal
109 Koffing koffing 0.63856 poison
110 Weezing weezing 0.658479 poison
111 Rhyhorn rhyhorn 0.687025 ground rock
112 Rhydon rhydon 0.628743 ground rock
113 Chansey chansey 0.858906 normal
114 Tangela tangela 0.528551 grass
115 Kangaskhan kangaskhan 0.51619 normal
116 Horsea horsea 0.775569 water
117 Seadra seadra 0.741227 water
118 Goldeen goldeen 0.944483 water
119 Seaking seaking 0.516814 water
120 Staryu staryu 0.547556 water
121 Starmie starmie 0.608698 water psychic
122 Mr. Mime mr.mime 0.852766 psychic fairy
123 Scyther scyther 0.685216 bug flying
124 Jynx jynx 0.304172 ice psychic
125 Electabuzz electabuzz 0.8172 electric
126 Magmar magmar 0.424369 fire
127 Pinsir pinsir 0.676132 bug
128 Tauros tauros 0.663027 normal
129 Magikarp magikarp 0.590442 water
130 Gyarados gyarados 0.454836 water flying
131 Lapras lapras 0.486099 water ice
132 Ditto ditto 0.622399 normal
133 Eevee eevee 0.59138 normal
134 Vaporeon vaporeon 0.716208 water
135 Jolteon jolteon 0.801198 electric
136 Flareon flareon 0.561471 fire
137 Porygon porygon 0.40719 normal
138 Omanyte omanyte 0.706038 rock water
139 Omastar omastar 0.771284 rock water
140 Kabuto kabuto 0.0760635 rock water
141 Kabutops kabutops 0.602599 rock water
142 Aerodactyl aerodactyl 0.675558 rock flying
143 Snorlax snorlax 0.50947 normal
144 Articuno articuno 0.615042 ice flying
145 Zapdos zapdos 0.813707 electric flying
146 Moltres moltres 0.74996 fire flying
147 Dratini dratini 0.73172 dragon
148 Dragonair dragonair 0.629152 dragon
149 Dragonite dragonite 0.744656 dragon flying
150 Mewtwo mewtwo 0.846847 psychic
151 Mew mew 0.815818 psychic
152 Chikorita chikorita 0.861505 grass
153 Bayleef bayleef 0.901646 grass
154 Meganium meganium 0.702821 grass
155 Cyndaquil cyndaquil 0.853288 fire
156 Quilava quilava 0.850405 fire
157 Typhlosion typhlosion 0.796257 fire
158 Totodile totodile 0.610843 water
159 Croconaw croconaw 0.678851 water
160 Feraligatr feraligatr 0.663142 water
161 Sentret sentret 0.504492 normal
162 Furret furret 0.763536 normal
163 Hoothoot hoothoot 0.532158 normal flying
164 Noctowl noctowl 0.46978 normal flying
165 Ledyba ledyba 0.487187 bug flying
166 Ledian ledian 0.418694 bug flying
167 Spinarak spinarak 0.702303 bug poison
168 Ariados ariados 0.474765 bug poison
169 Crobat crobat 0.485866 poison flying
170 Chinchou chinchou 0.602483 water electric
171 Lanturn lanturn 0.632621 water electric
172 Pichu pichu 0.886557 electric
173 Cleffa cleffa 0.854177 fairy
174 Igglybuff igglybuff 0.890948 normal fairy
175 Togepi togepi 0.974374 fairy
176 Togetic togetic 0.919818 fairy flying
177 Natu natu 0.673518 psychic flying
178 Xatu xatu 0.693199 psychic flying
179 Mareep mareep 0.894504 electric
180 Flaaffy flaaffy 0.790988 electric
181 Ampharos ampharos 0.757293 electric
182 Bellossom bellossom 0.777804 grass
183 Marill marill 0.637 water fairy
184 Azumarill azumarill 0.541738 water fairy
185 Sudowoodo sudowoodo 0.524254 rock
186 Politoed politoed 0.69556 water
187 Hoppip hoppip 0.6714 grass flying
188 Skiploom skiploom 0.678718 grass flying
189 Jumpluff jumpluff 0.576306 grass flying
190 Aipom aipom 0.550648 normal
191 Sunkern sunkern 0.814766 grass
192 Sunflora sunflora 0.881064 grass
193 Yanma yanma 0.452699 bug flying
194 Wooper wooper 0.833696 water ground
195 Quagsire quagsire 0.730816 water ground
196 Espeon espeon 0.732087 psychic
197 Umbreon umbreon 0.144064 dark
198 Murkrow murkrow 0.201785 dark flying
199 Slowking slowking 0.650835 water psychic
200 Misdreavus misdreavus 0.374371 ghost
201 Unown unown 0.324886 psychic
202 Wobbuffet wobbuffet 0.618024 psychic
203 Girafarig girafarig 0.692634 normal psychic
204 Pineco pineco 0.479762 bug
205 Forretress forretress 0.670095 bug steel
206 Dunsparce dunsparce 0.879011 normal
207 Gligar gligar 0.624398 ground flying
208 Steelix steelix 0.53062 steel ground
209 Snubbull snubbull 0.633274 fairy
210 Granbull granbull 0.573458 fairy
211 Qwilfish qwilfish 0.870388 water poison
212 Scizor scizor 0.286946 bug steel
213 Shuckle shuckle 0.383 bug rock
214 Heracross heracross 0.312401 bug fighting
215 Sneasel sneasel 0.233976 dark ice
216 Teddiursa teddiursa 0.664395 normal
217 Ursaring ursaring 0.509506 normal
218 Slugma slugma 0.501634 fire
219 Magcargo magcargo 0.566186 fire rock
220 Swinub swinub 0.590632 ice ground
221 Piloswine piloswine 0.535605 ice ground
222 Corsola corsola 0.673841 water rock
223 Remoraid remoraid 0.807987 water
224 Octillery octillery 0.377279 water
225 Delibird delibird 0.417711 ice flying
226 Mantine mantine 0.697284 water flying
227 Skarmory skarmory 0.80817 steel flying
228 Houndour houndour 0.321382 dark fire
229 Houndoom houndoom 0.375787 dark fire
230 Kingdra kingdra 0.643796 water dragon
231 Phanpy phanpy 0.719229 ground
232 Donphan donphan 0.755039 ground
233 Porygon2 porygon2 0.471431 normal
234 Stantler stantler 0.645821 normal
235 Smeargle smeargle 0.895412 normal
236 Tyrogue tyrogue 0.732042 fighting
237 Hitmontop hitmontop 0.657826 fighting
238 Smoochum smoochum 0.613722 ice psychic
239 Elekid elekid 0.713664 electric
240 Magby magby 0.56141 fire
241 Miltank miltank 0.676376 normal
242 Blissey blissey 0.716088 normal
243 Raikou raikou 0.792091 electric
244 Entei entei 0.164723 fire
245 Suicune suicune 0.718651 water
246 Larvitar larvitar 0.655129 rock ground
247 Pupitar pupitar 0.683949 rock ground
248 Tyranitar tyranitar 0.740855 rock dark
249 Lugia lugia 0.854093 psychic flying
250 Ho-Oh ho-oh 0.456829 fire flying
251 Celebi celebi 0.914585 psychic grass
252 Treecko treecko 0.789267 grass
253 Grovyle grovyle 0.710269 grass
254 Sceptile sceptile 0.7234 grass
255 Torchic torchic 0.611063 fire
256 Combusken combusken 0.566604 fire fighting
257 Blaziken blaziken 0.823418 fire fighting
258 Mudkip mudkip 0.601698 water
259 Marshtomp marshtomp 0.60155 water ground
260 Swampert swampert 0.582725 water ground
261 Poochyena poochyena 0.659817 dark
262 Mightyena mightyena 0.729255 dark
263 Zigzagoon zigzagoon 0.826714 normal
264 Linoone linoone 0.763825 normal
265 Wurmple wurmple 0.888278 bug
266 Silcoon silcoon 0.86649 bug
267 Beautifly beautifly 0.411765 bug flying
268 Cascoon cascoon 0.825882 bug
269 Dustox dustox 0.590593 bug poison
270 Lotad lotad 0.496519 water grass
271 Lombre lombre 0.702942 water grass
272 Ludicolo ludicolo 0.662457 water grass
273 Seedot seedot 0.527105 grass
274 Nuzleaf nuzleaf 0.620504 grass dark
275 Shiftry shiftry 0.59948 grass dark
276 Taillow taillow 0.37519 normal flying
277 Swellow swellow 0.287707 normal flying
278 Wingull wingull 0.789535 water flying
279 Pelipper pelipper 0.902759 water flying
280 Ralts ralts 0.939809 psychic fairy
281 Kirlia kirlia 0.959133 psychic fairy
282 Gardevoir gardevoir 0.649517 psychic fairy
283 Surskit surskit 0.767106 bug water
284 Masquerain masquerain 0.801517 bug flying
285 Shroomish shroomish 0.597057 grass
286 Breloom breloom 0.85317 grass fighting
287 Slakoth slakoth 0.82493 normal
288 Vigoroth vigoroth 0.898085 normal
289 Slaking slaking 0.525411 normal
290 Nincada nincada 0.960731 bug ground
291 Ninjask ninjask 0.208803 bug flying
292 Shedinja shedinja 0.715377 bug ghost
293 Whismur whismur 0.786548 normal
294 Loudred loudred 0.522184 normal
295 Exploud exploud 0.620426 normal
296 Makuhita makuhita 0.859654 fighting
297 Hariyama hariyama 0.847462 fighting
298 Azurill azurill 0.490813 normal fairy
299 Nosepass nosepass 0.288598 rock
300 Skitty skitty 0.705455 normal
301 Delcatty delcatty 0.867468 normal
302 Sableye sableye 0.449862 dark ghost
303 Mawile mawile 0.780275 steel fairy
304 Aron aron 0.760185 steel rock
305 Lairon lairon 0.426203 steel rock
306 Aggron aggron 0.526279 steel rock
307 Meditite meditite 0.73075 fighting psychic
308 Medicham medicham 0.825481 fighting psychic
309 Electrike electrike 0.703969 electric
310 Manectric manectric 0.660832 electric
311 Plusle plusle 0.90071 electric
312 Minun minun 0.911575 electric
313 Volbeat volbeat 0.619725 bug
314 Illumise illumise 0.70883 bug
315 Roselia roselia 0.74602 grass poison
316 Gulpin gulpin 0.721942 poison
317 Swalot swalot 0.579722 poison
318 Carvanha carvanha 0.32407 water dark
319 Sharpedo sharpedo 0.807318 water dark
320 Wailmer wailmer 0.378056 water
321 Wailord wailord 0.48029 water
322 Numel numel 0.838816 fire ground
323 Camerupt camerupt 0.581801 fire ground
324 Torkoal torkoal 0.682765 fire
325 Spoink spoink 0.645841 psychic
326 Grumpig grumpig 0.6022 psychic
327 Spinda spinda 0.810219 normal
328 Trapinch trapinch 0.602283 ground
329 Vibrava vibrava 0.827242 ground dragon
330 Flygon flygon 0.760615 ground dragon
331 Cacnea cacnea 0.643642 grass
332 Cacturne cacturne 0.673486 grass dark
333 Swablu swablu 0.692523 normal flying
334 Altaria altaria 0.914359 dragon flying
335 Zangoose zangoose 0.955059 normal
336 Seviper seviper 0.415772 poison
337 Lunatone lunatone 0.843258 rock psychic
338 Solrock solrock 0.503932 rock psychic
339 Barboach barboach 0.791458 water ground
340 Whiscash whiscash 0.285956 water ground
341 Corphish corphish 0.818555 water
342 Crawdaunt crawdaunt 0.443998 water dark
343 Baltoy baltoy 0.758668 ground psychic
344 Claydol claydol 0.358909 ground psychic
345 Lileep lileep 0.480308 rock grass
346 Cradily cradily 0.675871 rock grass
347 Anorith anorith 0.55059 rock bug
348 Armaldo armaldo 0.510346 rock bug
349 Feebas feebas 0.753104 water
350 Milotic milotic 0.869479 water
351 Castform castform 0.824363 normal
352 Kecleon kecleon 0.712634 normal
353 Shuppet shuppet 0.523015 ghost
354 Banette banette 0.592839 ghost
355 Duskull duskull 0.407622 ghost
356 Dusclops dusclops 0.73202 ghost
357 Tropius tropius 0.572509 grass flying
358 Chimecho chimecho 0.833826 psychic
359 Absol absol 0.803023 dark
360 Wynaut wynaut 0.707459 psychic
361 Snorunt snorunt 0.27341 ice
362 Glalie glalie 0.355935 ice
363 Spheal spheal 0.657501 ice water
364 Sealeo sealeo 0.686642 ice water
365 Walrein walrein 0.60321 ice water
366 Clamperl clamperl 0.633663 water
367 Huntail huntail 0.593536 water
368 Gorebyss gorebyss 0.746509 water
369 Relicanth relicanth 0.348452 water rock
370 Luvdisc luvdisc 0.682499 water
371 Bagon bagon 0.677044 dragon
372 Shelgon shelgon 0.83147 dragon
373 Salamence salamence 0.653867 dragon flying
374 Beldum beldum 0.563534 steel psychic
375 Metang metang 0.533696 steel psychic
376 Metagross metagross 0.53279 steel psychic
377 Regirock regirock 0.741491 rock
378 Regice regice 0.683548 ice
379 Registeel registeel 0.623046 steel
380 Latias latias 0.982893 dragon psychic
381 Latios latios 0.876962 dragon psychic
382 Kyogre kyogre 0.384149 water
383 Groudon groudon 0.0902245 ground
384 Rayquaza rayquaza 0.468595 dragon flying
385 Jirachi jirachi 0.978042 steel psychic
386 Deoxys deoxys 0.618088 psychic
387 Turtwig turtwig 0.773515 grass
388 Grotle grotle 0.604132 grass
389 Torterra torterra 0.457409 grass ground
390 Chimchar chimchar 0.663174 fire
391 Monferno monferno 0.631232 fire fighting
392 Infernape infernape 0.945496 fire fighting
393 Piplup piplup 0.745585 water
394 Prinplup prinplup 0.405031 water
395 Empoleon empoleon 0.262553 water steel
396 Starly starly 0.26931 normal flying
397 Staravia staravia 0.282412 normal flying
398 Staraptor staraptor 0.481331 normal flying
399 Bidoof bidoof 0.467715 normal
400 Bibarel bibarel 0.588023 normal water
401 Kricketot kricketot 0.430597 bug
402 Kricketune kricketune 0.405649 bug
403 Shinx shinx 0.631029 electric
404 Luxio luxio 0.612493 electric
405 Luxray luxray 0.235459 electric
406 Budew budew 0.703137 grass poison
407 Roserade roserade 0.813278 grass poison
408 Cranidos cranidos 0.47046 rock
409 Rampardos rampardos 0.310159 rock
410 Shieldon shieldon 0.731566 rock steel
411 Bastiodon bastiodon 0.774646 rock steel
412 Burmy burmy 0.547375 bug
413 Wormadam wormadam 0.501587 bug grass
414 Mothim mothim 0.332024 bug flying
415 Combee combee 0.766668 bug flying
416 Vespiquen vespiquen 0.71957 bug flying
417 Pachirisu pachirisu 0.892119 electric
418 Buizel buizel 0.603754 water
419 Floatzel floatzel 0.545801 water
420 Cherubi cherubi 0.529458 grass
421 Cherrim cherrim 0.763485 grass
422 Shellos shellos 0.60342 water
423 Gastrodon gastrodon 0.438932 water ground
424 Ambipom ambipom 0.540427 normal
425 Drifloon drifloon 0.571655 ghost flying
426 Drifblim drifblim 0.524227 ghost flying
427 Buneary buneary 0.538228 normal
428 Lopunny lopunny 0.53163 normal
429 Mismagius mismagius 0.332848 ghost
430 Honchkrow honchkrow 0.319731 dark flying
431 Glameow glameow 0.605219 normal
432 Purugly purugly 0.430523 normal
433 Chingling chingling 0.791304 psychic
434 Stunky stunky 0.255749 poison dark
435 Skuntank skuntank 0.26677 poison dark
436 Bronzor bronzor 0.55897 steel psychic
437 Bronzong bronzong 0.636318 steel psychic
438 Bonsly bonsly 0.512233 rock
439 Mime Jr. mimejr 0.847604 psychic fairy
440 Happiny happiny 0.839292 normal
441 Chatot chatot 0.49433 normal flying
442 Spiritomb spiritomb 0.70014 ghost dark
443 Gible gible 0.476057 dragon ground
444 Gabite gabite 0.399648 dragon ground
445 Garchomp garchomp 0.333349 dragon ground
446 Munchlax munchlax 0.422614 normal
447 Riolu riolu 0.624587 fighting
448 Lucario lucario 0.535689 fighting steel
449 Hippopotas hippopotas 0.740069 ground
450 Hippowdon hippowdon 0.608923 ground
451 Skorupi skorupi 0.248446 poison bug
452 Drapion drapion 0.517049 poison dark
453 Croagunk croagunk 0.566172 poison fighting
454 Toxicroak toxicroak 0.53118 poison fighting
455 Carnivine carnivine 0.734641 grass
456 Finneon finneon 0.291408 water
457 Lumineon lumineon 0.303825 water
458 Mantyke mantyke 0.763958 water flying
459 Snover snover 0.96865 grass ice
460 Abomasnow abomasnow 0.990744 grass ice
461 Weavile weavile 0.286989 dark ice
462 Magnezone magnezone 0.75966 electric steel
463 Lickilicky lickilicky 0.614629 normal
464 Rhyperior rhyperior 0.416519 ground rock
465 Tangrowth tangrowth 0.470169 grass
466 Electivire electivire 0.794939 electric
467 Magmortar magmortar 0.372137 fire
468 Togekiss togekiss 0.898987 fairy flying
469 Yanmega yanmega 0.32405 bug flying
470 Leafeon leafeon 0.901089 grass
471 Glaceon glaceon 0.810771 ice
472 Gliscor gliscor 0.649418 ground flying
473 Mamoswine mamoswine 0.548716 ice ground
474 Porygon-Z porygon-z 0.367984 normal
475 Gallade gallade 0.382547 psychic fighting
476 Probopass probopass 0.488307 rock steel
477 Dusknoir dusknoir 0.679651 ghost
478 Froslass froslass 0.936162 ice ghost
479 Rotom rotom 0.543941 electric ghost
480 Uxie uxie 0.81938 psychic
481 Mesprit mesprit 0.772561 psychic
482 Azelf azelf 0.780311 psychic
483 Dialga dialga 0.272122 steel dragon
484 Palkia palkia 0.588943 water dragon
485 Heatran heatran 0.291081 fire steel
486 Regigigas regigigas 0.927366 normal
487 Giratina giratina 0.263429 ghost dragon
488 Cresselia cresselia 0.677861 psychic
489 Phione phione 0.661622 water
490 Manaphy manaphy 0.709464 water
491 Darkrai darkrai 0.364973 dark
492 Shaymin shaymin 0.918656 grass
493 Arceus arceus 0.899249 normal

View file

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View file

@ -1,20 +1,27 @@
# The Database object is a container for all the supported Pokemon. """This files the loading of the pokemon database and the pokemon object"""
import os import os
import random import random
import sys
class Pokemon: class Pokemon:
"""Class to represent pokemons"""
__id = "" # ID is stored as a string because it must maintain "003" format, not "3". __id = "" # ID is stored as a string because it must maintain "003" format, not "3".
__name = "" __name = ""
__region = "" __region = ""
__path = "" # The location of the image. __path = "" # The location of the image.
__pkmn_type = ""
__pkmn_type_secondary = ""
__dark_threshold = 0.5
def __init__(self, identifier, name, region, path): def __init__(self, identifier, name, region, path, pkmn_type, pkmn_type_secondary, dark_threshold):
self.__id = identifier self.__id = identifier
self.__name = name self.__name = name
self.__region = region self.__region = region
self.__path = path self.__path = path
self.__dark_threshold = float(dark_threshold)
self.__pkmn_type = pkmn_type
self.__pkmn_type_secondary = pkmn_type_secondary
def get_id(self): def get_id(self):
# Pokemon from folder 'Extra' have no ID. # Pokemon from folder 'Extra' have no ID.
@ -29,6 +36,15 @@ class Pokemon:
def get_path(self): def get_path(self):
return self.__path return self.__path
def get_pkmn_type(self):
return self.__pkmn_type
def get_pkmn_type_secondary(self):
return self.__pkmn_type_secondary
def get_dark_threshold(self):
return self.__dark_threshold
def is_extra(self): def is_extra(self):
return self.__id is None return self.__id is None
@ -40,14 +56,21 @@ class Pokemon:
class Database: class Database:
"""The Database object is a container for all the supported Pokemon."""
__pokemon_list = [] __pokemon_list = []
__pokemon_dictionary = {} __pokemon_dictionary = {}
__pokemon_type_dictionary = {}
__POKEMON_TYPES = ('normal', 'fire', 'fighting', 'water', 'flying', 'grass', 'poison',
'electric', 'ground', 'psychic', 'rock', 'ice', 'bug', 'dragon', 'ghost',
'dark', 'steel', 'fairy')
__directory = "" # The global location of the code. __directory = "" # The global location of the code.
__MAX_ID = 493 # Highest possible Pokemon ID. __MAX_ID = 493 # Highest possible Pokemon ID.
__regions = ('kanto', 'johto', 'hoenn', 'sinnoh') __regions = ('kanto', 'johto', 'hoenn', 'sinnoh')
def __init__(self): def __init__(self):
self.directory = os.path.dirname(os.path.realpath(__file__)) self.directory = os.path.dirname(os.path.realpath(__file__))
for pkmn_t in self.__POKEMON_TYPES:
self.__pokemon_type_dictionary[pkmn_t] = []
self.__load_data() self.__load_data()
self.__load_extra() self.__load_extra()
@ -64,6 +87,15 @@ class Database:
def __len__(self): def __len__(self):
return len(self.__pokemon_list) return len(self.__pokemon_list)
def get_pokemon_types(self):
return [t for t in self.__POKEMON_TYPES]
def get_pokemon_of_type(self, pkmn_type: str, single: bool = True):
pkmns = self.__pokemon_type_dictionary.get(pkmn_type)
if pkmns is None:
return None
return random.choice(pkmns) if single else pkmns
def get_all(self): def get_all(self):
# Get all the Pokemon. # Get all the Pokemon.
return [pokemon for pokemon in self.__pokemon_list] return [pokemon for pokemon in self.__pokemon_list]
@ -93,21 +125,15 @@ class Database:
# Get all the Extra Pokemon images available. # Get all the Extra Pokemon images available.
return self.__get_region(None) return self.__get_region(None)
def get_light(self, threshold=0.4, all=False): def get_light(self, threshold=0.4, all_pkmn=False):
with open(self.directory + "/./Data/light-dark.txt", 'r') as data_file: light = [pokemon.get_name() for pokemon in self.__pokemon_list
lines = [line.strip() for line in data_file.readlines()] if pokemon.get_dark_threshold() > threshold]
values = [float(line.split(' ')[1]) for line in lines] return light if all_pkmn else random.choice(light)
names = [line.split(' ')[0] for line in lines]
light = [names[i] for i,v in enumerate(values) if v > threshold]
return light if all else random.choice(light)
def get_dark(self, threshold=0.6, all=False): def get_dark(self, threshold=0.6, all_pkmn=False):
with open(self.directory + "/./Data/light-dark.txt", 'r') as data_file: dark = [pokemon.get_name() for pokemon in self.__pokemon_list
lines = [line.strip() for line in data_file.readlines()] if pokemon.get_dark_threshold() < threshold]
values = [float(line.split(' ')[1]) for line in lines] return dark if all_pkmn else random.choice(dark)
names = [line.split(' ')[0] for line in lines]
dark = [names[i] for i,v in enumerate(values) if v < threshold]
return dark if all else random.choice(dark)
def __get_region(self, region): def __get_region(self, region):
# Helper method for getting all the Pokemon of a specified region. # Helper method for getting all the Pokemon of a specified region.
@ -172,30 +198,42 @@ class Database:
def __load_data(self): def __load_data(self):
# Load all the Pokemon data. This does not include the 'Extra' Pokemon. # Load all the Pokemon data. This does not include the 'Extra' Pokemon.
with open(self.directory + "/./Data/pokemon.txt", 'r') as data_file: with open(self.directory + "/./Data/pokemon.txt", 'r') as data_file:
for line in data_file: # Load everything but the Pokemon from the 'Extra' folder. # Load everything but the Pokemon from the 'Extra' folder.
identifier, _, name = line.strip().partition(' ') for i, line in enumerate(data_file):
identifier = '{:03}'.format(int(identifier)) identifier = int(i) + 1
pkmn_data = line.strip().split()
name = pkmn_data[0]
dark_threshold = pkmn_data[1]
pkmn_type = pkmn_data[2]
pkmn_type_secondary = pkmn_data[3] if len(pkmn_data) >= 4 else ""
identifier = '{:03}'.format(identifier)
region = self.__determine_region(identifier) region = self.__determine_region(identifier)
path = self.__determine_folder(identifier) + "/" + identifier + ".jpg" path = self.__determine_folder(identifier) +"/"+ identifier + ".jpg"
pokemon = Pokemon(identifier, name.lower(), region, path) pokemon = Pokemon(identifier, name, region, path, pkmn_type,
pkmn_type_secondary, dark_threshold)
self.__pokemon_type_dictionary[pkmn_type].append(pokemon)
if pkmn_type_secondary != '':
self.__pokemon_type_dictionary[pkmn_type_secondary].append(pokemon)
self.__pokemon_list.append(pokemon) self.__pokemon_list.append(pokemon)
self.__pokemon_dictionary[pokemon.get_name()] = pokemon self.__pokemon_dictionary[pokemon.get_name()] = pokemon
def __load_extra(self): def __load_extra(self):
# Load all the file names of the images in the Extra folder. """Load all the file names of the images in the Extra folder."""
for file in os.listdir(self.directory + "/./Images/Extra"): for file in os.listdir(self.directory + "/./Images/Extra"):
if file.endswith(".jpg"): if file.endswith(".jpg"):
name = os.path.join("/Images/Extra", file).split('/')[-1][0:-4].lower() name = os.path.join("/Images/Extra", file).split('/')[-1][0:-4].lower()
path = self.directory + "/./Images/Extra/" + name + ".jpg" path = self.directory + "/Images/Extra/" + name + ".jpg"
pokemon = Pokemon(None, name, None, path) father = self.__pokemon_dictionary[name.split("-")[0]]
pokemon = Pokemon(None, name, father.get_region(), path, father.get_pkmn_type(),
father.get_pkmn_type_secondary(), father.get_dark_threshold())
if name in self.__pokemon_dictionary: if name in self.__pokemon_dictionary:
raise Exception("Duplicate names detected. " raise Exception("Duplicate names detected.\nThe name of the file " +
"The name of the file " + str(name) + ".jpg in the folder 'Extra' must be changed.") str(name) + ".jpg in the folder 'Extra' must be changed.")
self.__pokemon_list.append(pokemon) self.__pokemon_list.append(pokemon)
self.__pokemon_dictionary[pokemon.get_name()] = pokemon self.__pokemon_dictionary[pokemon.get_name()] = pokemon
def __determine_region(self, identifier): def __determine_region(self, identifier):
# Determine which region a Pokemon is from. """Determine which region a Pokemon is from."""
identifier = int(identifier) identifier = int(identifier)
if identifier < 1: if identifier < 1:
raise Exception("Pokemon ID cannot be less than 1.") raise Exception("Pokemon ID cannot be less than 1.")
@ -217,4 +255,4 @@ class Database:
"hoenn": "III - Hoenn", "hoenn": "III - Hoenn",
"sinnoh": "IV - Sinnoh"} "sinnoh": "IV - Sinnoh"}
suffix = suffix_dict.get(self.__determine_region(identifier)) suffix = suffix_dict.get(self.__determine_region(identifier))
return "{}/./Images/Generation {}".format(self.directory, suffix) return "{}/Images/Generation {}".format(self.directory, suffix)

43
main.py
View file

@ -30,6 +30,11 @@ def print_columns(items):
rows[index % items_per_column] += name rows[index % items_per_column] += name
print_list(rows) print_list(rows)
def print_types(db):
print("All existent pokemon types are: ")
for x in db.get_pokemon_types():
print(x + " - ", end='')
print('\b\b\b ')
def prefix_search(db, arg): def prefix_search(db, arg):
# Find all Pokemon in database, db, with the prefix, arg. # Find all Pokemon in database, db, with the prefix, arg.
@ -76,6 +81,7 @@ Other Parameters:
rnd-slideshow-<region> [time] - Iterate through each Pokemon in the specified region in a random order. Optional time (in seconds) between Pokemon. rnd-slideshow-<region> [time] - Iterate through each Pokemon in the specified region in a random order. Optional time (in seconds) between Pokemon.
light - Change the terminal background to a random light-colored Pokemon. light - Change the terminal background to a random light-colored Pokemon.
dark - Change the terminal background to a random dark-colored Pokemon. dark - Change the terminal background to a random dark-colored Pokemon.
type [type] - Random pokemon of [type] omit the type for a list of types.
clear | disable | off - Clear the Pokemon in the terminal. clear | disable | off - Clear the Pokemon in the terminal.
help - Display this menu. help - Display this menu.
@ -151,7 +157,7 @@ def change_wallpaper(db, arg):
scripter.change_wallpaper(suggestions[0]) scripter.change_wallpaper(suggestions[0])
def multiple_argument_handler(arg, arg2): def multiple_argument_handler(arg, arg2, escape_code):
db = Database() db = Database()
rand = arg.startswith("rnd") rand = arg.startswith("rnd")
if "slideshow" in arg: if "slideshow" in arg:
@ -172,22 +178,25 @@ def multiple_argument_handler(arg, arg2):
except ValueError: except ValueError:
print('The slideshow time needs to be a positive number' print('The slideshow time needs to be a positive number'
'\nType "help" to see all the commands.') '\nType "help" to see all the commands.')
elif arg.lower() == 'type':
arg2 = arg2.lower()
if arg2 not in db.get_pokemon_types():
print("Invalid type specified")
else:
target = db.get_pokemon_of_type(arg2).get_name()
if escape_code:
change_wallpaper(db, target)
else:
change_terminal_background(db, target)
else: else:
print('Invalid command specified.' print('Invalid command specified.'
'\nType "help" to see all the commands.') '\nType "help" to see all the commands.')
def single_argument_handler(arg): def single_argument_handler(arg, escape_code):
# Handle the logic for when there is only one command line parameter inputted. # Handle the logic for when there is only one command line parameter inputted.
db = Database() db = Database()
# If there is an escape code, then change the wallpaper, not the terminal.
if str(arg).startswith("_"):
escape_code = True
arg = arg[1:]
else:
escape_code = False
if len(arg) < 3 and arg.isalpha(): if len(arg) < 3 and arg.isalpha():
prefix_search(db, arg) prefix_search(db, arg)
elif arg == "extra": elif arg == "extra":
@ -236,6 +245,8 @@ def single_argument_handler(arg):
change_terminal_background(db, db.get_light()) change_terminal_background(db, db.get_light())
elif arg == "dark": elif arg == "dark":
change_terminal_background(db, db.get_dark()) change_terminal_background(db, db.get_dark())
elif arg in ("type", "types"):
print_types(db)
elif arg == "slideshow": elif arg == "slideshow":
slideshow(db, 1, 494) slideshow(db, 1, 494)
elif arg == "slideshow-kanto": elif arg == "slideshow-kanto":
@ -270,10 +281,18 @@ def main(argv):
print('No command line arguments specified.' print('No command line arguments specified.'
'\nTry typing in a Pokemon name or number.' '\nTry typing in a Pokemon name or number.'
'\nOr type "help" to see all the commands.') '\nOr type "help" to see all the commands.')
elif len(argv) == 2: sys.exit(1)
single_argument_handler(argv[1].lower()) # If there is an escape code, then change the wallpaper, not the terminal.
if str(argv[1]).startswith("_"):
ESCAPE_CODE = True
argv[1] = argv[1][1:]
else:
ESCAPE_CODE = False
if len(argv) == 2:
single_argument_handler(argv[1].lower(), ESCAPE_CODE)
elif len(argv) == 3: elif len(argv) == 3:
multiple_argument_handler(argv[1].lower(), argv[2]) multiple_argument_handler(argv[1].lower(), argv[2], ESCAPE_CODE)
else: else:
print('Invalid number of arguments.' print('Invalid number of arguments.'
'\nType "help" to see all the commands.') '\nType "help" to see all the commands.')

View file

@ -63,11 +63,12 @@ def test_database_double_arg(arg):
elif arg1 == "names_with_infix": elif arg1 == "names_with_infix":
print_items(db.names_with_infix(arg2)) print_items(db.names_with_infix(arg2))
elif arg1 == "get_light": elif arg1 == "get_light":
print_items(db.get_light(threshold=int(arg2)/10, all=True)) print_items(db.get_light(threshold=int(arg2)/10, all_pkmn=True))
elif arg1 == "get_dark": elif arg1 == "get_dark":
print_items(db.get_dark(threshold=int(arg2)/10, all=True)) print_items(db.get_dark(threshold=int(arg2)/10, all_pkmn=True))
else: else:
print("No such public method '" + arg + "' with two parameters exists in the Database class.") print("No such public method '" + arg + "' with two parameters"
" exists in the Database class.")
def main(argv): def main(argv):