Created
July 26, 2009 19:35
-
-
Save prasincs/155901 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Pydoc.js | |
* Author: Prasanna Gautam | |
* Purpose: Search pydoc for terms from the browser | |
* You could replace it with your pydoc running on localhost if you want to search your packages. | |
*/ | |
CmdUtils.CreateCommand({ | |
names: ["pydoc"], | |
description: "Searches for python documentation for the term you're searching for", | |
arguments: [{role: 'object', nountype: noun_arb_text}], | |
author: "Prasanna Gautam", | |
email: "[email protected]", | |
license: "MIT", | |
homepage: "http://www.nextdoorhacker.com", | |
preview: "Uses http://docs.python.org/search.html to lookup python terms.", | |
execute: function( args ) { | |
var urlTemplate = "http://docs.python.org/search.html?q={QUERY}" | |
var urlString = urlTemplate.replace("{QUERY}", args.object.text); | |
Utils.openUrlInBrowser(urlString); | |
//displayMessage (urlString); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment