mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-28 06:49:24 +01:00
updatetranslations script now grabs nickserv help entries
This commit is contained in:
parent
7b8c4e7e91
commit
e0b0ccd7dc
@ -75,3 +75,22 @@ if __name__ == '__main__':
|
||||
|
||||
print("help strings:")
|
||||
print(json.dumps({k:k for k in help_strings}, sort_keys=True, indent=2, separators=(',', ': ')))
|
||||
|
||||
# nickserv help entries
|
||||
help_strings = []
|
||||
|
||||
for subdir, dirs, files in os.walk(arguments['<irc-dir>']):
|
||||
for fname in files:
|
||||
filepath = subdir + os.sep + fname
|
||||
if fname == 'nickserv.go':
|
||||
content = open(filepath, 'r').read()
|
||||
|
||||
matches = re.findall(r'\`([^\`]+)\`', content)
|
||||
for match in matches:
|
||||
if '\n' in match and match not in help_strings:
|
||||
help_strings.append(match)
|
||||
|
||||
print()
|
||||
|
||||
print("nickserv help strings:")
|
||||
print(json.dumps({k:k for k in help_strings}, sort_keys=True, indent=2, separators=(',', ': ')))
|
||||
|
Loading…
Reference in New Issue
Block a user