fixup: Format Python code with Black

develop
github-actions 4 months ago
parent 1cb2d624ba
commit 6d53e8f647

@ -65,12 +65,10 @@ class AWSPolly:
sys.exit(-1) sys.exit(-1)
except ProfileNotFound: except ProfileNotFound:
print("You need to install the AWS CLI and configure your profile") print("You need to install the AWS CLI and configure your profile")
print( print("""
"""
Linux: https://docs.aws.amazon.com/polly/latest/dg/setup-aws-cli.html Linux: https://docs.aws.amazon.com/polly/latest/dg/setup-aws-cli.html
Windows: https://docs.aws.amazon.com/polly/latest/dg/install-voice-plugin2.html Windows: https://docs.aws.amazon.com/polly/latest/dg/install-voice-plugin2.html
""" """)
)
sys.exit(-1) sys.exit(-1)
def randomvoice(self): def randomvoice(self):

@ -27,16 +27,14 @@ from video_creation.voices import save_text_to_mp3
__VERSION__ = "3.4.0" __VERSION__ = "3.4.0"
print( print("""
"""
██████╗ ███████╗██████╗ ██████╗ ██╗████████╗ ██╗ ██╗██╗██████╗ ███████╗ ██████╗ ███╗ ███╗ █████╗ ██╗ ██╗███████╗██████╗ ██████╗ ███████╗██████╗ ██████╗ ██╗████████╗ ██╗ ██╗██╗██████╗ ███████╗ ██████╗ ███╗ ███╗ █████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔════╝██╔══██╗██╔══██╗██║╚══██╔══╝ ██║ ██║██║██╔══██╗██╔════╝██╔═══██╗ ████╗ ████║██╔══██╗██║ ██╔╝██╔════╝██╔══██╗ ██╔══██╗██╔════╝██╔══██╗██╔══██╗██║╚══██╔══╝ ██║ ██║██║██╔══██╗██╔════╝██╔═══██╗ ████╗ ████║██╔══██╗██║ ██╔╝██╔════╝██╔══██╗
██████╔╝█████╗ ██║ ██║██║ ██║██║ ██║ ██║ ██║██║██║ ██║█████╗ ██║ ██║ ██╔████╔██║███████║█████╔╝ █████╗ ██████╔╝ ██████╔╝█████╗ ██║ ██║██║ ██║██║ ██║ ██║ ██║██║██║ ██║█████╗ ██║ ██║ ██╔████╔██║███████║█████╔╝ █████╗ ██████╔╝
██╔══██╗██╔══╝ ██║ ██║██║ ██║██║ ██║ ╚██╗ ██╔╝██║██║ ██║██╔══╝ ██║ ██║ ██║╚██╔╝██║██╔══██║██╔═██╗ ██╔══╝ ██╔══██╗ ██╔══██╗██╔══╝ ██║ ██║██║ ██║██║ ██║ ╚██╗ ██╔╝██║██║ ██║██╔══╝ ██║ ██║ ██║╚██╔╝██║██╔══██║██╔═██╗ ██╔══╝ ██╔══██╗
██║ ██║███████╗██████╔╝██████╔╝██║ ██║ ╚████╔╝ ██║██████╔╝███████╗╚██████╔╝ ██║ ╚═╝ ██║██║ ██║██║ ██╗███████╗██║ ██║ ██║ ██║███████╗██████╔╝██████╔╝██║ ██║ ╚████╔╝ ██║██████╔╝███████╗╚██████╔╝ ██║ ╚═╝ ██║██║ ██║██║ ██╗███████╗██║ ██║
╚═╝ ╚═╝╚══════╝╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═══╝ ╚═╝╚═════╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═══╝ ╚═╝╚═════╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
""" """)
)
print_markdown( print_markdown(
"### Thanks for using this tool! Feel free to contribute to this project on GitHub! If you have any questions, feel free to join my Discord server or submit a GitHub issue. You can find solutions to many common problems in the documentation: https://reddit-video-maker-bot.netlify.app/" "### Thanks for using this tool! Feel free to contribute to this project on GitHub! If you have any questions, feel free to join my Discord server or submit a GitHub issue. You can find solutions to many common problems in the documentation: https://reddit-video-maker-bot.netlify.app/"
) )

@ -118,10 +118,8 @@ def check_toml(template_file, config_file) -> Tuple[bool, Dict]:
try: try:
config = toml.load(config_file) config = toml.load(config_file)
except toml.TomlDecodeError: except toml.TomlDecodeError:
console.print( console.print(f"""[blue]Couldn't read {config_file}.
f"""[blue]Couldn't read {config_file}. Overwrite it?(y/n)""")
Overwrite it?(y/n)"""
)
if not input().startswith("y"): if not input().startswith("y"):
print("Unable to read config, and not allowed to overwrite it. Giving up.") print("Unable to read config, and not allowed to overwrite it. Giving up.")
return False return False
@ -135,10 +133,8 @@ Overwrite it?(y/n)"""
) )
return False return False
except FileNotFoundError: except FileNotFoundError:
console.print( console.print(f"""[blue]Couldn't find {config_file}
f"""[blue]Couldn't find {config_file} Creating it now.""")
Creating it now."""
)
try: try:
with open(config_file, "x") as f: with open(config_file, "x") as f:
f.write("") f.write("")
@ -149,16 +145,14 @@ Creating it now."""
) )
return False return False
console.print( console.print("""\
"""\
[blue bold]############################### [blue bold]###############################
# # # #
# Checking TOML configuration # # Checking TOML configuration #
# # # #
############################### ###############################
If you see any prompts, that means that you have unset/incorrectly set variables, please input the correct values.\ If you see any prompts, that means that you have unset/incorrectly set variables, please input the correct values.\
""" """)
)
crawl(template, check_vars) crawl(template, check_vars)
with open(config_file, "w") as f: with open(config_file, "w") as f:
toml.dump(config, f) toml.dump(config, f)

Loading…
Cancel
Save