botcreator


Namebotcreator JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryEasy chatbot development with Python. Create your own chatbots with just a few lines of code.
upload_time2024-06-23 03:39:36
maintainerNone
docs_urlNone
authorEdexCode
requires_pythonNone
licenseMIT License
keywords python bot chatbot botdeveloper predefined
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # BotCreator by EdexCode
Easy chatbot development with Python. Create your own chatbots with just a few lines of code.
## How To Use?
### Syntax
#### Python
```python
import botcreator as bc

prompt = input("Prompt: ")
print(bc.botresponse(prompt.lower(), 'TXT_FILE_PATH_HERE'))
```
#### TXT File
```
hi#hello/Hi there!
```

### Symbols
#### 1. / - Separator or Divider:
#### Separates the expected prompt (or conditions) from the response. It divides the rule into two parts: what the bot should recognize or react to (left side) and how it should respond (right side).
#### Example:
```
hi/Hi there!
```
#### Here, 'hi' represents condition or expected input, and 'Hi there' represents response. The / separates the conditions from the responses.

#### 2. # - OR Operator:
#### Indicates multiple possible responses within a single rule. When used after a response, it signifies that the bot can randomly select one of the responses listed.
#### Example:
```
hi#hello#sup/Hi there#How can I help you
```
#### Here, The # symbol in the rule hi#hello#sup/Hi there#How can I help you separates multiple alternative inputs (hi, hello, sup), indicating that the bot should respond to any of these inputs with randomly chosen responses (Hi there or How can I help you).

#### 3. # - AND Operator:
#### Connects multiple conditions within the expected prompt. It indicates that all specified conditions must be present for the rule to trigger a response.
#### NOTE: Only works in expected prompt (or condition)
#### Example:
```
my&name&is/Nice to meet you!
```
#### Here, The & symbol in my&name&is/Nice to meet you! signifies that the bot expects all three words (my, name, is) to appear together in the user's input. When this condition is met, the bot will respond with Nice to meet you!.

#### 4. * - STARTS WITH Operator:
#### The * operator triggers a response if the user's input begins with a specified substring.
#### NOTE: Only works in expected prompt (or condition)
#### Example:
```
*hi/hello
```
#### Here, If the user's input starts with "hi", the bot responds with "Hello".

#### 5. ** - ENDS WITH Operator:
#### This operator triggers a response if the user's input ends with a specified substring defined in the configuration.
#### NOTE: Only works in expected prompt (or condition)
#### Example:
```
**bye/Bye!
```
#### Here, If the user's input ends with "bye", the bot responds with "Bye!".

#### 5. regex(REGEX_HERE) - Regular Expression:
#### This function allows specifying complex matching conditions using regular expressions (regex) within the context of a bot or text processing system.
#### NOTE: Only works in expected prompt (or condition)
#### Example:
```
regex(^(?i)hi.*)/Hello
```
#### Here, if the user's input matches the pattern starting with "hi" (case insensitive), followed by any characters (.*), the bot will respond with "Hello".

