From 6e41af7248b4e594d1b538a5989c9d0998b53cca Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 1 May 2021 15:34:12 -0400 Subject: Made data source a git module --- parser/scrapeToJson.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'parser/scrapeToJson.py') 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) -- cgit v1.2.3