Skip to content

Commit

Permalink
プラグイン機構でグループ名が正しく認識されるように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
takavfx committed Jun 12, 2022
1 parent 6178445 commit 81baabe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/takanori_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "v2022.6.9"
__version__ = "v2022.6.13"
4 changes: 2 additions & 2 deletions src/takanori_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def cli():
from importlib import metadata

eps = metadata.entry_points()
if eps.get("takanori-cli"):
mycli_eps = eps["takanori-cli"]
if eps.get("takanoricli"):
mycli_eps = eps["takanoricli"]
for ep in mycli_eps:
plugin = ep.load()
main.add_command(plugin)
Expand Down
12 changes: 9 additions & 3 deletions src/takanori_cli/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,20 @@ def plugin():


@plugin.command()
def create():
@click.option(
"-t",
"--template",
default="https://github.com/takavfx/takanori-cli-plugin-template.git",
help="Option template to create a plugin package.",
)
def create(template: str):
"""Create Takanori CLI plugin."""
cookiecutter("https://github.com/takavfx/takanori-cli-plugin-template.git")
cookiecutter(template)


@plugin.command()
def info():
"""Display loaded Takanori CLI plugins."""
"""Display loadable Takanori CLI plugins."""
eps = metadata.entry_points()
if eps.get("takanoricli"):
mycli_eps = eps["takanoricli"]
Expand Down

0 comments on commit 81baabe

Please sign in to comment.