Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: tools/polymer/polymer_grdp_to_txt.py

Issue 984553002: Added helper scripts for modifying polymer_resources.grdp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: newline Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2015 The Chromium Authors. All rights reserved.
Dan Beam 2015/03/16 19:28:09 remove "(c) "
dzhioev (left Google) 2015/03/17 12:43:18 Done.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import sys
7 import xml.sax
8
Dan Beam 2015/03/16 19:28:09 \n\n between file-level globals: https://google-st
dzhioev (left Google) 2015/03/17 12:43:18 Done.
9 class PathsExtractor(xml.sax.ContentHandler):
10 def __init__(self):
11 self.paths = []
12
13 def startElement(self, name, attrs):
14 if name != 'structure':
15 return
16 path = attrs['file']
17 if path.startswith('../../../third_party/web-animations-js'):
18 return
19 prefix = '../../../third_party/polymer/components-chromium/'
20 if not path.startswith(prefix):
21 raise Exception("Unexpected path %s." % path)
22 self.paths.append(path[len(prefix):])
23
Dan Beam 2015/03/16 19:28:10 if __name__ == '__main__':
dzhioev (left Google) 2015/03/17 12:43:18 Done.
24 xml_handler = PathsExtractor()
25 xml.sax.parse(sys.argv[1], xml_handler)
26 print '\n'.join(sorted(xml_handler.paths))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698