An empty template structure to speed up plugin development.
You will need this to name folders and values inside the code.
In the below instructions the PLUGIN_NAME and PLUGIN_DIR placeholders will be used.
git clone https://github.com/adamjakab/BeetsPluginTemplate.git PLUGIN_DIRcd PLUGIN_DIR
rm -rf .git
git initChange the name folder template under beetsplug to PLUGIN_NAME
Substitute all occurrences of template with PLUGIN_NAME
- Substitute all occurrences of
templatewithPLUGIN_NAME - Change class name
TemplatePluginto<PLUGIN_NAME>Plugin - Change class name
TemplateCommandto<PLUGIN_NAME>Command
- Substitute all occurrences of
templatewithPLUGIN_NAME - Change class name
TemplateCommandto<PLUGIN_NAME>Command
- Substitute all occurrences of
templatewithPLUGIN_NAME
In all files, in the copyright header, change:
<AUTHOR>to your name<EMAIL>to your e-mail address
pluginpath:
- PLUGIN_DIR/beetsplug/plugins:
- PLUGIN_NAME- Substitute all occurrences of
templatewithPLUGIN_NAME - Change class name
TemplatePluginto<PLUGIN_NAME>Pluginintest/helper.py - Install nosetests:
pip install nose - Run the tests with
nosetests- all tests should pass and you should get 100% coverage. Keep it that way ;)
Run the command with: beet template.
The plugin development documentation is a good place to start.