OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/env python |
2 | |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 4 # found in the LICENSE file. |
6 | 5 |
7 '''This utility cleans up the html files as emitted by doxygen so | 6 '''This utility cleans up the html files as emitted by doxygen so |
8 that they are suitable for publication on a Google documentation site. | 7 that they are suitable for publication on a Google documentation site. |
9 ''' | 8 ''' |
10 | 9 |
11 import optparse | 10 import optparse |
12 import os | 11 import os |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 os.path.dirname(os.path.dirname(filename)), 'original_html') | 130 os.path.dirname(os.path.dirname(filename)), 'original_html') |
132 if not os.path.exists(new_directory): | 131 if not os.path.exists(new_directory): |
133 os.mkdir(new_directory) | 132 os.mkdir(new_directory) |
134 shutil.move(filename, new_directory) | 133 shutil.move(filename, new_directory) |
135 except: | 134 except: |
136 print "Error while processing %s" % filename | 135 print "Error while processing %s" % filename |
137 raise | 136 raise |
138 | 137 |
139 return 0 | 138 return 0 |
140 | 139 |
| 140 |
141 if __name__ == '__main__': | 141 if __name__ == '__main__': |
142 sys.exit(main()) | 142 sys.exit(main()) |
OLD | NEW |