Skip to content

Commit

Permalink
Added non_interactive mode for finalise
Browse files Browse the repository at this point in the history
  • Loading branch information
beveradb committed Jul 14, 2024
1 parent aaf1480 commit 87abc47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions karaoke_prep/karaoke_finalise/karaoke_finalise.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def __init__(
youtube_description_file=None,
rclone_destination=None,
discord_webhook_url=None,
non_interactive=False,
):
self.logger = logging.getLogger(__name__)
self.logger.setLevel(log_level)
Expand Down Expand Up @@ -82,6 +83,7 @@ def __init__(
self.public_share_rclone_enabled = False

self.skip_notifications = False
self

self.suffixes = {
"title_mov": " (Title).mov",
Expand Down Expand Up @@ -166,6 +168,10 @@ def prompt_user_confirmation_or_raise_exception(self, prompt_message, exit_messa
raise Exception(exit_message)

def prompt_user_bool(self, prompt_message, allow_empty=False):
if self.non_interactive:
self.logger.warning(f"Non-interactive mode, responding True for prompt: {prompt_message}")
return True

options_string = "[y]/n" if allow_empty else "y/[n]"
accept_responses = ["y", "yes"]
if allow_empty:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "karaoke-prep"
version = "0.22.2"
version = "0.22.3"
description = "Prepare for karaoke video creation, by downloading audio and lyrics for a specified song or playlist from youtube and separating audio stems. After syncing, finalise the video with a title screen!"
authors = ["Andrew Beveridge <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 87abc47

Please sign in to comment.