In order to fix bug 2520, I need to parse the external_templates files in lyx_pot.py.
This works, except for the HelpText. Can any Pythonist tell me how to Parse the content between HelpText <content (multiline)> HelpTextEnd in the function below? def external_l10n(input_files, output, base): '''Generate pot file from lib/external_templates''' output = open(output, 'w') Template = re.compile(r'^Template\s+(.*)') GuiName = re.compile(r'\s*GuiName\s+(.*)') i = -1 for src in input_files: input = open(src) for lineno, line in enumerate(input.readlines()): if Template.match(line): (string,) = Template.match(line).groups() elif GuiName.match(line): (string,) = GuiName.match(line).groups() --> elif <HelpText>??? else: continue string = string.replace('"', '') if string != "": print >> output, '#: %s:%d\nmsgid "%s"\nmsgstr ""\n' % \ (relativePath(src, base), lineno+1, string) input.close() output.close() Jürgen