From d98293667b3bea6b460bb3c1f959b80bc96e429a Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Tue, 10 Mar 2020 20:45:47 +0530 Subject: Added VHSStyler --- main.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index de93106..50a0d90 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,5 @@ -from VaporSong import VaporSong +from src.VaporSong import VaporSong +from src.VHSImage import generateVHSStyle import os import sys import youtube_dl @@ -18,20 +19,28 @@ text = 'This program takes YouTube URL or title of a song and converts it into v parser = argparse.ArgumentParser(description = text) parser.add_argument("-M", "--music", help="generate v a p o r w a v e music", action="store_true") +parser.add_argument("-P", "--picture", help="generate VHS Style image", action="store_true") parser.add_argument("-V", "--version", help="show program version", action="store_true") -parser.add_argument("-i", "--input", help="input url") +parser.add_argument("-i", "--input") + args = parser.parse_args() +music = False +picture = False + if args.version: print("vaporwave generator 旺育栄", version) exit if args.music: music = True +elif args.picture: + picture = True if args.input: query = args.input else: - query = input("Enter target song's name or YouTube URL: ") + parser.print_help() + exit MAX_DURATION = 600 # In-case the program finds a compilation youtube_urls = ('youtube.com', 'https://www.youtube.com/', 'http://www.youtube.com/', 'http://youtu.be/', 'https://youtu.be/', 'youtu.be') @@ -149,3 +158,6 @@ for s in sys.argv: if music: name, title = download_file(query) gen_vapor(name, title) +elif picture: + generateVHSStyle(query,"out.jpg") + \ No newline at end of file -- cgit v1.2.3