Show More
@@ -0,0 +1,34 b'' | |||
|
1 | #!/usr/bin/env python3 | |
|
2 | ||
|
3 | # -*- coding: utf-8 -*- | |
|
4 | # This program is free software: you can redistribute it and/or modify | |
|
5 | # it under the terms of the GNU General Public License as published by | |
|
6 | # the Free Software Foundation, either version 3 of the License, or | |
|
7 | # (at your option) any later version. | |
|
8 | # | |
|
9 | # This program is distributed in the hope that it will be useful, | |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
12 | # GNU General Public License for more details. | |
|
13 | # | |
|
14 | # You should have received a copy of the GNU General Public License | |
|
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
|
16 | ||
|
17 | import click | |
|
18 | ||
|
19 | import i18n_utils | |
|
20 | ||
|
21 | ||
|
22 | """ | |
|
23 | Tool for maintenance of .po and .pot files | |
|
24 | """ | |
|
25 | ||
|
26 | @click.group() | |
|
27 | @click.option('--debug/--no-debug', default=False) | |
|
28 | def cli(debug): | |
|
29 | if (debug): | |
|
30 | i18n_utils.do_debug = True | |
|
31 | pass | |
|
32 | ||
|
33 | if __name__ == '__main__': | |
|
34 | cli() |
@@ -0,0 +1,27 b'' | |||
|
1 | # This program is free software: you can redistribute it and/or modify | |
|
2 | # it under the terms of the GNU General Public License as published by | |
|
3 | # the Free Software Foundation, either version 3 of the License, or | |
|
4 | # (at your option) any later version. | |
|
5 | # | |
|
6 | # This program is distributed in the hope that it will be useful, | |
|
7 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
8 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
9 | # GNU General Public License for more details. | |
|
10 | # | |
|
11 | # You should have received a copy of the GNU General Public License | |
|
12 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
|
13 | ||
|
14 | from __future__ import print_function | |
|
15 | ||
|
16 | import subprocess | |
|
17 | ||
|
18 | ||
|
19 | do_debug = False # set from scripts/i18n --debug | |
|
20 | ||
|
21 | def debug(*args, **kwargs): | |
|
22 | if do_debug: | |
|
23 | print(*args, **kwargs) | |
|
24 | ||
|
25 | def runcmd(cmd, *args, **kwargs): | |
|
26 | debug('... Executing command: %s' % ' '.join(cmd)) | |
|
27 | subprocess.check_call(cmd, *args, **kwargs) |
General Comments 0
You need to be logged in to leave comments.
Login now