Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zackees committed May 10, 2023
1 parent 35058e4 commit aa8832d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/video_subtitles/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,11 @@ def callback(

# Open folder in the OS
def _generate_subtitles(
videofile: str, deeply_api_key: str | None, languages: list[str], model: str,
convert_to_webvtt: bool
videofile: str,
deeply_api_key: str | None,
languages: list[str],
model: str,
convert_to_webvtt: bool,
):
# perform the actual work here
os.chdir(os.path.dirname(videofile))
Expand All @@ -203,8 +206,10 @@ def _generate_subtitles(
open_folder(out)
print("Generating subtitles for", videofile)
voicename = os.path.basename(videofile).split(".")[0].replace("_", " ")
format = "WEBVTT" if convert_to_webvtt else "SRT"
say(f"Attention: {voicename} has completed subtitle generation in {format} format")
fmt = "WEBVTT" if convert_to_webvtt else "SRT"
say(
f"Attention: {voicename} has completed subtitle generation in {fmt} format"
)

thread = Thread(
target=_generate_subtitles,
Expand Down

0 comments on commit aa8832d

Please sign in to comment.