NEW FILE: cleanyaml.py which sorts and cleans all the various yaml files
parent
09b745d3c8
commit
16885ca59d
|
@ -75,36 +75,35 @@ lang_rarity:
|
||||||
- Secret
|
- Secret
|
||||||
movement:
|
movement:
|
||||||
- Air Walk (constant)
|
- Air Walk (constant)
|
||||||
- Land
|
|
||||||
- Burrow
|
- Burrow
|
||||||
- Burrow (sand only)
|
- Burrow (sand only)
|
||||||
- Burrow (snow only)
|
- Burrow (snow only)
|
||||||
- Can't Move
|
- Can't Move
|
||||||
- Climb
|
- Climb
|
||||||
- Climb Stone
|
- Climb Stone
|
||||||
- Ice Climb
|
- Cloud Walk
|
||||||
- Ice Stride
|
|
||||||
- Trickster's Step
|
|
||||||
- Earth Glide
|
|
||||||
- Sand Glide
|
|
||||||
- Glide
|
|
||||||
- Compression
|
- Compression
|
||||||
- Suction
|
- Earth Glide
|
||||||
- Freedom of Movement (constant)
|
|
||||||
- Spider Climb (constant)
|
|
||||||
- Unstoppable Burrow
|
|
||||||
- Fly
|
- Fly
|
||||||
- Fly (from fly)
|
- Fly (from fly)
|
||||||
|
- Freedom of Movement (constant)
|
||||||
|
- Glide
|
||||||
|
- Ice Climb
|
||||||
|
- Ice Stride
|
||||||
|
- Land
|
||||||
- Magma Swim
|
- Magma Swim
|
||||||
|
- Powerful Jumper
|
||||||
|
- Sand Glide
|
||||||
|
- Spider Climb (constant)
|
||||||
|
- Suction
|
||||||
- Swim
|
- Swim
|
||||||
- Swamp Stride
|
- Swamp Stride
|
||||||
- Swiftness
|
- Swiftness
|
||||||
- Woodland Stride
|
- Trickster's Step
|
||||||
- Trackless Step
|
- Trackless Step
|
||||||
- Cloud Walk
|
- Unstoppable Burrow
|
||||||
- Powerful Jumper
|
|
||||||
- Swiftness
|
|
||||||
- Walk in Shadow
|
- Walk in Shadow
|
||||||
|
- Woodland Stride
|
||||||
size:
|
size:
|
||||||
- name: Tiny
|
- name: Tiny
|
||||||
space_in_ft: 4
|
space_in_ft: 4
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
# THIS FILE SIMPLY LOADS THE YAML FILE INTO PYYAML AND THEN SPITS IT BACK OUT
|
||||||
|
# TO CLEAN UP AND ORDER ALL THE YAML
|
||||||
|
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
yfiles = ["actions.yaml",
|
||||||
|
"backgrounds.yaml",
|
||||||
|
"basics.yaml",
|
||||||
|
"bulks.yaml",
|
||||||
|
"conditions.yaml",
|
||||||
|
"damages.yaml",
|
||||||
|
"feats-levels-false-matches.yaml",
|
||||||
|
"feats.yaml",
|
||||||
|
"langs.yaml",
|
||||||
|
"monsters.yaml",
|
||||||
|
"requirements.yaml",
|
||||||
|
"skills.yaml",
|
||||||
|
"sources.yaml",
|
||||||
|
"spells.yaml",
|
||||||
|
"traits.yaml",
|
||||||
|
"triggers.yaml"]
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
for x in yfiles:
|
||||||
|
with open(x, 'r') as r:
|
||||||
|
data = yaml.full_load(r)
|
||||||
|
final = yaml.safe_dump(data, allow_unicode=True)
|
||||||
|
with open(x, 'w') as f:
|
||||||
|
f.write(final)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
Loading…
Reference in New Issue