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_DIR
cd PLUGIN_DIR
rm -rf .git
git init
Change the name folder template
under beetsplug
to PLUGIN_NAME
Substitute all occurrences of template
with PLUGIN_NAME
- Substitute all occurrences of
template
withPLUGIN_NAME
- Change class name
TemplatePlugin
to<PLUGIN_NAME>Plugin
- Change class name
TemplateCommand
to<PLUGIN_NAME>Command
- Substitute all occurrences of
template
withPLUGIN_NAME
- Change class name
TemplateCommand
to<PLUGIN_NAME>Command
- Substitute all occurrences of
template
withPLUGIN_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
template
withPLUGIN_NAME
- Change class name
TemplatePlugin
to<PLUGIN_NAME>Plugin
intest/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.