update and make test for transcribe and chat_vod and shorts
This commit is contained in:
+4
-26
@@ -123,30 +123,8 @@ def fit_to_9_16_letterbox(input_path: str, top_text: str = "TOP TEXT", bottom_te
|
||||
|
||||
print(f"🎉 Text overlay video saved to: {output_path}")
|
||||
|
||||
def main():
|
||||
# Set up the command-line argument parser
|
||||
parser = argparse.ArgumentParser(description="TeamPGP Clip Processing and Upload Pipeline")
|
||||
|
||||
# Add optional arguments
|
||||
parser.add_argument('--convert', type=str, metavar='CLIP_PATH', help='Path to a video file to convert to a 9:16 Short')
|
||||
parser.add_argument('--upload', action='store_true', help='Process and upload pending Shorts in the database to YouTube')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# If no flags are provided, show help text and exit
|
||||
if not args.convert and not args.upload:
|
||||
parser.print_help()
|
||||
sys.exit("\n❌ Error: You must provide at least one action flag (--convert or --upload).")
|
||||
|
||||
# Execute conversion step if path is provided
|
||||
if args.convert:
|
||||
clip_by = "joelmckinney"
|
||||
#convert_to_short(args.convert)
|
||||
fit_to_9_16_letterbox(args.convert, "TeamPGP Live on Twitch...\n Every Friday and Sunday @7:30 ET.\n twitch.tv/teampgp", f"Clipped By: {clip_by}.", True)
|
||||
|
||||
# Execute database upload step if flag is provided
|
||||
if args.upload:
|
||||
upload_shorts()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
creator_name = "greenskiesbluegrass"
|
||||
top_txt = "TeamPGP Live on Twitch...\n Every Friday and Sunday @7:30 ET.\n twitch.tv/teampgp"
|
||||
bottom_txt = f"Clipped By: {creator_name}."
|
||||
fit_to_9_16_letterbox("download/clips/AbnegateAgitatedGrassPJSalt/AbnegateAgitatedGrassPJSalt.mp4", top_txt, bottom_txt)
|
||||
Reference in New Issue
Block a user