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

Unified Diff: tools/html_json_doc/bin/html_json_doc.dart

Issue 12220056: Delete the old html_json docs stuff. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | tools/html_json_doc/lib/html_to_json.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/html_json_doc/bin/html_json_doc.dart
diff --git a/tools/html_json_doc/bin/html_json_doc.dart b/tools/html_json_doc/bin/html_json_doc.dart
deleted file mode 100644
index c37d302cba9f088bbacdfef25521cd3b2b523db3..0000000000000000000000000000000000000000
--- a/tools/html_json_doc/bin/html_json_doc.dart
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/**
- * TODO(amouravski): Document stuff here.
- */
-
-import 'dart:io';
-
-import '../lib/html_to_json.dart' as html_to_json;
-import '../lib/json_to_html.dart' as json_to_html;
-import '../../../pkg/args/lib/args.dart';
-
-// Need this because ArgParser.getUsage doesn't show command invocation.
-const USAGE = 'Usage htmlJsonDoc [options] --mode=<mode> <HTML.dart directory> '
- '<json path>\n[options] include:';
-final argParser = new ArgParser();
-
-main() {
- final args = new Options().arguments;
-
- if (args.isEmpty) {
- printUsage('No arguments provided.');
- return;
- }
-
- var mode;
- argParser.addOption('mode', abbr: 'm',
- help: '(Required) Convert from HTML docs to JSON or vice versa.',
- allowed: ['html-to-json', 'json-to-html'], allowedHelp: {
- 'html-to-json': 'Processes all HTML .dart files at given\n'
- 'location and outputs JSON.',
- 'json-to-html': 'Takes JSON file at location and inserts docs into\n'
- 'HTML .dart files.'},
- callback: (m) => mode = m
- );
-
- final argResults = argParser.parse(args);
-
- if (mode == null) {
- printUsage('Mode is a required option.');
- return;
- } else if (argResults.rest.length < 2) {
- printUsage('Insufficient arguments.');
- return;
- }
-
- var htmlPath = new Path(argResults.rest[0]);
- var jsonPath = new Path(argResults.rest[1]);
-
- var convertFuture;
- if (mode == 'html-to-json') {
- convertFuture = html_to_json.convert(htmlPath, jsonPath);
- } else {
- convertFuture = json_to_html.convert(htmlPath, jsonPath);
- }
-
- convertFuture.then((anyErrors) {
- print('Completed ${anyErrors ? "with" : "without"} errors.');
- });
-}
-
-/// Prints the usage of the tool. [message] is printed if provided.
-void printUsage([String message]) {
- print(message);
- print(USAGE);
- print(argParser.getUsage());
-}
« no previous file with comments | « no previous file | tools/html_json_doc/lib/html_to_json.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698