Skip to content

Commit 566ce72

Browse files
authored
Remove all []() placeholders (#1501)
1 parent edbfc5e commit 566ce72

12 files changed

Lines changed: 3359 additions & 4574 deletions

data/v2/build.py

Lines changed: 11 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -128,32 +128,6 @@ def build_generic(model_classes, file_name, csv_record_to_objects):
128128
model_class.objects.bulk_create(batch)
129129

130130

131-
def scrub_str(string):
132-
"""
133-
The purpose of this function is to scrub the weird template mark-up out of strings
134-
that Veekun is using for their pokedex.
135-
Example:
136-
[]{move:dragon-tail} will effect the opponents [HP]{mechanic:hp}.
137-
Becomes:
138-
dragon tail will effect the opponents HP.
139-
140-
If you find this results in weird strings please take a stab at improving or re-writing.
141-
"""
142-
groups = re.findall(GROUP_RGX, string)
143-
for group in groups:
144-
if group[0]:
145-
sub = group[0]
146-
else:
147-
sub = group[1].split(":")
148-
if len(sub) >= 2:
149-
sub = sub[1]
150-
else:
151-
sub = sub[0]
152-
sub = sub.replace("-", " ")
153-
string = re.sub(SUB_RGX, sub, string, 1)
154-
return string
155-
156-
157131
##############
158132
# LANGUAGE #
159133
##############
@@ -351,8 +325,8 @@ def csv_record_to_objects(info):
351325
yield AbilityEffectText(
352326
ability_id=int(info[0]),
353327
language_id=int(info[1]),
354-
short_effect=scrub_str(info[2]),
355-
effect=scrub_str(info[3]),
328+
short_effect=info[2],
329+
effect=info[3],
356330
)
357331

358332
build_generic((AbilityEffectText,), "ability_prose.csv", csv_record_to_objects)
@@ -361,7 +335,7 @@ def csv_record_to_objects(info):
361335
yield AbilityChangeEffectText(
362336
ability_change_id=int(info[0]),
363337
language_id=int(info[1]),
364-
effect=scrub_str(info[2]),
338+
effect=info[2],
365339
)
366340

367341
build_generic(
@@ -473,7 +447,7 @@ def csv_record_to_objects(info):
473447
yield ItemFlingEffectEffectText(
474448
item_fling_effect_id=int(info[0]),
475449
language_id=int(info[1]),
476-
effect=scrub_str(info[2]),
450+
effect=info[2],
477451
)
478452

479453
build_generic(
@@ -531,8 +505,8 @@ def csv_record_to_objects(info):
531505
yield ItemEffectText(
532506
item_id=int(info[0]),
533507
language_id=int(info[1]),
534-
short_effect=scrub_str(info[2]),
535-
effect=scrub_str(info[3]),
508+
short_effect=info[2],
509+
effect=info[3],
536510
)
537511

538512
build_generic((ItemEffectText,), "item_prose.csv", csv_record_to_objects)
@@ -750,8 +724,8 @@ def csv_record_to_objects(info):
750724
yield MoveEffectEffectText(
751725
move_effect_id=int(info[0]),
752726
language_id=int(info[1]),
753-
short_effect=scrub_str(info[2]),
754-
effect=scrub_str(info[3]),
727+
short_effect=info[2],
728+
effect=info[3],
755729
)
756730

757731
build_generic(
@@ -771,7 +745,7 @@ def csv_record_to_objects(info):
771745
yield MoveEffectChangeEffectText(
772746
move_effect_change_id=int(info[0]),
773747
language_id=int(info[1]),
774-
effect=scrub_str(info[2]),
748+
effect=info[2],
775749
)
776750

777751
build_generic(
@@ -920,7 +894,7 @@ def csv_record_to_objects(info):
920894
yield MoveAttributeDescription(
921895
move_attribute_id=int(info[0]),
922896
language_id=int(info[1]),
923-
description=scrub_str(info[3]),
897+
description=info[3],
924898
)
925899

926900
build_generic(
@@ -1391,7 +1365,7 @@ def csv_record_to_objects(info):
13911365
yield PokemonSpeciesDescription(
13921366
pokemon_species_id=int(info[0]),
13931367
language_id=int(info[1]),
1394-
description=scrub_str(info[2]),
1368+
description=info[2],
13951369
)
13961370

13971371
build_generic(

data/v2/csv/ability_changelog_prose.csv

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ ability_changelog_id,local_language_id,effect
22
1,5,N'a aucun effet en combat.
33
1,6,Hat im Kampf keinen Effekt.
44
1,9,Has no effect in battle.
5-
2,5,N'empêche pas les KO réguliers en ayant tous ses []{mechanic:hp}.
6-
2,6,Verhindert keine regulären K.O. bei vollen []{mechanic:hp}.
7-
2,9,Does not prevent regular KOs from full [HP]{mechanic:hp}.
5+
2,5,N'empêche pas les KO réguliers en ayant tous ses PV.
6+
2,6,Verhindert keine regulären K.O. bei vollen KP.
7+
2,9,Does not prevent regular KOs from full HP.
88
3,5,N'a pas d'effet en dehors du combat.
99
3,6,Hat außerhalb vom Kampf keinen Effekt.
1010
3,9,Has no overworld effect.
11-
4,5,"N'absorbe pas les capacités []{type:electric} non-offensives, i.e. []{move:thunder-wave}."
12-
4,6,"[]{type:electric}-Attacken die keinen Schaden anrichten, wie []{move:thunder-wave}, werden nicht absorbiert."
13-
4,9,"Does not absorb non-damaging []{type:electric} moves, i.e. []{move:thunder-wave}."
11+
4,5,"N'absorbe pas les capacités Électrik non-offensives, i.e. Cage Éclair."
12+
4,6,"Elektro-Attacken die keinen Schaden anrichten, wie Donnerwelle, werden nicht absorbiert."
13+
4,9,"Does not absorb non-damaging Electric moves, i.e. Thunder Wave."
1414
5,5,Se déclenche à chaque coup d'une capacité multi-coups.
1515
5,6,Löst bei Attacken die mehrmals Treffen bei jedem Treffer aus.
1616
5,9,Triggers on every hit of multiple-hit moves.
17-
6,5,[]{move:will-o-wisp} ne déclenche pas ce talent pour un Pokémon immunisé à []{mechanic:burn}.
18-
6,6,[]{move:will-o-wisp} triggert die Fähigkeit nicht bei Pokémon die immun gegen []{mechanic:burn} sind.
19-
6,9,[]{move:will-o-wisp} does not trigger this ability for Pokémon immune to [burns]{mechanic:burn}.
17+
6,5,Feu Follet ne déclenche pas ce talent pour un Pokémon immunisé à la brûlure.
18+
6,6,Irrlicht triggert die Fähigkeit nicht bei Pokémon die immun gegen Verbrennung sind.
19+
6,9,Will-O-Wisp does not trigger this ability for Pokémon immune to burns.
2020
7,5,N'a pas d'effet en dehors du combat.
2121
7,6,Hat außerhalb vom Kampf keinen Effekt.
2222
7,9,Has no overworld effect.
@@ -29,39 +29,39 @@ ability_changelog_id,local_language_id,effect
2929
10,5,Affecte les autres Pokémon avec ce talent.
3030
10,6,Betrifft andere Pokémon mit dieser Fähigkeit.
3131
10,9,Affects other Pokémon with this ability.
32-
11,5,Inflige seulement 1/16 des []{mechanic:hp} maximum du lanceur en dégâts.
33-
11,6,Verursacht nur 1/16 der maximalen []{mechanic:hp} des Angreifers Schaden.
34-
11,9,Inflicts only 1/16 of the attacker's maximum [HP]{mechanic:hp} in damage.
35-
12,5,[]{move:fire-fang} et les capacités qui infligent des []{mechanic:typeless-damage} ignorent ce talent peu importe le type.
36-
12,6,"[]{move:fire-fang} und Attacken die [typenlosen Schaden]{mechanic:typeless-damage} verursachen, ignorieren diese Fähigkeit unabhängig von ihrem Typ."
37-
12,9,[]{move:fire-fang} and moves that inflict [typeless damage]{mechanic:typeless-damage} ignore this ability regardless of type.
32+
11,5,Inflige seulement 1/16 des PV maximum du lanceur en dégâts.
33+
11,6,Verursacht nur 1/16 der maximalen KP des Angreifers Schaden.
34+
11,9,Inflicts only 1/16 of the attacker's maximum HP in damage.
35+
12,5,Crocs Feu et les capacités qui infligent des dommages sans type ignorent ce talent peu importe le type.
36+
12,6,"Feuerzahn und Attacken die typenlosen Schaden verursachen, ignorieren diese Fähigkeit unabhängig von ihrem Typ."
37+
12,9,Fire Fang and moves that inflict typeless damage ignore this ability regardless of type.
3838
13,5,N'a pas d'effet en dehors du combat.
3939
13,6,Hat außerhalb vom Kampf keinen Effekt.
4040
13,9,Has no overworld effect.
4141
14,5,Ne peut pas influencer les natures des Pokémon rencontrés en interagissant avec eux dans le monde extérieur.
4242
14,6,Kann das Wesen von Pokémon mit denen in der Spielwelt interagiert wird nicht verändern.
4343
14,9,Cannot influence the natures of Pokémon encountered by interacting with them on the overworld.
44-
15,5,Ne transmet pas le []{mechanic:poison} grave comme poison régulier.
45-
15,6,Gibt schwere []{mechanic:poison} als normale []{mechanic:poison} zurück.
46-
15,9,Passes back bad [poison]{mechanic:poison} as regular poison.
44+
15,5,Ne transmet pas le poison grave comme poison régulier.
45+
15,6,Gibt schwere Vergiftung als normale Vergiftung zurück.
46+
15,9,Passes back bad poison as regular poison.
4747
16,5,N'a pas d'effet en dehors du combat.
4848
16,6,Hat außerhalb vom Kampf keinen Effekt.
4949
16,9,Has no overworld effect.
50-
17,5,"N'affecte pas les capacités []{type:electric} non-offensives, i.e. []{move:thunder-wave}. Augmente la fréquence des revanches dans le monde extérieur si un Pokémon de l'équipe a ce talent."
51-
17,6,"Betrifft keine []{type:electric}-Attacken die keinen Schaden anrichten, wie []{move:thunder-wave}. Erhöht die Anzahl an Trainer-Anrufen wenn irgendein Pokémon im Team diese Fähigkeit hat."
52-
17,9,"Does not affect non-damaging []{type:electric} moves, i.e. []{move:thunder-wave}. Increases the frequency of Match Call calls on the overworld if any party Pokémon has this ability."
53-
18,5,Redirige les capacités []{type:electric} sans les annuler ou garantir aucun boost d'[]{mechanic:special-attack}. Ne redirige pas []{move:hidden-power}.
54-
18,6,"Leitet []{type:electric}-Attacken um, ohne ihre Effekte zu deaktivieren oder einen []{mechanic:special-attack} Bonus zu gewähren. Leitet []{move:hidden-power} nicht um."
55-
18,9,Redirects []{type:electric} moves without negating them or granting any [Special Attack]{mechanic:special-attack} boost. Does not redirect []{move:hidden-power}.
50+
17,5,"N'affecte pas les capacités Électrik non-offensives, i.e. Cage Éclair. Augmente la fréquence des revanches dans le monde extérieur si un Pokémon de l'équipe a ce talent."
51+
17,6,"Betrifft keine Elektro-Attacken die keinen Schaden anrichten, wie Donnerwelle. Erhöht die Anzahl an Trainer-Anrufen wenn irgendein Pokémon im Team diese Fähigkeit hat."
52+
17,9,"Does not affect non-damaging Electric moves, i.e. Thunder Wave. Increases the frequency of Match Call calls on the overworld if any party Pokémon has this ability."
53+
18,5,Redirige les capacités Électrik sans les annuler ou garantir aucun boost d'Attaque Spéciale. Ne redirige pas Puissance Cachée.
54+
18,6,"Leitet Elektro-Attacken um, ohne ihre Effekte zu deaktivieren oder einen Spezialangriff Bonus zu gewähren. Leitet Kraftreserve nicht um."
55+
18,9,Redirects Electric moves without negating them or granting any Special Attack boost. Does not redirect Hidden Power.
5656
19,5,N'a pas d'effet en dehors du combat.
5757
19,6,Hat außerhalb vom Kampf keinen Effekt.
5858
19,9,Has no overworld effect.
5959
20,5,N'a pas d'effet en dehors du combat.
6060
20,6,Hat außerhalb vom Kampf keinen Effekt.
6161
20,9,Has no overworld effect.
62-
21,5,"Empêche []{move:heal-bell} de soigner le Pokémon, que ce soit en combat ou non."
63-
21,6,"Hindert []{move:heal-bell} daran, das Pokémon zu heilen, auch außerhalb vom Kampf."
64-
21,9,"Prevents []{move:heal-bell} from curing the Pokémon, whether or not it is in battle."
62+
21,5,"Empêche Glas de Soin de soigner le Pokémon, que ce soit en combat ou non."
63+
21,6,"Hindert Vitalglocke daran, das Pokémon zu heilen, auch außerhalb vom Kampf."
64+
21,9,"Prevents Heal Bell from curing the Pokémon, whether or not it is in battle."
6565
22,5,N'a pas d'effet en dehors du combat.
6666
22,6,Hat außerhalb vom Kampf keinen Effekt.
6767
22,9,Has no overworld effect.
@@ -77,9 +77,9 @@ ability_changelog_id,local_language_id,effect
7777
26,5,N'a pas d'effet en dehors du combat.
7878
26,6,Hat außerhalb vom Kampf keinen Effekt.
7979
26,9,Has no overworld effect.
80-
27,5,Double le rayon d'action de []{move:cut} dans le monde extérieur si un Pokémon de l'équipe a ce talent.
81-
27,6,"Verdoppelt den Radius in dem []{move:cut} Gras entfernt, wenn irgendein Pokémon im Team diese Fähigkeit hat."
82-
27,9,Doubles []{move:cut}'s grass-cutting radius on the overworld if any party Pokémon has this ability.
80+
27,5,Double le rayon d'action de Coupe dans le monde extérieur si un Pokémon de l'équipe a ce talent.
81+
27,6,"Verdoppelt den Radius in dem Zerschneider Gras entfernt, wenn irgendein Pokémon im Team diese Fähigkeit hat."
82+
27,9,Doubles Cut's grass-cutting radius on the overworld if any party Pokémon has this ability.
8383
28,5,N'a aucun effet en combat.
8484
28,6,Hat im Kampf keinen Effekt.
8585
28,9,Has no effect in battle.
@@ -92,9 +92,9 @@ ability_changelog_id,local_language_id,effect
9292
31,5,N'a pas d'effet en dehors du combat.
9393
31,6,Hat außerhalb vom Kampf keinen Effekt.
9494
31,9,Has no overworld effect.
95-
32,5,Ne prend pas effet pendant le []{mechanic:sleep}.
96-
32,6,Hat keinen Effekt während das Pokémon [schläft]{mechanic:sleep}.
97-
32,9,Does not take effect during [sleep]{mechanic:sleep}.
95+
32,5,Ne prend pas effet pendant le sommeil.
96+
32,6,Hat keinen Effekt während das Pokémon schläft.
97+
32,9,Does not take effect during sleep.
9898
33,5,N'a pas d'effet en dehors du combat.
9999
33,6,Hat außerhalb vom Kampf keinen Effekt.
100100
33,9,Has no overworld effect.
@@ -110,45 +110,45 @@ ability_changelog_id,local_language_id,effect
110110
37,5,N'a pas d'effet en dehors du combat.
111111
37,6,Hat außerhalb vom Kampf keinen Effekt.
112112
37,9,Has no overworld effect.
113-
38,5,Le []{mechanic:poison} continue d'infliger des dégâts au Pokémon en dehors du combat.
114-
38,6,[]{mechanic:poison} schadet dem Pokémon außerhalb vom Kampf.
115-
38,9,[Poison]{mechanic:poison} still damages the Pokémon outside of battle.
116-
39,5,"La []{mechanic:paralysis} ne peut pas empêcher le Pokémon de bouger, mais le malus de []{mechanic:speed} est appliqué. Le []{mechanic:poison} continue d'infliger des dommages au Pokémon en dehors du combat."
117-
39,6,"[]{mechanic:paralysis} hindert das Pokémon nicht daran sich zu bewegen, aber der []{mechanic:speed} Malus bleibt. []{mechanic:poison} schadet dem Pokémon außerhalb vom Kampf."
118-
39,9,"[Paralysis]{mechanic:paralysis} cannot prevent the Pokémon from moving, though the [Speed]{mechanic:speed} cut is unaffected. [Poison]{mechanic:poison} still damages the Pokémon outside of battle."
119-
40,5,"À cause d'un glitch, les capacités affectées par ce talent ont (100 - accuracy)% de chance de transpercer []{move:detect} ou []{move:protect}."
120-
40,6,Wegen eines Glitches haben Attacken die von dieser Fähigkeit beeinflusst sind eine (100 - Genauigkeit)% Chance durch den []{move:detect} oder []{move:protect} zu treffen.
121-
40,9,"Due to a glitch, moves affected by this ability have a (100 - accuracy)% chance to hit through []{move:detect} or []{move:protect}."
122-
41,5,[]{move:rest} fonctionne de manière habituelle sous le []{mechanic:strong-sunlight}.
123-
41,6,[]{move:rest} funktioniert normal bei [starkem Sonnenlicht]{mechanic:strong-sunlight}.
124-
41,9,[]{move:rest} works as usual during [strong sunlight]{mechanic:strong-sunlight}.
125-
42,5,[]{move:fling} peut être utilisé de manière habituelle.
126-
42,6,[]{move:fling} kann normal benutzt werden.
127-
42,9,[]{move:fling} can be used as usual.
128-
43,5,Redirige les capacités []{type:water} sans les annuler ou garantir aucun boost d'[]{mechanic:special-attack}. Ne redirige pas []{move:hidden-power}.
129-
43,6,Leitet []{type:water}-Attacken um ohne den []{mechanic:special-attack} Bonus zu gewähren. Leitet []{move:hidden-power} nicht um.
130-
43,9,Redirects []{type:water} moves without negating them or granting any [Special Attack]{mechanic:special-attack} boost. Does not redirect []{move:hidden-power}.
131-
44,5,Peut copier []{ability:flower-gift} et []{ability:wonder-guard}.
132-
44,6,Kann []{ability:flower-gift} und []{ability:wonder-guard} kopieren.
133-
44,9,Can copy []{ability:flower-gift} and []{ability:wonder-guard}.
134-
45,5,Peut copier []{ability:forecast} et []{ability:trace}.
135-
45,6,Kann []{ability:forecast} und []{ability:trace} kopieren.
136-
45,9,Can copy []{ability:forecast} and []{ability:trace}.
137-
46,5,Fonctionne uniquement quand associé à []{ability:minus}.
138-
46,6,Funktioniert nur wenn es mit []{ability:minus} kombiniert wird.
139-
46,9,Powers up only when paired with []{ability:minus}.
140-
47,5,Fonctionne uniquement quand associé à []{ability:plus}.
141-
47,6,Funktioniert nur wenn es mit []{ability:plus} kombiniert wird.
142-
47,9,Powers up only when paired with []{ability:plus}.
113+
38,5,Le poison continue d'infliger des dégâts au Pokémon en dehors du combat.
114+
38,6,Vergiftung schadet dem Pokémon außerhalb vom Kampf.
115+
38,9,Poison still damages the Pokémon outside of battle.
116+
39,5,"La paralysie ne peut pas empêcher le Pokémon de bouger, mais le malus de Vitesse est appliqué. Le poison continue d'infliger des dommages au Pokémon en dehors du combat."
117+
39,6,"Paralyse hindert das Pokémon nicht daran sich zu bewegen, aber der Initiative Malus bleibt. Vergiftung schadet dem Pokémon außerhalb vom Kampf."
118+
39,9,"Paralysis cannot prevent the Pokémon from moving, though the Speed cut is unaffected. Poison still damages the Pokémon outside of battle."
119+
40,5,"À cause d'un glitch, les capacités affectées par ce talent ont (100 - accuracy)% de chance de transpercer Détection ou Abri."
120+
40,6,Wegen eines Glitches haben Attacken die von dieser Fähigkeit beeinflusst sind eine (100 - Genauigkeit)% Chance durch den Scanner oder Schutzschild zu treffen.
121+
40,9,"Due to a glitch, moves affected by this ability have a (100 - accuracy)% chance to hit through Detect or Protect."
122+
41,5,Repos fonctionne de manière habituelle sous le soleil intense.
123+
41,6,Erholung funktioniert normal bei starkem Sonnenlicht.
124+
41,9,Rest works as usual during strong sunlight.
125+
42,5,Dégommage peut être utilisé de manière habituelle.
126+
42,6,Schleuder kann normal benutzt werden.
127+
42,9,Fling can be used as usual.
128+
43,5,Redirige les capacités Eau sans les annuler ou garantir aucun boost d'Attaque Spéciale. Ne redirige pas Puissance Cachée.
129+
43,6,Leitet Wasser-Attacken um ohne den Spezialangriff Bonus zu gewähren. Leitet Kraftreserve nicht um.
130+
43,9,Redirects Water moves without negating them or granting any Special Attack boost. Does not redirect Hidden Power.
131+
44,5,Peut copier Don Floral et Garde Mystik.
132+
44,6,Kann Pflanzengabe und Wunderwache kopieren.
133+
44,9,Can copy Flower Gift and Wonder Guard.
134+
45,5,Peut copier Météo et Calque.
135+
45,6,Kann Prognose und Erfassen kopieren.
136+
45,9,Can copy Forecast and Trace.
137+
46,5,Fonctionne uniquement quand associé à Moins.
138+
46,6,Funktioniert nur wenn es mit Minus kombiniert wird.
139+
46,9,Powers up only when paired with Minus.
140+
47,5,Fonctionne uniquement quand associé à Plus.
141+
47,6,Funktioniert nur wenn es mit Plus kombiniert wird.
142+
47,9,Powers up only when paired with Plus.
143143
48,5,Les chances que l'effet s'active sont de 30%.
144144
48,6,"Die Chance, dass der Effekt eintritt, beträgt 30%."
145145
48,9,Chance of taking effect is 30%.
146-
49,5,[]{move:triple-kick} n'est pas affecté.
147-
49,6,[]{move:triple-kick} wird nicht beeinflusst.
148-
49,9,[]{move:triple-kick} is unaffected.
149-
50,5,[]{move:struggle} n'est pas affecté. []{move:helping-hand} et []{move:defense-curl} ne sont pas pris en compte.
150-
50,6,[]{move:struggle} wird nicht beeinflusst. []{move:helping-hand} und []{move:defense-curl} werden nicht beachtet.
151-
50,9,[]{move:struggle} is unaffected. []{move:helping-hand} and []{move:defense-curl} are not taken into account.
146+
49,5,Triple Pied n'est pas affecté.
147+
49,6,Dreifachkick wird nicht beeinflusst.
148+
49,9,Triple Kick is unaffected.
149+
50,5,Lutte n'est pas affecté. Coup d’Main et Boul’Armure ne sont pas pris en compte.
150+
50,6,Verzweifler wird nicht beeinflusst. Rechte Hand und Einigler werden nicht beachtet.
151+
50,9,Struggle is unaffected. Helping Hand and Defense Curl are not taken into account.
152152
51,5,N'a pas d'effet en dehors du combat.
153153
51,6,Hat außerhalb vom Kampf keinen Effekt.
154154
51,9,Has no overworld effect.

0 commit comments

Comments
 (0)