## Example
#### words.txt
```
my&name&is/Nice to meet you!
hi#hello#sup/Hi there#How can i help you?
are&you&a&bot#your&a&chatbot/Yes
&help/How can i help you?
*hi/Hello
**bye/Bye!
regex(^(?i)hi.*)/Hello
```
#### main.py
```python
import botcreator as bc

prompt = input("Prompt: ")
print(bc.botresponse(prompt.lower(), 'words.txt'))
```
### Outputs:
#### my&name&is/Nice to meet you!
```
Prompt: my name is edex
Nice to meet you!
```
#### hi/hello/sup/Hi there#How can i help you?
```
Prompt: hi
Hi there
```
```
Prompt: hello
How can i help you?
```
```
Prompt: sup
How can i help you?
```
#### are&you&a&bot#your&a&chatbot/Yes
```
Prompt: are you a bot?
Yes
```
```
Prompt: your a chatbot
Yes
```
#### &help/How can i help you?
```
Prompt: can you help me
How can i help you?
```
#### *hi/Hello
```
Prompt: hi edex
Hello
```
#### *bye/Bye!
```
Prompt: i gotta go bye
Bye!
```
#### regex(^(?i)hi.*)/Hello
```
Prompt: hi bot
Hello
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "botcreator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python, bot, chatbot, botdeveloper, predefined",
    "author": "EdexCode",
    "author_email": "edexcode@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/52/f1/ea0265df41cc665a92565d9409d671229af6464b53984149d5a49a0932c3/botcreator-0.1.1.tar.gz",
    "platform": null,
    "description": "# BotCreator by EdexCode\nEasy chatbot development with Python. Create your own chatbots with just a few lines of code.\n## How To Use?\n### Syntax\n#### Python\n```python\nimport botcreator as bc\n\nprompt = input(\"Prompt: \")\nprint(bc.botresponse(prompt.lower(), 'TXT_FILE_PATH_HERE'))\n```\n#### TXT File\n```\nhi#hello/Hi there!\n```\n\n### Symbols\n#### 1. / - Separator or Divider:\n#### Separates the expected prompt (or conditions) from the response. It divides the rule into two parts: what the bot should recognize or react to (left side) and how it should respond (right side).\n#### Example:\n```\nhi/Hi there!\n```\n#### Here, 'hi' represents condition or expected input, and 'Hi there' represents response. The / separates the conditions from the responses.\n\n#### 2. # - OR Operator:\n#### Indicates multiple possible responses within a single rule. When used after a response, it signifies that the bot can randomly select one of the responses listed.\n#### Example:\n```\nhi#hello#sup/Hi there#How can I help you\n```\n#### Here, The # symbol in the rule hi#hello#sup/Hi there#How can I help you separates multiple alternative inputs (hi, hello, sup), indicating that the bot should respond to any of these inputs with randomly chosen responses (Hi there or How can I help you).\n\n#### 3. # - AND Operator:\n#### Connects multiple conditions within the expected prompt. It indicates that all specified conditions must be present for the rule to trigger a response.\n#### NOTE: Only works in expected prompt (or condition)\n#### Example:\n```\nmy&name&is/Nice to meet you!\n```\n#### Here, The & symbol in my&name&is/Nice to meet you! signifies that the bot expects all three words (my, name, is) to appear together in the user's input. When this condition is met, the bot will respond with Nice to meet you!.\n\n#### 4. * - STARTS WITH Operator:\n#### The * operator triggers a response if the user's input begins with a specified substring.\n#### NOTE: Only works in expected prompt (or condition)\n#### Example:\n```\n*hi/hello\n```\n#### Here, If the user's input starts with \"hi\", the bot responds with \"Hello\".\n\n#### 5. ** - ENDS WITH Operator:\n#### This operator triggers a response if the user's input ends with a specified substring defined in the configuration.\n#### NOTE: Only works in expected prompt (or condition)\n#### Example:\n```\n**bye/Bye!\n```\n#### Here, If the user's input ends with \"bye\", the bot responds with \"Bye!\".\n\n#### 5. regex(REGEX_HERE) - Regular Expression:\n#### This function allows specifying complex matching conditions using regular expressions (regex) within the context of a bot or text processing system.\n#### NOTE: Only works in expected prompt (or condition)\n#### Example:\n```\nregex(^(?i)hi.*)/Hello\n```\n#### Here, if the user's input matches the pattern starting with \"hi\" (case insensitive), followed by any characters (.*), the bot will respond with \"Hello\".\n\n## Example\n#### words.txt\n```\nmy&name&is/Nice to meet you!\nhi#hello#sup/Hi there#How can i help you?\nare&you&a&bot#your&a&chatbot/Yes\n&help/How can i help you?\n*hi/Hello\n**bye/Bye!\nregex(^(?i)hi.*)/Hello\n```\n#### main.py\n```python\nimport botcreator as bc\n\nprompt = input(\"Prompt: \")\nprint(bc.botresponse(prompt.lower(), 'words.txt'))\n```\n### Outputs:\n#### my&name&is/Nice to meet you!\n```\nPrompt: my name is edex\nNice to meet you!\n```\n#### hi/hello/sup/Hi there#How can i help you?\n```\nPrompt: hi\nHi there\n```\n```\nPrompt: hello\nHow can i help you?\n```\n```\nPrompt: sup\nHow can i help you?\n```\n#### are&you&a&bot#your&a&chatbot/Yes\n```\nPrompt: are you a bot?\nYes\n```\n```\nPrompt: your a chatbot\nYes\n```\n#### &help/How can i help you?\n```\nPrompt: can you help me\nHow can i help you?\n```\n#### *hi/Hello\n```\nPrompt: hi edex\nHello\n```\n#### *bye/Bye!\n```\nPrompt: i gotta go bye\nBye!\n```\n#### regex(^(?i)hi.*)/Hello\n```\nPrompt: hi bot\nHello\n```\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Easy chatbot development with Python. Create your own chatbots with just a few lines of code.",
    "version": "0.1.1",
    "project_urls": {
        "GitHub": "https://github.com/EdexCode/BotCreator"
    },
    "split_keywords": [
        "python",
        " bot",
        " chatbot",
        " botdeveloper",
        " predefined"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1c142829c01ef481d1d1fe9a4bb519f1c5626dfa38b3dbdde0749cb285f25485",
                "md5": "a1679cf99bdde6e78a7015c8977c4d77",
                "sha256": "3b378c24725126511ee628646f75230ac04ce880750cc29ebfd8942f7a7eb75e"
            },
            "downloads": -1,
            "filename": "botcreator-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a1679cf99bdde6e78a7015c8977c4d77",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3431,
            "upload_time": "2024-06-23T03:39:35",
            "upload_time_iso_8601": "2024-06-23T03:39:35.368191Z",
            "url": "https://files.pythonhosted.org/packages/1c/14/2829c01ef481d1d1fe9a4bb519f1c5626dfa38b3dbdde0749cb285f25485/botcreator-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "52f1ea0265df41cc665a92565d9409d671229af6464b53984149d5a49a0932c3",
                "md5": "92f12a0d8a86b8f79379ca7e16e762c7",
                "sha256": "c0669744e79b05f7241e1679ca9a9a35cb75b2bdcd6f95a76c238fbbfd58a716"
            },
            "downloads": -1,
            "filename": "botcreator-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "92f12a0d8a86b8f79379ca7e16e762c7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3714,
            "upload_time": "2024-06-23T03:39:36",
            "upload_time_iso_8601": "2024-06-23T03:39:36.343978Z",
            "url": "https://files.pythonhosted.org/packages/52/f1/ea0265df41cc665a92565d9409d671229af6464b53984149d5a49a0932c3/botcreator-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-23 03:39:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "EdexCode",
    "github_project": "BotCreator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "botcreator"
}
        
Elapsed time: 0.92514s