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

Unified Diff: utils/apidoc/mdn/search.js

Issue 1361163002: remove docgen remnants from repo, update CHANGELOG (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: remove unused code Created 5 years, 3 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 | « utils/apidoc/mdn/prettyPrint.dart ('k') | utils/apidoc/mdn/util.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/apidoc/mdn/search.js
diff --git a/utils/apidoc/mdn/search.js b/utils/apidoc/mdn/search.js
deleted file mode 100644
index f01d6922222f7522cf7ed7ba436ff2468a440749..0000000000000000000000000000000000000000
--- a/utils/apidoc/mdn/search.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Uses a Google Custom Search Engine to find pages on
- * developer.mozilla.org that appear to match types from the Webkit IDL
- */
-var https = require('https');
-var fs = require('fs');
-
-var domTypes = JSON.parse(fs.readFileSync('data/domTypes.json', 'utf8'));
-
-try {
- fs.mkdirSync('output');
- fs.mkdirSync('output/search');
-} catch (e) {
- // It doesn't matter if the directories already exist.
-}
-
-function searchForType(type) {
- // Strip off WebKit specific prefixes from type names to increase the chances
- // of getting matches on developer.mozilla.org.
- var shortType = type.replace(/^WebKit/, "");
-
- // We use a Google Custom Search Engine provisioned for 10,000 API based
- // queries per day that limits search results to developer.mozilla.org.
- // You shouldn't need to, but if you want to create your own Google Custom
- // Search Engine, visit http://www.google.com/cse/
- var options = {
- host: 'www.googleapis.com',
- path: '/customsearch/v1?key=AIzaSyDN1RhE5FafLzLfErGpoYhHlLHeyEkxTkM&' +
- 'cx=017193972565947830266:wpqsk6dy6ee&num=5&q=' + shortType,
- port: 443,
- method: 'GET'
- };
-
- var req = https.request(options, function(res) {
- res.setEncoding('utf8');
- var data = '';
- res.on('data', function(d) {
- data += d;
- });
- var onClose = function(e) {
- fs.writeFile("output/search/" + type + ".json", data, function(err) {
- if (err) throw err;
- console.log('Done searching for ' + type);
- });
- }
- res.on('close', onClose);
- res.on('end', onClose);
- });
- req.end();
-
- req.on('error', function(e) {
- console.error(e);
- });
-}
-
-for (var i = 0; i < domTypes.length; i++) {
- searchForType(domTypes[i]);
-}
« no previous file with comments | « utils/apidoc/mdn/prettyPrint.dart ('k') | utils/apidoc/mdn/util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698