|
11 | 11 | # files. |
12 | 12 | # * regenerate_tx_config: recreate configuration for all resources. |
13 | 13 |
|
14 | | -from argparse import ArgumentParser |
15 | 14 | import os |
16 | | -from collections import Counter |
| 15 | +from argparse import ArgumentParser |
17 | 16 | from dataclasses import dataclass |
18 | 17 | from pathlib import Path |
19 | 18 | from re import match |
20 | | -from subprocess import call, run |
| 19 | +from subprocess import call |
21 | 20 | import sys |
22 | | -from timeit import timeit |
23 | 21 | from typing import Self, Callable |
24 | 22 | from urllib.parse import urlparse, parse_qs |
25 | 23 |
|
@@ -190,13 +188,10 @@ def language_switcher(entry: ResourceLanguageStatistics) -> bool: |
190 | 188 |
|
191 | 189 |
|
192 | 190 | if __name__ == "__main__": |
193 | | - # RUNNABLE_SCRIPTS = ('fetch', 'recreate_tx_config') |
194 | | - # |
195 | | - # parser = ArgumentParser() |
196 | | - # parser.add_argument('cmd', choices=RUNNABLE_SCRIPTS) |
197 | | - # options = parser.parse_args() |
198 | | - # |
199 | | - # eval(options.cmd)() |
200 | | - print(timeit(get_number_of_translators, number=10)) |
201 | | - |
202 | | - print(timeit(get_number_of_translators_old, number=10)) |
| 191 | + RUNNABLE_SCRIPTS = ('fetch', 'recreate_tx_config') |
| 192 | + |
| 193 | + parser = ArgumentParser() |
| 194 | + parser.add_argument('cmd', choices=RUNNABLE_SCRIPTS) |
| 195 | + options = parser.parse_args() |
| 196 | + |
| 197 | + eval(options.cmd)() |
0 commit comments