def parse_and_print(path=".", style_name="org", include=[], exclude=[], include_backup_files=False, include_hidden_files=False): """Parses what is at path (it can be a file or a directory) and outputs the items found using the format given, sorting them by name. """ if (os.path.isdir(path)): itemUtils.parse_directory(include=include, exclude=exclude, include_backup_files=include_backup_files, include_hidden_files=include_hidden_files, path=path) else: itemUtils.parse_file(path) db = itemDb.MeuporgItemDB(itemUtils.MeuporgItem.__item_list__) print(fileFormat.output(db.select_and_sort_by_name(), 2, style_name))