From c799109c12e92d88ccddea2c7643c983feacd641 Mon Sep 17 00:00:00 2001 From: Draga Doncila Pop Date: Wed, 6 Nov 2024 13:21:57 +1100 Subject: [PATCH] Add message linking to copier template and exit before prompts --- hooks/pre_prompt.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 hooks/pre_prompt.py diff --git a/hooks/pre_prompt.py b/hooks/pre_prompt.py new file mode 100644 index 0000000..39c2300 --- /dev/null +++ b/hooks/pre_prompt.py @@ -0,0 +1,19 @@ +import sys + + +if __name__ == '__main__': + print("\n\n\n") + print("#" * 80) + print("The napari cookiecutter plugin template has been replaced with a copier template!") + print() + print("To create a plugin using the new template, run:") + print() + print("python -m pip install copier jinja2-time") + print("python -m pip install npe2") + print("copier copy --trust https://github.com/napari/napari-plugin-template new-plugin-name") + print() + print("For more information, refer to the template README:") + print("https://github.com/napari/napari-plugin-template") + print("#" * 80) + print("\n\n\n") + sys.exit(1)