Skip to content

sopel-irc/cookiecutter-sopel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cookiecutter-sopel

Plugin template for Sopel 7 and higher. To use:

pip install cookiecutter
cookiecutter gh:sopel-irc/cookiecutter-sopel

You can then release the plugin on PyPI in the normal Python way.

Obviously, you can modify anything that the template builds, so don't feel constrained to this one way of doing things. Please do submit PRs to this repo if you think the template can be improved.

Setting defaults (name, email, username)

If you find yourself creating plugins fairly often, you'll likely get tired of typing in your name, email address, and GitHub username every time. Fortunately, cookiecutter itself provides a way to specify default values via a .cookiecutterrc file in your home directory. For example, this snippet:

default_context:
    full_name: "dgw"
    email: "dgw@example.com"
    github_username: "dgw"

would override the default values for this template's full_name, email, and github_username fields, meaning you could just press Enter to accept each of these instead of retyping your info every time.

Read more in cookiecutter's documentation.

Legacy module template

If you need to build a new plugin that will be compatible with Sopel 6, use the legacy template:

pip install cookiecutter
cookiecutter gh:sopel-irc/cookiecutter-sopel --checkout sopel_modules