mirror of
https://github.com/Paillat-dev/FABLE.git
synced 2026-01-02 01:06:20 +00:00
refactor(main.py): extract music credits to a variable and add it to the video description
feat(main.py): add translated title and description to meta_FR.txt file feat(main.py): use the new video description variable when uploading the video
This commit is contained in:
8
main.py
8
main.py
@@ -48,16 +48,18 @@ async def main():
|
||||
f.close()
|
||||
script = prepare(path)
|
||||
credits = mount(path, script)
|
||||
description = f"{idea['description']}\n\nMusic credits: {credits}"
|
||||
with open(path + "/meta.txt", 'w', encoding='utf-8') as f:
|
||||
f.write(f"Title: {idea['title']}\nDescription: {idea['description']}\nMusic credits: {credits}")
|
||||
f.write(description)
|
||||
f.close()
|
||||
with open(path + "/meta_FR.txt", 'w', encoding='utf-8') as f:
|
||||
transtitle = translate('FR', idea['title']) #use the non formatted title
|
||||
transdesc = translate('FR', idea['description'])
|
||||
f.write(f"Titre: {transtitle}\nDescription: {transdesc}\nCrédits musicaux: {credits}")
|
||||
final = f"Titre: {transtitle}\nDescription: {transdesc}\nCrédits musicaux: {credits}"
|
||||
f.write(final)
|
||||
f.close()
|
||||
generate_miniature(path, title=idea['title'], description=idea['description'])
|
||||
upload_video(path, idea['title'], idea['description'], 28, "", "private", subjectdirpath)
|
||||
upload_video(path, idea['title'], description, 28, "", "private", subjectdirpath)
|
||||
print(f"Your video is ready! You can find it in {path}.")
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user