def unfollow(self): email = get_user_input("Insert User Email") if email in self.following: del self.following[email] print_info("Success: Unfollowed " + email) else: print_info("Failure: Not following " + email)
def follow(self): email = get_user_input("Insert User Email") if email in self.following: print_info("Failures: Already following " + email) else: self.following[email] = 0 print_info("Success: Now following " + email)
def convert_files(video_list): for input_file in video_list: ui.print_info("Getting info for file: {}".format(input_file)) width, frames = get_video_data(input_file) if type(width) == str or type(frames) == str: ui.print_error_message( "ERROR: Could not get data from video file. Skipping file. Width: {} frames: {}" .format(width, frames))
def get_video_files(path): video_list = [] ui.print_info("Getting files list") for root, dirs, files in os.walk(path, topdown=False): for name in files: file = os.path.join(root, name) if decide_if_file_is_video(file): video_list.append(file) ui.print_info("Found {} video files".format(len(video_list))) return video_list
def __init__(self): self.login_flag, self.db = first_login() #self.login_flag = True print_info("1st login: " + str(self.login_flag)) if self.login_flag: self.id = 1 self.following = {} self.my_posts = [] self.others_posts = [] else: self.email, self.id, self.following, \ self.my_posts, self.others_posts = fetch_data(self.db)
import logging, time import ui import converting from file_manager import * if __name__ == "__main__": ui.print_info('Mass converter started') path = "e:/PycharmProjects/VIDEOS/" converting.convert_files(get_video_files(path))