Compare commits
No commits in common. "fed7d7240f640f84bfa1f8c62aa965f9b980dd3a" and "bf7947938c35cc0af9ba4a098b4dcebdd64e0526" have entirely different histories.
fed7d7240f
...
bf7947938c
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,5 +2,4 @@
|
|||||||
tts/
|
tts/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
credentials/
|
credentials/
|
||||||
.idea/
|
.idea/
|
||||||
stream_sources/chyron.txt
|
|
||||||
@ -18,11 +18,10 @@ class AbstractCommand(metaclass=ABCMeta):
|
|||||||
TWITCH = auto()
|
TWITCH = auto()
|
||||||
DISCORD = auto()
|
DISCORD = auto()
|
||||||
|
|
||||||
def __init__(self, command: str, n_args: int = 0, command_type=CommandType.NONE, helpText:list=["No Help"]):
|
def __init__(self, command: str, n_args: int = 0, command_type=CommandType.NONE):
|
||||||
self.command = command
|
self.command = command
|
||||||
self.n_args = n_args
|
self.n_args = n_args
|
||||||
self.command_type = command_type
|
self.command_type = command_type
|
||||||
self.help = helpText
|
|
||||||
|
|
||||||
# no touch!
|
# no touch!
|
||||||
def get_args(self, text: str) -> list:
|
def get_args(self, text: str) -> list:
|
||||||
@ -32,10 +31,6 @@ class AbstractCommand(metaclass=ABCMeta):
|
|||||||
def get_command(self) -> str:
|
def get_command(self) -> str:
|
||||||
return self.command
|
return self.command
|
||||||
|
|
||||||
# no touch!
|
|
||||||
def get_help(self):
|
|
||||||
return self.help
|
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def do_command(self, bot, twitch_message):
|
def do_command(self, bot, twitch_message):
|
||||||
pass
|
pass
|
||||||
|
|||||||
@ -7,16 +7,14 @@ import random
|
|||||||
|
|
||||||
import utilities_script as utilities
|
import utilities_script as utilities
|
||||||
|
|
||||||
class CommandChyron(AbstractCommand, metaclass=ABCMeta):
|
class CommandRoll(AbstractCommand, metaclass=ABCMeta):
|
||||||
"""
|
"""
|
||||||
this is the chyron command.
|
this is the roll command.
|
||||||
"""
|
"""
|
||||||
command = "chyron"
|
command = "chyron"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(CommandChyron.command, n_args=5, command_type=AbstractCommand.CommandType.Praxis)
|
super().__init__(CommandRoll.command, n_args=5, command_type=AbstractCommand.CommandType.Praxis)
|
||||||
self.help = ["The chyron string can be generated and updated with this command.",
|
|
||||||
"\nExample:","chyron update \"RIGHTNOW\""]
|
|
||||||
|
|
||||||
def do_command(self, bot, user_message):
|
def do_command(self, bot, user_message):
|
||||||
tempBool = True
|
tempBool = True
|
||||||
@ -24,7 +22,7 @@ class CommandChyron(AbstractCommand, metaclass=ABCMeta):
|
|||||||
tempParsedMessage = user_message.message.split(" ")
|
tempParsedMessage = user_message.message.split(" ")
|
||||||
i = len(tempParsedMessage)
|
i = len(tempParsedMessage)
|
||||||
|
|
||||||
if i > 2:
|
if i > 1:
|
||||||
if "update" in tempParsedMessage[1]:
|
if "update" in tempParsedMessage[1]:
|
||||||
chyron = chyron_module.Chyron_Module()
|
chyron = chyron_module.Chyron_Module()
|
||||||
if i > 2:
|
if i > 2:
|
||||||
@ -41,7 +39,4 @@ class CommandChyron(AbstractCommand, metaclass=ABCMeta):
|
|||||||
chyron.updateChyronFile()
|
chyron.updateChyronFile()
|
||||||
|
|
||||||
returnMessage = "@" + user_message.user + " updated the chyron!"
|
returnMessage = "@" + user_message.user + " updated the chyron!"
|
||||||
bot.return_message(returnMessage)
|
bot.return_message(returnMessage)
|
||||||
|
|
||||||
def get_help(self):
|
|
||||||
return self.help
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
from abc import ABCMeta
|
|
||||||
import help_module
|
|
||||||
|
|
||||||
from commands.command_base import AbstractCommand
|
|
||||||
|
|
||||||
import random
|
|
||||||
|
|
||||||
import utilities_script as utilities
|
|
||||||
|
|
||||||
class CommandChyron(AbstractCommand, metaclass=ABCMeta):
|
|
||||||
"""
|
|
||||||
this is the help command.
|
|
||||||
"""
|
|
||||||
command = "help"
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
super().__init__(CommandChyron.command, n_args=5, command_type=AbstractCommand.CommandType.Praxis)
|
|
||||||
self.help = ["This is a command to learn more about other commands.",
|
|
||||||
"\nExample:","help \"COMMAND\""]
|
|
||||||
|
|
||||||
self.blockDecor = "\n================================================================\n"
|
|
||||||
|
|
||||||
def do_command(self, bot, user_message):
|
|
||||||
tempBool = True
|
|
||||||
if tempBool == True:
|
|
||||||
tempParsedMessage = user_message.message.split(" ")
|
|
||||||
i = len(tempParsedMessage)
|
|
||||||
|
|
||||||
if i > 1:
|
|
||||||
targetCommand = bot.commands[tempParsedMessage[1]]
|
|
||||||
helper = help_module.Help_Module_.help_command_response(targetCommand, help_module.help_command_responseType.fancy)
|
|
||||||
|
|
||||||
returnMessage = helper.response
|
|
||||||
bot.return_message(returnMessage)
|
|
||||||
elif i == 1:
|
|
||||||
commandsList = self.blockDecor + "Commands List:" + self.blockDecor + self.GetCommandsList(bot) + self.blockDecor
|
|
||||||
print(commandsList)
|
|
||||||
|
|
||||||
def GetCommandsList(self, bot):
|
|
||||||
commandsList = ""
|
|
||||||
i = 0
|
|
||||||
for cmd in bot.commands:
|
|
||||||
commandsList = commandsList + cmd + "\n"
|
|
||||||
|
|
||||||
return commandsList
|
|
||||||
|
|
||||||
def get_help(self):
|
|
||||||
return self.help
|
|
||||||
@ -7,16 +7,14 @@ import random
|
|||||||
|
|
||||||
import utilities_script as utilities
|
import utilities_script as utilities
|
||||||
|
|
||||||
class CommandLights(AbstractCommand, metaclass=ABCMeta):
|
class CommandRoll(AbstractCommand, metaclass=ABCMeta):
|
||||||
"""
|
"""
|
||||||
this is the lights command.
|
this is the roll command.
|
||||||
"""
|
"""
|
||||||
command = "lights"
|
command = "lights"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(CommandLights.command, n_args=3, command_type=AbstractCommand.CommandType.Praxis)
|
super().__init__(CommandRoll.command, n_args=3, command_type=AbstractCommand.CommandType.Praxis)
|
||||||
self.help = ["This command allows you to modify the lights via the Lights_Module.",
|
|
||||||
"\nExample:","lights \"SCENE\"","lights \"COLOR\"","lights \"R\" \"G\" \"B\"","lights \"1\" \"0.5\" \"0\""]
|
|
||||||
|
|
||||||
def do_command(self, bot, user_message):
|
def do_command(self, bot, user_message):
|
||||||
tempBool = True
|
tempBool = True
|
||||||
@ -66,7 +64,4 @@ class CommandLights(AbstractCommand, metaclass=ABCMeta):
|
|||||||
print("Scene Command!")
|
print("Scene Command!")
|
||||||
|
|
||||||
returnMessage = "@" + user_message.user + " changed the light's color!"
|
returnMessage = "@" + user_message.user + " changed the light's color!"
|
||||||
bot.return_message(returnMessage)
|
bot.return_message(returnMessage)
|
||||||
|
|
||||||
def get_help(self):
|
|
||||||
return self.help
|
|
||||||
@ -7,16 +7,14 @@ import random
|
|||||||
|
|
||||||
import utilities_script as utilities
|
import utilities_script as utilities
|
||||||
|
|
||||||
class CommandLights(AbstractCommand, metaclass=ABCMeta):
|
class CommandRoll(AbstractCommand, metaclass=ABCMeta):
|
||||||
"""
|
"""
|
||||||
this is the roll command.
|
this is the roll command.
|
||||||
"""
|
"""
|
||||||
command = "!lights"
|
command = "!lights"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(CommandLights.command, n_args=3, command_type=AbstractCommand.CommandType.TWITCH)
|
super().__init__(CommandRoll.command, n_args=3, command_type=AbstractCommand.CommandType.TWITCH)
|
||||||
self.help = ["This command allows you to modify the lights via the Lights_Module.",
|
|
||||||
"\nExample:","!lights \"SCENE\"","!lights \"COLOR\"","!lights \"R\" \"G\" \"B\"","!lights \"1\" \"0.5\" \"0\""]
|
|
||||||
|
|
||||||
def do_command(self, bot, twitch_message):
|
def do_command(self, bot, twitch_message):
|
||||||
|
|
||||||
@ -66,7 +64,4 @@ class CommandLights(AbstractCommand, metaclass=ABCMeta):
|
|||||||
print("Scene Command!")
|
print("Scene Command!")
|
||||||
|
|
||||||
returnMessage = "@" + twitch_message.sender + " changed the light's color!"
|
returnMessage = "@" + twitch_message.sender + " changed the light's color!"
|
||||||
bot.send_message(returnMessage)
|
bot.send_message(returnMessage)
|
||||||
|
|
||||||
def get_help(self):
|
|
||||||
return self.help
|
|
||||||
@ -12,8 +12,6 @@ class CommandTTS(AbstractCommand, metaclass=ABCMeta):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(CommandTTS.command, n_args=0, command_type=AbstractCommand.CommandType.DISCORD)
|
super().__init__(CommandTTS.command, n_args=0, command_type=AbstractCommand.CommandType.DISCORD)
|
||||||
self.help = ["MISSING HELP ENTRY",
|
|
||||||
"\nExample:","command \"PARAM\""]
|
|
||||||
|
|
||||||
async def do_command(self, bot, discord_message: discord.message):
|
async def do_command(self, bot, discord_message: discord.message):
|
||||||
|
|
||||||
@ -23,6 +21,3 @@ class CommandTTS(AbstractCommand, metaclass=ABCMeta):
|
|||||||
response = str("Bot restarting...")
|
response = str("Bot restarting...")
|
||||||
await bot.send_message(discord_message, response)
|
await bot.send_message(discord_message, response)
|
||||||
utilities.restart_self()
|
utilities.restart_self()
|
||||||
|
|
||||||
def get_help(self):
|
|
||||||
return self.help
|
|
||||||
@ -9,8 +9,6 @@ class CommandTTS(AbstractCommand, metaclass=ABCMeta):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(CommandTTS.command, n_args=0, command_type=AbstractCommand.CommandType.TWITCH)
|
super().__init__(CommandTTS.command, n_args=0, command_type=AbstractCommand.CommandType.TWITCH)
|
||||||
self.help = ["MISSING HELP ENTRY",
|
|
||||||
"\nExample:","command \"PARAM\""]
|
|
||||||
|
|
||||||
def do_command(self, bot, twitch_message):
|
def do_command(self, bot, twitch_message):
|
||||||
args = self.get_args(twitch_message.text)
|
args = self.get_args(twitch_message.text)
|
||||||
@ -18,5 +16,3 @@ class CommandTTS(AbstractCommand, metaclass=ABCMeta):
|
|||||||
bot.send_message("Bot restarting...")
|
bot.send_message("Bot restarting...")
|
||||||
utilities.restart_self()
|
utilities.restart_self()
|
||||||
|
|
||||||
def get_help(self):
|
|
||||||
return self.help
|
|
||||||
@ -18,8 +18,6 @@ class CommandRoll(AbstractCommand, metaclass=ABCMeta):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(CommandRoll.command, n_args=1, command_type=AbstractCommand.CommandType.DISCORD)
|
super().__init__(CommandRoll.command, n_args=1, command_type=AbstractCommand.CommandType.DISCORD)
|
||||||
self.help = ["MISSING HELP ENTRY",
|
|
||||||
"\nExample:","command \"PARAM\""]
|
|
||||||
|
|
||||||
async def do_command(self, bot, discord_message: discord.Message):
|
async def do_command(self, bot, discord_message: discord.Message):
|
||||||
print("!roll Detected")
|
print("!roll Detected")
|
||||||
@ -175,6 +173,3 @@ class CommandRoll(AbstractCommand, metaclass=ABCMeta):
|
|||||||
print(diceRoll)
|
print(diceRoll)
|
||||||
|
|
||||||
return diceRoll
|
return diceRoll
|
||||||
|
|
||||||
def get_help(self):
|
|
||||||
return self.help
|
|
||||||
@ -12,8 +12,6 @@ class CommandRoll(AbstractCommand, metaclass=ABCMeta):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(CommandRoll.command, n_args=1, command_type=AbstractCommand.CommandType.TWITCH)
|
super().__init__(CommandRoll.command, n_args=1, command_type=AbstractCommand.CommandType.TWITCH)
|
||||||
self.help = ["MISSING HELP ENTRY",
|
|
||||||
"\nExample:","command \"PARAM\""]
|
|
||||||
|
|
||||||
def do_command(self, bot, twitch_message):
|
def do_command(self, bot, twitch_message):
|
||||||
print("!roll Detected")
|
print("!roll Detected")
|
||||||
@ -168,6 +166,3 @@ class CommandRoll(AbstractCommand, metaclass=ABCMeta):
|
|||||||
print(diceRoll)
|
print(diceRoll)
|
||||||
|
|
||||||
return diceRoll
|
return diceRoll
|
||||||
|
|
||||||
def get_help(self):
|
|
||||||
return self.help
|
|
||||||
@ -12,8 +12,6 @@ class CommandTTS(AbstractCommand, metaclass=ABCMeta):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(CommandTTS.command, n_args=0, command_type=AbstractCommand.CommandType.DISCORD)
|
super().__init__(CommandTTS.command, n_args=0, command_type=AbstractCommand.CommandType.DISCORD)
|
||||||
self.help = ["MISSING HELP ENTRY",
|
|
||||||
"\nExample:","command \"PARAM\""]
|
|
||||||
|
|
||||||
async def do_command(self, bot, discord_message: discord.message):
|
async def do_command(self, bot, discord_message: discord.message):
|
||||||
|
|
||||||
@ -23,6 +21,3 @@ class CommandTTS(AbstractCommand, metaclass=ABCMeta):
|
|||||||
response = str("Bot shutting down...")
|
response = str("Bot shutting down...")
|
||||||
await bot.send_message(discord_message, response)
|
await bot.send_message(discord_message, response)
|
||||||
utilities.hard_shutdown()
|
utilities.hard_shutdown()
|
||||||
|
|
||||||
def get_help(self):
|
|
||||||
return self.help
|
|
||||||
@ -9,8 +9,6 @@ class CommandTTS(AbstractCommand, metaclass=ABCMeta):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(CommandTTS.command, n_args=0, command_type=AbstractCommand.CommandType.TWITCH)
|
super().__init__(CommandTTS.command, n_args=0, command_type=AbstractCommand.CommandType.TWITCH)
|
||||||
self.help = ["MISSING HELP ENTRY",
|
|
||||||
"\nExample:","command \"PARAM\""]
|
|
||||||
|
|
||||||
def do_command(self, bot, twitch_message):
|
def do_command(self, bot, twitch_message):
|
||||||
args = self.get_args(twitch_message.text)
|
args = self.get_args(twitch_message.text)
|
||||||
@ -18,5 +16,3 @@ class CommandTTS(AbstractCommand, metaclass=ABCMeta):
|
|||||||
bot.send_message("Bot shutting down...")
|
bot.send_message("Bot shutting down...")
|
||||||
utilities.hard_shutdown()
|
utilities.hard_shutdown()
|
||||||
|
|
||||||
def get_help(self):
|
|
||||||
return self.help
|
|
||||||
@ -11,12 +11,7 @@ class CommandTest(AbstractCommand, metaclass=ABCMeta):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(CommandTest.command, command_type=AbstractCommand.CommandType.TWITCH)
|
super().__init__(CommandTest.command, command_type=AbstractCommand.CommandType.TWITCH)
|
||||||
self.help = ["MISSING HELP ENTRY",
|
|
||||||
"\nExample:","command \"PARAM\""]
|
|
||||||
|
|
||||||
def do_command(self, bot, twitch_message):
|
def do_command(self, bot, twitch_message):
|
||||||
print("!test Detected")
|
print("!test Detected")
|
||||||
bot.send_message("testing acknowledged")
|
bot.send_message("testing acknowledged")
|
||||||
|
|
||||||
def get_help(self):
|
|
||||||
return self.help
|
|
||||||
@ -10,8 +10,6 @@ class CommandTTS(AbstractCommand, metaclass=ABCMeta):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(CommandTTS.command, n_args=1, command_type=AbstractCommand.CommandType.DISCORD)
|
super().__init__(CommandTTS.command, n_args=1, command_type=AbstractCommand.CommandType.DISCORD)
|
||||||
self.help = ["MISSING HELP ENTRY",
|
|
||||||
"\nExample:","command \"PARAM\""]
|
|
||||||
|
|
||||||
async def do_command(self, bot, discord_message: discord.message):
|
async def do_command(self, bot, discord_message: discord.message):
|
||||||
args = self.get_args(discord_message.content)
|
args = self.get_args(discord_message.content)
|
||||||
@ -30,6 +28,3 @@ class CommandTTS(AbstractCommand, metaclass=ABCMeta):
|
|||||||
response = str("tts deactivated on %s" % discord_message.guild.name)
|
response = str("tts deactivated on %s" % discord_message.guild.name)
|
||||||
await bot.send_message(discord_message, response)
|
await bot.send_message(discord_message, response)
|
||||||
bot.tts_enabled = False
|
bot.tts_enabled = False
|
||||||
|
|
||||||
def get_help(self):
|
|
||||||
return self.help
|
|
||||||
@ -9,8 +9,6 @@ class CommandTTS(AbstractCommand, metaclass=ABCMeta):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(CommandTTS.command, n_args=1, command_type=AbstractCommand.CommandType.TWITCH)
|
super().__init__(CommandTTS.command, n_args=1, command_type=AbstractCommand.CommandType.TWITCH)
|
||||||
self.help = ["MISSING HELP ENTRY",
|
|
||||||
"\nExample:","command \"PARAM\""]
|
|
||||||
|
|
||||||
def do_command(self, bot, twitch_message):
|
def do_command(self, bot, twitch_message):
|
||||||
args = self.get_args(twitch_message.text)
|
args = self.get_args(twitch_message.text)
|
||||||
@ -22,6 +20,3 @@ class CommandTTS(AbstractCommand, metaclass=ABCMeta):
|
|||||||
if twitch_message.sender.lower() == twitch_message.channel:
|
if twitch_message.sender.lower() == twitch_message.channel:
|
||||||
bot.send_message("tts deactivated on #%s" % twitch_message.channel)
|
bot.send_message("tts deactivated on #%s" % twitch_message.channel)
|
||||||
bot.tts_enabled = False
|
bot.tts_enabled = False
|
||||||
|
|
||||||
def get_help(self):
|
|
||||||
return self.help
|
|
||||||
@ -1,73 +0,0 @@
|
|||||||
from commands.command_base import AbstractCommand
|
|
||||||
from enum import Enum
|
|
||||||
import config as config
|
|
||||||
import db
|
|
||||||
|
|
||||||
import commands.loader as command_loader
|
|
||||||
|
|
||||||
import credentials
|
|
||||||
|
|
||||||
class Help_Module():
|
|
||||||
def __init__(self):
|
|
||||||
super().__init__()
|
|
||||||
#self.dbCredential: credentials.DB_Credential
|
|
||||||
|
|
||||||
def main(self):
|
|
||||||
print("[Help Module]> help test")
|
|
||||||
|
|
||||||
def help_command_response(self, command:AbstractCommand, responseType):
|
|
||||||
response = help_command_response()
|
|
||||||
response.setup(command, responseType)
|
|
||||||
response.makeResponse()
|
|
||||||
return response
|
|
||||||
|
|
||||||
class help_command_responseType(Enum):
|
|
||||||
plain = 1 # One line response
|
|
||||||
fancy = 2 # Fancy formatted response
|
|
||||||
|
|
||||||
class help_command_response():
|
|
||||||
def __init__(self):
|
|
||||||
super().__init__()
|
|
||||||
self.command = None
|
|
||||||
self.commandName = ""
|
|
||||||
self.helpText = ""
|
|
||||||
self.response = ""
|
|
||||||
self.responseType = help_command_responseType.plain
|
|
||||||
self.blockDecor = "\n================================================================\n"
|
|
||||||
|
|
||||||
def setup(self, command, responseType):
|
|
||||||
self.command = command
|
|
||||||
self.commandName = command.command
|
|
||||||
self.responseType = responseType
|
|
||||||
|
|
||||||
def makeResponse(self):
|
|
||||||
if self.responseType == help_command_responseType.plain:
|
|
||||||
self.response_plain()
|
|
||||||
elif self.responseType == help_command_responseType.fancy:
|
|
||||||
self.response_fancy()
|
|
||||||
|
|
||||||
def response_plain(self):
|
|
||||||
tempHelpText = ""
|
|
||||||
for line in self.command.help:
|
|
||||||
tempHelpText = tempHelpText + line + " "
|
|
||||||
self.response = "Command: " + self.commandName + " : " + self.helpText
|
|
||||||
return self.response
|
|
||||||
|
|
||||||
def response_fancy(self):
|
|
||||||
tempHelpText = ""
|
|
||||||
for line in self.command.help:
|
|
||||||
tempHelpText = tempHelpText + line + "\n"
|
|
||||||
self.response = self.blockDecor + "Command: " + self.commandName + self.blockDecor + tempHelpText + self.blockDecor
|
|
||||||
return self.response
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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()
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
cd "c:\praxis"
|
|
||||||
python "c:/Praxis/main.py"
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
cd "c:\praxis"
|
|
||||||
python "c:\praxis\user_module.py"
|
|
||||||
@ -17,7 +17,7 @@ class User_Module():
|
|||||||
self.MessageLog:list = []
|
self.MessageLog:list = []
|
||||||
|
|
||||||
def main(self):
|
def main(self):
|
||||||
print("\nWaiting on User input...\n")
|
print("\nWaiting on User input...")
|
||||||
inputLoop = True
|
inputLoop = True
|
||||||
while inputLoop:
|
while inputLoop:
|
||||||
keyboardInput = input()
|
keyboardInput = input()
|
||||||
|
|||||||
@ -35,9 +35,9 @@ def does_contain_OnlyNumbers(text):
|
|||||||
return isJustNumbers
|
return isJustNumbers
|
||||||
|
|
||||||
def rescale_value(value, min, max):
|
def rescale_value(value, min, max):
|
||||||
#print("trying Rescale")
|
print("trying Rescale")
|
||||||
returnValue = (value - min) / (max - min)
|
returnValue = (value - min) / (max - min)
|
||||||
#print("got ", returnValue)
|
print("got ", returnValue)
|
||||||
return returnValue
|
return returnValue
|
||||||
|
|
||||||
def get_dir(selected_dir):
|
def get_dir(selected_dir):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user