Plugin development: template for new plugins

Hi all,

I have created a template for new plugins. It is not at all perfect and probably it can be improved a lot, but it will give a good starting point for those who are approaching plugin development for the first time.

The README file describes in detail how to clone and modify the code to have your first plugin up and running probably in less than 5 minutes. I hope you will find it useful.

@adrian - Maybe it would make more sense for beetbox to become the maintainer of this repository. What do you think?

1 Like

This is cool; nice work!

A few things in this repository seem cool but might be “overkill” for some plugins just getting started… for example, using a separate YAML file for the default configuration is a pretty heavyweight way to do it, and the inline add dictionary that the built-in plugins use could be a more obvious way to get started.

In general, I think it might make sense to have a simpler template for people interested in just getting started to hack around that uses a single module (i.e., a single Python source file under beetsplug/) rather than a whole multi-module package—that can make it really clear to a beginner what exactly a plugin needs to consist of. Of course, a more complicated template like this one would be good for larger-scale projects too!

Sure! a light version to play around: so you’d also take out travis and friends and the test folder? and keep the bare minimum to get the hang of it… ok - that makes sense.
I am also thinking about creating a script to generate the plugin folder with all the files already in place named correctly and in-file substitutions done with your chosen plugin name. But it is a long term project… :upside_down_face:

1 Like