From db0e63c9332799de9bcdc2d55b04e272f19f823b Mon Sep 17 00:00:00 2001 From: Alex Orid Date: Thu, 13 May 2021 16:33:27 -0400 Subject: [PATCH] github prep --- README.md | 52 ++++++++++++++++++++++++++++++--------- config.py | 6 ++--- help_module.py | 5 ---- makedockerimages.sh | 11 +++++++++ praxis-tts-speaker.sh | 2 ++ test_module.py | 6 +---- user_client/v1/index.html | 2 +- user_module.py | 5 ---- 8 files changed, 58 insertions(+), 31 deletions(-) create mode 100644 makedockerimages.sh create mode 100644 praxis-tts-speaker.sh diff --git a/README.md b/README.md index 6e66abd..198870b 100644 --- a/README.md +++ b/README.md @@ -24,26 +24,35 @@ To Stop:
___ -## Python Scripts: - ### User TTS Speaker: - To receive audio from standalone_tt_core.py launch standalone_tts_speaker.py. +To receive audio from standalone_tt_core.py launch standalone_tts_speaker.py. - `python standalone_tts_speaker.py` +`python standalone_tts_speaker.py` - or - - windows: `praxis-tts-speaker.bat` +or +windows: `praxis-tts-speaker.bat` Modify this to match the correct directory! Or no work for YOU!!!
+linux: `praxis-tts-speaker.sh`
+
___ + +### User Web Client: + +To access the User Client visit `index.html` from `\user_client\v1\` in your browser.
+
+___ + # Credentials: ## Credentials Setup: Create a json based on the templates and put them into the `/credentials/` folder. -Refer to the `/credential_templates/` folder for examples. +Refer to the `/credential_templates/` folder for examples.
+
## For Twitch Credentials: + +### Twitch IRC Chat Credentials: Username = `TwitchUsername` *(Must match ***credentialsNickname*** in config)* Helix Client ID = `https://dev.twitch.tv/console/apps` @@ -52,15 +61,34 @@ Oauth = `https://twitchapps.com/tmi/` V5 Client ID = `https://twitchtokengenerator.com/` -## For Database Credentials: -Nickname = `Anything You Want` *(Must match ***credentialsNickname*** in config)* +### Twitch PubSub Credentials: -Engine = `"mysql+mysqlconnector://root:password@localhost:3306/DatabaseName"` +pubsub_client_id = `https://dev.twitch.tv/console/apps` Set url to `http://localhost:17563` +pubsub_secret = `^Look at Instructions Above^` + +pubsub_AccessToken = Generate by using: `python twitch_generate_credentials.py` +pubsub_RefreshToken = `^Look at Instructions Above^`
+
+ +## For Database Credentials: +Will be replaced soon.
The current `db.py` file is not being used for now.
+~~Nickname = `Anything You Want` *(Must match ***credentialsNickname*** in config)*~~ + +~~Engine = `"mysql+mysqlconnector://root:password@localhost:3306/DatabaseName"`~~
+
## For Discord Credentials: Nickname = `Anything You Want` *(Must match ***credentialsNickname*** in config)* -Token = `https://discord.com/developers/` +Token = `https://discord.com/developers/`
+
+ +## Phue Credentials: +The lights module will only be able to establish and generate credentials if the button on the bridge is pressed prior to running the script via: +`python lights_module.py`
+ +After running a credential file will be created in the user's home directory on their operating system called `.python_hue` this can then be moved into the credentials folder.
+
## Credential Usage: diff --git a/config.py b/config.py index 2a457b9..0f8b8f9 100644 --- a/config.py +++ b/config.py @@ -142,6 +142,6 @@ PollyVoice = PollyVoices.Justin #Misc Configs slurList = badwords.slurList -praxisVersion_Alpha = "A.0 " -praxisVersion_Delta = "D.1 " -praxisVersion_Omega = "O.0 " +praxisVersion_Alpha = "0 " #Build +praxisVersion_Delta = "1 " #Minor +praxisVersion_Omega = "0.8 " #Major diff --git a/help_module.py b/help_module.py index b67a4bf..313ca52 100644 --- a/help_module.py +++ b/help_module.py @@ -1,7 +1,6 @@ from commands.command_base import AbstractCommand from enum import Enum import config as config -import db import commands.loader as command_loader @@ -10,7 +9,6 @@ import credentials class Help_Module(): def __init__(self): super().__init__() - #self.dbCredential: credentials.DB_Credential def main(self): print("[Help Module]> help test") @@ -68,7 +66,4 @@ Help_Module_ = Help_Module() if __name__ == "__main__": testModule = Help_Module() - #credentials_manager = credentials.Credentials_Module() - #credentials_manager.load_credentials() - #testModule.dbCredential = credentials_manager.find_DB_Credential(config.credentialsNickname) testModule.main() \ No newline at end of file diff --git a/makedockerimages.sh b/makedockerimages.sh new file mode 100644 index 0000000..f022621 --- /dev/null +++ b/makedockerimages.sh @@ -0,0 +1,11 @@ +#!/bin/bash +docker build --file Dockerfile_standalone_user_client.Dockerfile --tag standalone_user_client . +docker build --file Dockerfile_standalone_eventlog.Dockerfile --tag standalone_eventlog . +docker build --file Dockerfile_standalone_command.Dockerfile --tag standalone_command . +docker build --file Dockerfile_standalone_channelRewards.Dockerfile --tag standalone_channelrewards . +docker build --file Dockerfile_standalone_lights.Dockerfile --tag standalone_lights . +docker build --file Dockerfile_standalone_tts_core.Dockerfile --tag standalone_tts_core . +docker build --file Dockerfile_standalone_websource.Dockerfile --tag standalone_websource . +docker build --file Dockerfile_standalone_DiscordScript.Dockerfile --tag standalone_discordscript . +docker build --file Dockerfile_standalone_TwitchScript.Dockerfile --tag standalone_twitchscript . +docker build --file Dockerfile_standalone_Twitch_Pubsub.Dockerfile --tag standalone_twitch_pubsub . \ No newline at end of file diff --git a/praxis-tts-speaker.sh b/praxis-tts-speaker.sh new file mode 100644 index 0000000..5e48ec9 --- /dev/null +++ b/praxis-tts-speaker.sh @@ -0,0 +1,2 @@ +#!/bin/bash +python "c:\praxis\standalone_tts_speaker.py" \ No newline at end of file diff --git a/test_module.py b/test_module.py index 9594d9b..ba8fa4c 100644 --- a/test_module.py +++ b/test_module.py @@ -1,12 +1,11 @@ import config as config -import db + import credentials class Test_Module(): def __init__(self): super().__init__() - self.dbCredential: credentials.DB_Credential def main(self): print("[TEST Module]> test") @@ -15,7 +14,4 @@ class Test_Module(): if __name__ == "__main__": testModule = Test_Module() - credentials_manager = credentials.Credentials_Module() - credentials_manager.load_credentials() - testModule.dbCredential = credentials_manager.find_DB_Credential(config.credentialsNickname) testModule.main() \ No newline at end of file diff --git a/user_client/v1/index.html b/user_client/v1/index.html index 64edc18..0134548 100644 --- a/user_client/v1/index.html +++ b/user_client/v1/index.html @@ -286,7 +286,7 @@

Made by Alex Orid,
The Curious Nerd

Need Help? Want to help out?
Come visit my Discord
-

Version:
A:0 D:1 O:8

+

Version:
A:0 D:1 O:0.8

diff --git a/user_module.py b/user_module.py index 023c042..425cf63 100644 --- a/user_module.py +++ b/user_module.py @@ -1,7 +1,6 @@ from enum import Enum import time import config as config -import db import tts import credentials @@ -16,7 +15,6 @@ import utilities_script as utility class User_Module(): def __init__(self): super().__init__() - self.dbCredential: credentials.DB_Credential self.MessageLog:list = [] self.commands = command_loader.load_commands_new(AbstractCommand.CommandType.Praxis) self.UseFlagTypeMap = { # this is a mapping of the UserFlagTypes enum to function pointers @@ -133,7 +131,4 @@ class UserFlag(): if __name__ == "__main__": testModule = User_Module() - credentials_manager = credentials.Credentials_Module() - credentials_manager.load_credentials() - testModule.dbCredential = credentials_manager.find_DB_Credential(config.credentialsNickname) testModule.main() \ No newline at end of file