Skip to content

Instantly share code, notes, and snippets.

View jd7h's full-sized avatar

Judith van Stegeren jd7h

View GitHub Profile
@jd7h
jd7h / script.py
Created February 3, 2020 16:11 — forked from efonte/script.py
Disco Elysium texts
import re
strings = set()
with open('texts.txt', mode='r', encoding='utf-8') as file_input:
content = file_input.read()
regExStr = r'^\s*\d string title = "(?:tooltip\d+|Name|Dialogue Text)"\n\s*\d string value = "((?!(START|input|\w+\(\)|\!\(\w+\(\)\))).+)"$'
compiled = re.compile(regExStr, re.MULTILINE)
matched = compiled.finditer(content)