diff --git a/README.md b/README.md index d20faa4..0a183cc 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ # Getting Started -This repository contains a cookiecutter template for generating a Bot using +This repository contains a cookiecutter template for generating a Bot using BotCity's Python Framework. To create a templated project all you need to do is: diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index 06e0a64..e746dc3 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -1,6 +1,7 @@ import re import sys + bot_id = '{{ cookiecutter.bot_id }}' pattern = re.compile("^[a-z|A-Z]+[a-z|A-Z|_]*[a-z|A-Z]$") diff --git a/hooks/pre_prompt.py b/hooks/pre_prompt.py new file mode 100644 index 0000000..6a9af2f --- /dev/null +++ b/hooks/pre_prompt.py @@ -0,0 +1,17 @@ +import sys + +print("*"*80) +print("*" + "WARNING".center(78) + "*") +print("*"*80) +print("") +print("You are using an outdated version of the template which is no longer recommended.") +print("While this template works and is valid, it is strongly recommended to create a new project with the latest template version.") +print("") +print("Please refer to our documentation: https://documentation.botcity.dev/tutorials/python-automations/desktop/") +print("") + +try: + input(f"Press any key to continue or use Ctrl+C to cancel.") +except KeyboardInterrupt: + sys.exit("Interrupted by the user") + pass \ No newline at end of file diff --git a/{{ cookiecutter.bot_id.replace(' ', '_') }}/README.md b/{{ cookiecutter.bot_id.replace(' ', '_') }}/README.md index b2e1afb..ba4418c 100644 --- a/{{ cookiecutter.bot_id.replace(' ', '_') }}/README.md +++ b/{{ cookiecutter.bot_id.replace(' ', '_') }}/README.md @@ -2,3 +2,10 @@ {{ cookiecutter.project_short_description}} +## WARNING + +You are using an outdated version of the template which is no longer recommended. + +While this template works and is valid, it is strongly recommended to create a new project with the latest template version. + +Please refer to our [documentation page](https://documentation.botcity.dev/tutorials/python-automations/desktop/). diff --git a/{{ cookiecutter.bot_id.replace(' ', '_') }}/{{ cookiecutter.bot_id.replace(' ', '_') }}/bot.py b/{{ cookiecutter.bot_id.replace(' ', '_') }}/{{ cookiecutter.bot_id.replace(' ', '_') }}/bot.py index 6489395..91853a1 100644 --- a/{{ cookiecutter.bot_id.replace(' ', '_') }}/{{ cookiecutter.bot_id.replace(' ', '_') }}/bot.py +++ b/{{ cookiecutter.bot_id.replace(' ', '_') }}/{{ cookiecutter.bot_id.replace(' ', '_') }}/bot.py @@ -20,6 +20,16 @@ Please refer to the documentation for more information at https://documentation.botcity.dev/ """ +""" +******************************************************************************** +* WARNING * +******************************************************************************** + +You are using an outdated version of the template which is no longer recommended. +While this template works and is valid, it is strongly recommended to create a new project with the latest template version. + +Please refer to our documentation: https://documentation.botcity.dev/tutorials/python-automations/desktop/ +""" from botcity.core import DesktopBot # Uncomment the line below for integrations with BotMaestro # Using the Maestro SDK diff --git a/{{ cookiecutter.bot_id.replace(' ', '_') }}/{{ cookiecutter.bot_id.replace(' ', '_') }}/bothbot.py b/{{ cookiecutter.bot_id.replace(' ', '_') }}/{{ cookiecutter.bot_id.replace(' ', '_') }}/bothbot.py index 2fc59c0..ca8f775 100644 --- a/{{ cookiecutter.bot_id.replace(' ', '_') }}/{{ cookiecutter.bot_id.replace(' ', '_') }}/bothbot.py +++ b/{{ cookiecutter.bot_id.replace(' ', '_') }}/{{ cookiecutter.bot_id.replace(' ', '_') }}/bothbot.py @@ -20,6 +20,17 @@ Please refer to the documentation for more information at https://documentation.botcity.dev/ """ +""" +******************************************************************************** +* WARNING * +******************************************************************************** + +You are using an outdated version of the template which is no longer recommended. +While this template works and is valid, it is strongly recommended to create a new project with the latest template version. + +Please refer to our documentation: https://documentation.botcity.dev/tutorials/python-automations/desktop/ +""" + from botcity.web import WebBot, Browser from botcity.core import DesktopBot # Uncomment the line below for integrations with BotMaestro diff --git a/{{ cookiecutter.bot_id.replace(' ', '_') }}/{{ cookiecutter.bot_id.replace(' ', '_') }}/custombot.py b/{{ cookiecutter.bot_id.replace(' ', '_') }}/{{ cookiecutter.bot_id.replace(' ', '_') }}/custombot.py index c7096b6..9906310 100644 --- a/{{ cookiecutter.bot_id.replace(' ', '_') }}/{{ cookiecutter.bot_id.replace(' ', '_') }}/custombot.py +++ b/{{ cookiecutter.bot_id.replace(' ', '_') }}/{{ cookiecutter.bot_id.replace(' ', '_') }}/custombot.py @@ -20,6 +20,17 @@ Please refer to the documentation for more information at https://documentation.botcity.dev/ """ +""" +******************************************************************************** +* WARNING * +******************************************************************************** + +You are using an outdated version of the template which is no longer recommended. +While this template works and is valid, it is strongly recommended to create a new project with the latest template version. + +Please refer to our documentation: https://documentation.botcity.dev/tutorials/python-automations/desktop/ +""" + from botcity.base import BaseBot # Uncomment the line below for integrations with BotMaestro # Using the Maestro SDK diff --git a/{{ cookiecutter.bot_id.replace(' ', '_') }}/{{ cookiecutter.bot_id.replace(' ', '_') }}/webbot.py b/{{ cookiecutter.bot_id.replace(' ', '_') }}/{{ cookiecutter.bot_id.replace(' ', '_') }}/webbot.py index bf2742d..ede6e76 100644 --- a/{{ cookiecutter.bot_id.replace(' ', '_') }}/{{ cookiecutter.bot_id.replace(' ', '_') }}/webbot.py +++ b/{{ cookiecutter.bot_id.replace(' ', '_') }}/{{ cookiecutter.bot_id.replace(' ', '_') }}/webbot.py @@ -20,6 +20,17 @@ Please refer to the documentation for more information at https://documentation.botcity.dev/ """ +""" +******************************************************************************** +* WARNING * +******************************************************************************** + +You are using an outdated version of the template which is no longer recommended. +While this template works and is valid, it is strongly recommended to create a new project with the latest template version. + +Please refer to our documentation: https://documentation.botcity.dev/tutorials/python-automations/desktop/ +""" + from botcity.web import WebBot, Browser # Uncomment the line below for integrations with BotMaestro # Using the Maestro SDK