This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Duplicate Game Cleaner for GameList XML files | |
| This script identifies and removes duplicate games based on: | |
| 1. If different languages: Keep French (fr) game | |
| 2. If same language but different formats: Keep zip file | |
| Duplicates are identified by the same game ID in the XML file. | |
| By default, files are moved to a .trash folder in the same directory. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function wslhosts() { | |
| vm_name="${1:-wsl}" | |
| file_hosts="${2:-/mnt/c/Windows/System32/drivers/etc/hosts}" | |
| wsl_ip=$(ip addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}') | |
| mkdir -p "$(dirname "${file_hosts}")" && touch "${file_hosts}" | |
| grep -q " ${vm_name}" "${file_hosts}" | |
| if [ $? -eq 1 ]; then |