diff --git a/missing_fonts_cleaner.py b/missing_fonts_cleaner.py new file mode 100644 index 0000000..a6bd66a --- /dev/null +++ b/missing_fonts_cleaner.py @@ -0,0 +1,35 @@ +import os +import sys + +def extract_seasons(file_path): + seasons = set() + + with open(file_path, 'r', encoding='utf-8') as file: + for line in file: + line = line.strip() + if not line: + continue + parts = line.split(os.sep) # Split by OS-specific path separator + if len(parts) >= 3: # Expecting at least "./Show/Season XX/Episode.mkv" + show = parts[1] # Extract show name + season = parts[2] # Extract season directory + seasons.add((show, season)) + + # Sort seasons by show and season + sorted_seasons = sorted(seasons, key=lambda x: (x[0], x[1])) + + return sorted_seasons + +def main(): + if len(sys.argv) != 2: + print("Usage: python script.py ") + sys.exit(1) + + file_path = sys.argv[1] + seasons = extract_seasons(file_path) + + for show, season in seasons: + print(f"{show}: {season}") + +if __name__ == "__main__": + main()