nate-parrott / Flashlight

The missing Spotlight plugin system
http://flashlight.nateparrott.com
Other
5.39k stars 411 forks source link

Make plugins configurable? #245

Closed bertramakers closed 9 years ago

bertramakers commented 9 years ago

I created a custom plugin for searching Atlassian Jira for issues, and Atlassian Confluence for wiki pages, based on the web search plugin (I have not much experience with Python). However these plugins are useless for users outside of the company that I work at because I had to hardcode the URLs for our company's Jira and Confluence in the plugin. So the only possible way for others to use the plugin now is to edit it and change the URLs.

It would be awesome if a plugin could be configurable in some way. In my case, a user should be able to configure the URL that their Jira / Confluence is hosted at. Of course other plugins would require other configuration, so a plugin should be able to specify what parameters it needs and how the user should be able to specify those parameters (input field, select box, radio buttons, ...?)

This is just a suggestion, because (as I mentioned above) I don't have much experience with Python and I'm not able to implement this myself and do a pull request.

The plugin I created is located here: https://github.com/bertramakers/Flashlight/tree/master/PluginDirectories/1/atlassian.bundle

marcbachmann commented 9 years ago

Hehe, I also have the same question. I’m writing a github issue creation plugin. Currently I have a config command where I save a json file into the plugin directory. I’ll commit that somewhen in the next days. Maybe we can extract that into some helper methods.

I did it like that:

#  to create an issue
github issue marcbachmann/projectname title for the issue, description of the issue

# to set a default user
github issue config user=marcbachmann

regards

On 07 Jan 2015, at 11:20, Bert Ramakers notifications@github.com wrote:

I created a custom plugin for searching Atlassian Jira for issues, and Atlassian Confluence for wiki pages, based on the web search plugin (I have not much experience with Python). However these plugins are useless for users outside of the company that I work at because I had to hardcode the URLs for our company's Jira and Confluence in the plugin. So the only possible way for others to use the plugin now is to edit it and change the URLs.

It would be awesome if a plugin could be configurable in some way. In my case, a user should be able to configure the URL that their Jira / Confluence is hosted at. Of course other plugins would require other configuration, so a plugin should be able to specify what parameters it needs and how the user should be able to specify those parameters (input field, select box, radio buttons, ...?)

This is just a suggestion, because (as I mentioned above) I don't have much experience with Python and I'm not able to implement this myself and do a pull request.

The plugin I created is located here: https://github.com/bertramakers/Flashlight/tree/master/PluginDirectories/1/atlassian.bundle https://github.com/bertramakers/Flashlight/tree/master/PluginDirectories/1/atlassian.bundle — Reply to this email directly or view it on GitHub https://github.com/nate-parrott/Flashlight/issues/245.

bertramakers commented 9 years ago

I was thinking more along the lines of making them configurable in the UI, in the list of installed plugins for example.

screen shot 2015-01-07 at 11 35 23

But your suggestion could work as well, only will it require more documentation so the users know what parameters can be configured for each plugin.

nate-parrott commented 9 years ago

This is definitely on the roadmap. We've been discussing it in #173, and I'd like to hear what solutions other developers have in mind.

nate-parrott commented 9 years ago

@marcbachmann @bertramakers done! https://github.com/nate-parrott/Flashlight/wiki/Settings-API

bertramakers commented 9 years ago

Looks awesome! I'll try it out tomorrow.