Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adamjakab/BeetsPluginTemplate
An empty plugin template for Beets
https://github.com/adamjakab/BeetsPluginTemplate
Last synced: 3 months ago
JSON representation
An empty plugin template for Beets
- Host: GitHub
- URL: https://github.com/adamjakab/BeetsPluginTemplate
- Owner: adamjakab
- License: mit
- Created: 2020-03-22T15:41:44.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-26T17:54:43.000Z (6 months ago)
- Last Synced: 2024-05-28T03:22:20.116Z (6 months ago)
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- jimsghstars - adamjakab/BeetsPluginTemplate - An empty plugin template for Beets (Python)
README
[![Build Status](https://travis-ci.org/adamjakab/BeetsPluginTemplate.svg?branch=master)](https://travis-ci.org/adamjakab/BeetsPluginTemplate)
[![Coverage Status](https://coveralls.io/repos/github/adamjakab/BeetsPluginTemplate/badge.svg?branch=master)](https://coveralls.io/github/adamjakab/BeetsPluginTemplate?branch=master)
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE.txt)# Beets Plugin Template
An empty template structure to speed up plugin development.
## Usage:
### 1. Decide the name for your plugin.
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.### 2. Clone the repository
```bash
git clone https://github.com/adamjakab/BeetsPluginTemplate.git PLUGIN_DIR
```### 3. Reset git
```bash
cd PLUGIN_DIR
rm -rf .git
git init
```### 4. Change the name of the plugin folder
Change the name folder `template` under `beetsplug` to `PLUGIN_NAME`### 5. Change code in: `setup.py`
Substitute all occurrences of `template` with `PLUGIN_NAME`### 6. Change code in: `beetsplug/template/__init__.py`
- Substitute all occurrences of `template` with `PLUGIN_NAME`
- Change class name `TemplatePlugin` to `Plugin`
- Change class name `TemplateCommand` to `Command`### 7. Change code in: `beetsplug/template/command.py`
- Substitute all occurrences of `template` with `PLUGIN_NAME`
- Change class name `TemplateCommand` to `Command`### 8. Change code in: `beetsplug/template/common.py`
- Substitute all occurrences of `template` with `PLUGIN_NAME`### 9. Change copyright headers
In all files, in the copyright header, change:
- `` to your name
- `` to your e-mail address### 10. Add the path of your plugin to your beets configuration
```yaml
pluginpath:
- PLUGIN_DIR/beetsplug/
```### 11. Add your plugin to the list of enabled plugins
```yaml
plugins:
- PLUGIN_NAME
```### 12. Tests
- Substitute all occurrences of `template` with `PLUGIN_NAME`
- Change class name `TemplatePlugin` to `Plugin` in `test/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 ;)### 13. Run the command
Run the command with: `beet template`.## Now, it's your turn
The [plugin development documentation](https://beets.readthedocs.io/en/stable/dev/plugins.html) is a good place to start.