diff options
Diffstat (limited to 'parser/scrapeToJson.py')
-rwxr-xr-x | parser/scrapeToJson.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/parser/scrapeToJson.py b/parser/scrapeToJson.py index fd8403d..21758d0 100755 --- a/parser/scrapeToJson.py +++ b/parser/scrapeToJson.py @@ -6,7 +6,7 @@ import utils def processMonster(data, weapons, armors, spells): names2names = {'ac': 'Armor Class', 'hp': 'Hit Points', 'speed': 'Speed', 'saves': 'Saving Throws', 'd_resistances': 'Damage Resistances?', 'd_vulnerabilities': 'Damage Vulnerabilities', 'd_immunities': 'Damage Immunities', 'c_immunities': 'Condition Immunities', 'senses': 'Senses', 'langs': 'Languages', 'skills': 'Skills'} - desc = {'entry': 'creature'} + desc = {'entry': 'creatures'} for name in names2names: m = re.search('(\*\*{}\.?\*\*)(.*)'.format(names2names[name]), data) if m: @@ -292,6 +292,8 @@ dumpStuff(spells, 'parsed/spells/') for monster in Path(utils.docsLoc + '/gamemaster_rules/monsters/').glob('*.md'): #print('Processing {}'.format(monster)) + if monster.name == 'index.md': + continue with monster.open() as f: data = f.read() Path('parsed/creatures/').mkdir(exist_ok=True) |