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

Unified Diff: dart/utils/apidoc/scripts/list_files.py

Issue 10174006: Use 'frog' in apidoc. Also fix broken dependencies. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« dart/utils/apidoc/apidoc.gyp ('K') | « dart/utils/apidoc/apidoc.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/utils/apidoc/scripts/list_files.py
diff --git a/dart/utils/apidoc/scripts/list_files.py b/dart/utils/apidoc/scripts/list_files.py
index 836bb03a8d56f1b0168e2780b73fb4dc6baf42d0..d4ef7721bd856b832a6ab7e06ea39b8fc8975caa 100644
--- a/dart/utils/apidoc/scripts/list_files.py
+++ b/dart/utils/apidoc/scripts/list_files.py
@@ -14,22 +14,24 @@
import os
import sys
+def handle_walk(root, directories, files, start):
+ for filename in files:
+ if filename.endswith((
+ '.css', '.dart', '.ico', '.js', '.json', '.png', '.sh', '.txt')):
+ print os.path.relpath(os.path.join(root, filename), start=start)
+
+
def main(argv):
if len(argv) == 1:
- dir = os.curdir
+ dir = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+ os.pardir, os.pardir, os.pardir)
else:
dir = argv[1]
- for root, directories, files in os.walk(dir):
- if root == os.curdir:
- directories[0:] = [
- os.path.join('utils', 'apidoc'),
- os.path.join('lib', 'dartdoc')
- ]
-
- for filename in files:
- if filename.endswith((
- '.css', '.dart', '.ico', '.js', '.json', '.png', '.sh', '.txt')):
- print os.path.relpath(os.path.join(root, filename))
+ start = os.path.join(dir, 'utils', 'apidoc')
+ for root, directories, files in os.walk(os.path.join(dir, 'utils', 'apidoc')):
+ handle_walk(root, directories, files, start)
+ for root, directories, files in os.walk(os.path.join(dir, 'lib', 'dartdoc')):
+ handle_walk(root, directories, files, start)
if __name__ == '__main__':
- sys.exit(main(sys.argv))
+ sys.exit(main(sys.argv))
« dart/utils/apidoc/apidoc.gyp ('K') | « dart/utils/apidoc/apidoc.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698