Arlegui 440 (Galería Arcadia 2do. piso)
Local 209 – Viña del Mar
(56) 32 268 5804
(56) 32 297 3274
(56) 32 288 2963

MILES DE PRODUCTOS EXCLUSIVOS

GRAN VARIEDAD DE PELICULAS Y

MÚSICA

Romlister ~repack~ May 2026

def export_csv(self, filepath, clean_names=False): with open(filepath, 'w', newline='', encoding='utf-8') as f: writer = csv.writer(f) writer.writerow(['filename' if not clean_names else 'clean_name']) for item in self.get_list(clean_names): writer.writerow([item])

def export_json(self, filepath, clean_names=False): with open(filepath, 'w', encoding='utf-8') as f: json.dump(self.get_list(clean_names), f, indent=2) CLI Interface ------------------------------ def main(): parser = argparse.ArgumentParser(description="RomLister - Scan and filter ROM collections") parser.add_argument("directory", help="Root directory to scan for ROMs") parser.add_argument("-r", "--recursive", action="store_true", help="Scan subfolders recursively") parser.add_argument("-e", "--extensions", nargs="+", help="File extensions to include (e.g., nes sfc iso)") parser.add_argument("--min-size", type=int, help="Minimum file size in bytes") parser.add_argument("--max-size", type=int, help="Maximum file size in bytes") parser.add_argument("-p", "--pattern", help="Regex pattern to filter by filename") parser.add_argument("-c", "--clean-names", action="store_true", help="Remove region/version tags") parser.add_argument("-o", "--output", help="Output file path") parser.add_argument("-f", "--format", choices=["txt", "csv", "json"], default="txt", help="Output format") parser.add_argument("--list-only", action="store_true", help="Print list to console") romlister

if args.list_only or not args.output: for rom in lister.get_list(clean_names=args.clean_names): print(rom) else: if args.format == "txt": lister.export_txt(args.output, clean_names=args.clean_names) elif args.format == "csv": lister.export_csv(args.output, clean_names=args.clean_names) elif args.format == "json": lister.export_json(args.output, clean_names=args.clean_names) print(f"Exported to args.output") if == " main ": main() 🧪 Usage Examples # List all NES ROMs in folder python romlister.py ~/roms/nes -e nes -r List SNES ROMs larger than 1 MB, output as JSON python romlister.py ~/roms/snes -e sfc -r --min-size 1048576 -f json -o snes_large.json Find ROMs with "Mario" in name, clean tags, print to console python romlister.py ~/roms -r -p "Mario" --clean-names --list-only Export all .iso/.bin files recursively to CSV python romlister.py ~/roms/psx -e iso bin -r -f csv -o psx_roms.csv 🔧 Possible Extensions (if you want to expand) | Feature | Description | |--------|-------------| | ROM metadata | Read headers (e.g., iNES for NES) to show game title, mapper, etc. | | CRC/SHA verification | Compare against No-Intro/Redump DAT files | | Duplicate finder | Group by size/hash to find duplicates | | Web UI | Expose as a Flask app with live filtering | | Launch integration | Launch selected ROM with emulator | ✅ Sample Output Super Mario Bros Legend of Zelda Metroid Contra or as JSON: clean_names=False): with open(filepath

def filter_by_name_pattern(self, pattern, case_sensitive=False): """Keep ROMs whose name matches regex pattern.""" flags = 0 if case_sensitive else re.IGNORECASE regex = re.compile(pattern, flags) self.roms = [r for r in self.roms if regex.search(r.name)] return self encoding='utf-8') as f: json.dump(self.get_list(clean_names)

def scan(self): """Scan directory and collect ROM files.""" if self.recursive: iterator = self.root_path.rglob("*") else: iterator = self.root_path.glob("*")

def filter_by_size(self, min_bytes=None, max_bytes=None): """Filter by file size in bytes.""" if min_bytes is not None: self.roms = [r for r in self.roms if r.stat().st_size >= min_bytes] if max_bytes is not None: self.roms = [r for r in self.roms if r.stat().st_size <= max_bytes] return self

self.roms = [p for p in iterator if p.is_file()] return self