Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 # This file is part of the Adblock Plus web scripts, | 1 # This file is part of the Adblock Plus web scripts, |
2 # Copyright (C) 2006-2017 eyeo GmbH | 2 # Copyright (C) 2006-2017 eyeo GmbH |
3 # | 3 # |
4 # Adblock Plus is free software: you can redistribute it and/or modify | 4 # Adblock Plus is free software: you can redistribute it and/or modify |
5 # it under the terms of the GNU General Public License version 3 as | 5 # it under the terms of the GNU General Public License version 3 as |
6 # published by the Free Software Foundation. | 6 # published by the Free Software Foundation. |
7 # | 7 # |
8 # Adblock Plus is distributed in the hope that it will be useful, | 8 # Adblock Plus is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 os.remove(path) | 139 os.remove(path) |
140 elif os.path.isdir(path): | 140 elif os.path.isdir(path): |
141 remove_unknown(path) | 141 remove_unknown(path) |
142 if not os.listdir(path): | 142 if not os.listdir(path): |
143 os.rmdir(path) | 143 os.rmdir(path) |
144 remove_unknown(output_dir) | 144 remove_unknown(output_dir) |
145 | 145 |
146 if __name__ == '__main__': | 146 if __name__ == '__main__': |
147 parser = ArgumentParser('Convert website source to static website') | 147 parser = ArgumentParser('Convert website source to static website') |
148 parser.add_argument('-r', '--rev', | 148 parser.add_argument('-r', '--rev', |
149 help='Specify which revision to generate from ' + | 149 help=('Specify which revision to generate from. ' |
150 'see "hg help revisions" for info', default='default') | 150 'See "hg help revisions" for details.'), |
Vasily Kuznetsov
2017/04/03 13:02:19
Maybe put this in parentheses? Otherwise we just g
Jon Sonesen
2017/04/03 14:39:24
Done.
| |
151 parser.add_argument('source', help="Path to your website's repository") | 151 default='default') |
Vasily Kuznetsov
2017/04/03 13:02:19
I kind of feel that "your" is not quite appropriat
Jon Sonesen
2017/04/03 14:39:24
Done.
| |
152 parser.add_argument('output', help='Path to the desired output directory') | 152 parser.add_argument('source', help="Path to website's repository") |
153 parser.add_argument('output', help='Path to desired output directory') | |
153 args = parser.parse_args() | 154 args = parser.parse_args() |
154 generate_pages(args.source, args.output, args.rev) | 155 generate_pages(args.source, args.output, args.rev) |
LEFT | RIGHT |