repomate-plug
stable

Contents:

  • Plugin system overview
  • Implementing hooks and writing internal plugins
  • Writing external plugins (recommended and easy!)
  • repomate_plug Module Reference
repomate-plug
  • Docs »
  • Writing external plugins (recommended and easy!)
  • Edit on GitHub

Writing external plugins (recommended and easy!)¶

Writing an external plugin is really easy using the repomate-plugin-cookiecutter template. First of all, you need to install cookiecutter. It’s on PyPi and installs just the same as repomate with pip install cookiecutter (with whatever flags you like to use). Now, running python3 -m cookiecutter gh:slarse/repomate-plugin-cookiecutter will give you some prompts to answer. If you want to create a plugin called exampleplug, it looks something like this:

$ python3 -m cookiecutter gh:slarse/repomate-plugin-cookiecutter
author []: Your Name
email []: email@address.com
github_username []: your_github_username
plugin_name []: exampleplug
short_description []: An example plugin!

This will result in a directory called repomate-exampleplug, containing a fully functioning (albeit quite useless) external plugin. If you do cd exampleplug and then run pip install -e ., you will install the plugin locally. You can then use it like any of the built-in plugins, as described in Using Existing Plugins. To actually implement the behavior that you want, edit the file repomate-exampleplug/repomate_exampleplug/exampleplug.py to implement the hooks you want.

Next Previous

© Copyright 2018, Simon Larsén Revision 5232a88e.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: stable
Versions
latest
stable
Downloads
pdf
htmlzip
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.