def __init__(self, completekey="tab", stdin=None, stdout=None): super(Command, self).__init__(completekey, stdin, stdout) self.prompt = "(Command) " self.intro = "Bulk File Manipulation Utility" # Create a directory to store data files. self.data_directory_path = "data" make_directories(self.data_directory_path) # Create a directory to store output files. self.output_directory_path = "output" make_directories(self.output_directory_path) self.merged_hashes_output_file_path = join(self.output_directory_path, "merged_hashes.yaml") self.duplicate_hashes_output_file_path = join(self.output_directory_path, "duplicate_hashes.yaml") self.file_path_list_output_file_path = join(self.output_directory_path, "file_path_list.yaml") # Holds all the ArgumentParsers previously used during this session. self.parsers = DefaultDict(self.__create_parser)
def __init__(self, directory_path): self.directory_path = directory_path self.file_ext = ".yaml" self.data = {} make_directories(directory_path) self.__initialized = True