A powerful metadata scraper for Batocera OS ROM collections. Automatically fetch and organize game metadata, cover art, screenshots, and videos from online databases.
- Automatic Metadata Scraping: Fetch game information from ScreenScraper.fr (with support for TheGamesDB and IGDB)
- Media Downloads: Download box art, screenshots, marquees, and video previews
- Intelligent Matching: Hash-based and name-based game matching with fuzzy matching
- Duplicate Detection: Find and resolve duplicate ROMs interactively with optional file deletion
- DOS ROM Converter: Convert DOS games to Batocera format (.pc folders with dosbox.bat)
- Resume Capability: Checkpoint system allows resuming after interruptions
- Batocera Integration: Native support for Batocera's gamelist.xml format
- Rich CLI: Beautiful command-line interface with progress tracking
- Python 3.8+
- Batocera OS (or compatible RetroPie/EmulationStation setup)
- ScreenScraper.fr account (free)
- Clone the repository:
cd /userdata
git clone https://github.com/yourusername/retroMaid.git
cd retroMaid- Install dependencies:
python -m pip install -r requirements.txt- Configure credentials:
cp .env.example .env
nano .env # Add your ScreenScraper credentials- Update configuration:
nano config.yaml # Set your ROMs path and preferencespython retromaid.py list-systemspython retromaid.py list-systems --system psx# Basic scraping (images only)
python retromaid.py scrape psx
# Include videos
python retromaid.py scrape psx --videos
# Reprocess all games (ignore checkpoint)
python retromaid.py scrape psx --force# List duplicates
python retromaid.py duplicates psx
# Interactively resolve duplicates (remove from gamelist only)
python retromaid.py duplicates psx --resolve
# Resolve and DELETE files from disk
python retromaid.py duplicates psx --resolve --delete# Convert DOS games to Batocera format (interactive)
python retromaid.py convert-dos
# Automatic conversion
python retromaid.py convert-dos --no-interactive
# Extract ZIPs and delete originals
python retromaid.py convert-dos --delete-zipspython retromaid.py status --system psxpython retromaid.py clear --system psxEdit config.yaml to customize:
- ROMs Path: Path to your ROMs directory (SMB mount or local)
- Scraper Settings: Primary scraper, API credentials, rate limits
- Media Preferences: Which media types to download
- Matching Settings: Region preferences, fuzzy matching threshold
- Duplicate Handling: Resolution strategy (ask, keep_first, keep_most_complete)
- Backup: Automatic backup of gamelist.xml
Create a .env file for sensitive credentials:
SCREENSCRAPER_USERNAME=your_username
SCREENSCRAPER_PASSWORD=your_password-
Initial Scan: Run a scan to see what's missing
python retromaid.py list-systems --system psx
-
Scrape Metadata: Start scraping for a system
python retromaid.py scrape psx
-
Handle Interruptions: If interrupted, simply run the same command again. retroMaid will resume from where it left off.
-
Find Duplicates: Clean up duplicate ROMs
python retromaid.py duplicates psx --resolve
-
Verify: Check the processing status
python retromaid.py status --system psx
If accessing Batocera over network share:
-
Mount the share:
# SMB mount open smb://BATOCERA/share -
Update
config.yaml:roms_path: "/Volumes/share/roms"
-
Run retroMaid from your Mac
To run directly on the Pi:
-
SSH into Batocera:
ssh root@batocera
-
Install Python dependencies (if not already installed)
-
Run retroMaid directly on the Pi
Edit core/scanner.py to add support for additional systems or ROM formats.
Configure fallback scrapers in config.yaml:
scrapers:
primary: "screenscraper"
# Add IGDB or TheGamesDB as fallbacksAdjust request rates to avoid hitting API limits:
scrapers:
screenscraper:
rate_limit: 20 # requests per minute- Lower the
rate_limitin config.yaml - Wait a few minutes before retrying
- Consider upgrading your ScreenScraper account
- Check ROM filename format
- Try renaming to standard format: "Game Name (Region).ext"
- Use
--forceto retry with updated names
- Check that
scrapers.screenscraper.media.download_imagesistrue - Ensure the images directory exists
- Check network connectivity
- Clear checkpoint:
python retromaid.py clear --system psx - Delete
.retromaid_checkpoint.jsonmanually if needed
- Free accounts: ~20 requests/minute, 50,000/day
- Contributor accounts: Higher limits
- Developer accounts: Special registration required
Rate limiting is built into retroMaid to stay within limits.
retroMaid/
├── config.yaml # Main configuration
├── .env # Credentials (not in git)
├── retromaid.py # CLI entry point
├── core/
│ ├── scanner.py # ROM scanning
│ ├── xml_manager.py # gamelist.xml handling
│ ├── hasher.py # ROM hashing
│ ├── duplicate_detector.py
│ └── state_manager.py # Checkpoint system
├── scrapers/
│ ├── base.py # Base scraper interface
│ ├── screenscraper.py # ScreenScraper client
│ └── ... # Additional scrapers
├── media/
│ └── downloader.py # Media downloads
└── utils/
├── config.py # Config management
├── logger.py # Logging
└── filename.py # Name sanitization
Contributions welcome! Areas for improvement:
- Additional scraper implementations (TheGamesDB, IGDB, MobyGames)
- Web-based UI
- Batocera script integration
- Docker container
- Automated testing
If retroMaid has helped organize your ROM collection, consider supporting development:
Your support helps keep the project maintained and improved!
MIT License - see LICENSE file
- Batocera.linux - Amazing retro gaming OS
- ScreenScraper.fr - Comprehensive game database
- Built with love for the retro gaming community 🕹️
