-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript_short_writer.py
More file actions
20 lines (12 loc) · 1.09 KB
/
Copy pathscript_short_writer.py
File metadata and controls
20 lines (12 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from choose_title_type import choose_title_type
from generate_text_short import generate_text_short
from generate_title_gpt4o import generate_title_gpt4o
from youtube_to_mp3 import youtube_to_mp3
def script_short_writer():
textPrompt, backgroundMusic, backgroundMusicShort, images_directory, images_short_directory, generated_images_directory, videos_directory, thumbnail_directory, channel, voice, ythandle, deleted_path = choose_title_type()
youtubeUrl = input("\n\n\033[94mPaste your youtube url:\n\033[0mAnswer: ")
youtubeText, title = youtube_to_mp3(youtubeUrl)
title = generate_title_gpt4o(title)
text = generate_text_short(youtubeText)
title = str(title).replace('"', "").replace(":", "").replace(" ", "_").replace("'", "").replace("\n", "").replace('"', "").replace(".", "").replace("!", "").replace("!", "").replace("-", "").replace("?", "").lower()
return title, text, backgroundMusic, backgroundMusicShort, images_directory, images_short_directory, generated_images_directory, videos_directory, thumbnail_directory, channel, voice, ythandle, deleted_path