Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: cms/bin/generate_static_pages.py

Issue 29400555: Issue 4992 - Adds optional revision arg to generate_static_pages (Closed) Base URL: https://hg.adblockplus.org/cms
Left Patch Set: address comments for argparse descriptions Created April 3, 2017, 10:47 a.m.
Right Patch Set: fixed redundant sys.argv definition Created April 4, 2017, 6:59 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | cms/sources.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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)
LEFTRIGHT
« no previous file | cms/sources.py » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld