You are not logged in.

#1 2010-07-21 21:21:38

spookykid
Member
From: Portugal
Registered: 2006-07-23
Posts: 141

UPDATED - Wii Cover Downloader bash script

Hi all,
I've made my own Wii Cover Downloader script (It just downloads covers no disk image, but you can add that . You need WWT (yaourt wwt-svn) install it, you also need to edit the script and change these values to match your preferences (by default the script will look for 'EN' 'US' 'JA' 'FR' 'PT' 'EN' 'DE' covers and download them to from where you run the script into the "images" directory):

COVER_LANGUAGE=('EN' 'US' 'JA' 'FR' 'PT' 'EN' 'DE') --> Wich Languages you want to search for covers (searches and downloads by order)
BASE_DIRECTORY="./" --> the Base directory
NORMAL_COVER_DIRECTORY=$BASE_DIRECTORY"images/" --> based on the base directory change "images" to whatever you like
DISK_COVER_DIRECTORY=$NORMAL_COVER_DIRECTORY"disk/" --> based on the base directory change "disk" to whatever you like (it's not implemented)
COVER_KIND="cover3D" #cover; coverfull; coverfullHQ; disc; disccustom; cover3D --> what kind of cover you want.

That's it, then run the script from a terminal.

--->IMPORTANT: RUN THIS SCRIPT AT YOUR OWN RISK!!! I HOPE IT'S OF USE FOR SOMEONE!

NEW VERSION: Small enhancements, now it's nicer to the eyes, less verbose smile

THE SCRIPT:

#! /bin/bash
#
# Wii Cover Downloader bash script
# written by spookykid buyapentiumjerk@gmail.com
#

# Edit these values to match your preferences
# -------------------------------------------

COVER_LANGUAGE=('EN' 'US' 'JA' 'FR' 'PT' 'EN' 'DE')
BASE_DIRECTORY="./"
NORMAL_COVER_DIRECTORY=$BASE_DIRECTORY"images/"
DISK_COVER_DIRECTORY=$NORMAL_COVER_DIRECTORY"disk/"
COVER_KIND="cover3D" #cover; coverfull; coverfullHQ; disc; disccustom; cover3D

# DO NOT EDIT AFTER HERE
# ----------------------

VERSION="20100722"
WHITE='\E[1;29m'
DARK='\E[1;30m'
RED='\E[1;31m'
GREEN='\E[1;32m'
YELLOW='\E[1;33m'
BLUE='\E[1;34m'
MAGENTA='\E[1;35m'
CYAN='\E[1;36m'
NC='\e[0m'
GAME_LIST_FILE="GAME_LIST.TXT"
COUNTER_PROCESSED=0
COUNTER_DOWNLOADED_COVERS=0
COUNTER_NO_NEED_COVERS=0
ELEMENTS=${#COVER_LANGUAGE[@]}

echo
echo -e "${YELLOW}>>>${NC} ${WHITE}Wii Cover Downloader, version $VERSION${NC}"
echo -e "${DARK}    A simple cover donwloader for the webless Wii${NC}"
echo
echo -ne "   ${YELLOW}*${NC} Downloading titles database file... ${NC}"
if `wget -q -c -nd -P "$BASE_DIRECTORY" -O TITLES_DB.TXT http://wiitdb.com/titles.txt?LANG=EN`
then
    echo -e "${GREEN}DONE${NC}"
else
    echo -e "${RED}ERROR: Couldn't download titles database file${NC}"
    echo
    exit 0
fi
echo -ne "   ${YELLOW}*${NC} Creating titles list file... "
echo -ne ${RED}
if `wwt ID6 > $GAME_LIST_FILE`
then
    echo -e "${GREEN}DONE${NC}"
else
    echo
    exit 0
fi
echo -ne ${NC}
COUNTER_TOTAL_GAMES=`wc -l "$GAME_LIST_FILE" | awk '{print $1'}`
echo
echo -e "${BLUE}  /// [ INFORMATION ] ///${NC}"
echo
echo -e "  ${RED}Title(s) to process:${NC} $COUNTER_TOTAL_GAMES"
echo -ne "  ${RED}Language(s) order: ${NC}"
for ((z=0;z<$ELEMENTS;z++)); do
echo -ne "[`expr $z + 1`]-${COVER_LANGUAGE[z]} "
done
echo
echo
echo -e "${BLUE}  /// [ PROCESS OUTPUT ] ///${NC}"
echo
while read LINE; do
    COUNTER_PROCESSED=`expr $COUNTER_PROCESSED + 1`
    GAME_ID=$LINE
    echo -e "${YELLOW}  *${NC}${WHITE} PROCESSING ${NC}${CYAN}($COUNTER_PROCESSED out of $COUNTER_TOTAL_GAMES)${NC}${WHITE} - ID/NAME: ${NC}${BLUE}`cat TITLES_DB.TXT | grep $GAME_ID`${NC}"
    if [ -f $NORMAL_COVER_DIRECTORY$GAME_ID.png ]
    then
        echo -e "    ${MAGENTA}WARNING:${NC} Found a local cover file [ $GAME_ID.png ], skipping"
        COUNTER_NO_NEED_COVERS=`expr $COUNTER_NO_NEED_COVERS + 1`
    else
        echo -e "    ${YELLOW}WARNING:${NC} Local cover file not found, searching for online file"
        for ((i=0;i<$ELEMENTS;i++)); do
        if [ -f $NORMAL_COVER_DIRECTORY$GAME_ID.png ]
        then
            echo -ne
        else
            echo -ne "    ${YELLOW}>${NC} Searching language: ${WHITE}${COVER_LANGUAGE[i]}${NC}... "
            if `wget -q -c -nd -P "$NORMAL_COVER_DIRECTORY" http://wiitdb.com/wiitdb/artwork/$COVER_KIND/${COVER_LANGUAGE[i]}/$GAME_ID.png`
            then
                echo -e "${GREEN}Found${NC}"
                COUNTER_DOWNLOADED_COVERS=`expr $COUNTER_DOWNLOADED_COVERS + 1`
            else
                echo -e "${RED}Not found${NC}"
            fi
        fi
        done
    fi
    echo
    done < $GAME_LIST_FILE
echo -e "${BLUE}  /// [ POST PROCESSING ] ///${NC}"
echo
echo -ne "  ${YELLOW}*${NC} Removing files... "
if [ -f $GAME_LIST_FILE ]
then
    rm $GAME_LIST_FILE
fi
if [ -f TITLES_DB.TXT ]
then
    rm TITLES_DB.TXT
fi
echo -e "${GREEN}DONE${NC}"
echo
echo -e "${BLUE}  /// [ TOTALS ] ///${NC}"
echo
echo -e "  ${RED}Titles with covers:${NC} ${WHITE}`expr $COUNTER_NO_NEED_COVERS + $COUNTER_DOWNLOADED_COVERS`${NC}"
echo -e "  ${RED}Downloaded covers:${NC} ${WHITE}$COUNTER_DOWNLOADED_COVERS${NC}"
echo -e "  ${RED}Covers missing:${NC} ${WHITE}`expr $COUNTER_TOTAL_GAMES - $COUNTER_NO_NEED_COVERS - $COUNTER_DOWNLOADED_COVERS`${NC}"
echo

exit 0

Last edited by spookykid (2010-07-22 23:37:33)


There is no knowledge that is not power!

Offline

#2 2010-07-22 00:07:41

Arm-the-Homeless
Member
Registered: 2008-12-22
Posts: 273

Re: UPDATED - Wii Cover Downloader bash script

Since you need wwt, I guess that this is a tool for WBFS drives?

I use USB Loader GX and switched to FAT a while ago.

Offline

#3 2010-07-22 01:09:32

spookykid
Member
From: Portugal
Registered: 2006-07-23
Posts: 141

Re: UPDATED - Wii Cover Downloader bash script

Hi Arm-the-Homeless,
yes, it's a small script to get all your backup IDs from your WBFS partitions using wwt. The script then gets all covers from WiiTDB using wget. I run this script on my SD card, when run checks for covers available on your "images" directory, if they don't exist then gets them from the internet.  I know that USB Loader GX can download covers automatically but I don't have my Wii connected to the internet so I wrote this script to update my backups cover library.

PS - I use USB Loader GX also.


There is no knowledge that is not power!

Offline

#4 2010-07-22 14:55:42

Arm-the-Homeless
Member
Registered: 2008-12-22
Posts: 273

Re: UPDATED - Wii Cover Downloader bash script

Yeah, I don't have internet for my Wii either. hmm

If this could use FAT partitions (games are traditionally in /wbfs/{GAMEID}.wbfs), I'd use it. tongue

Offline

#5 2010-07-22 22:00:53

spookykid
Member
From: Portugal
Registered: 2006-07-23
Posts: 141

Re: UPDATED - Wii Cover Downloader bash script

Hi Arm-the-Homeless,

well if you can copy this script to your WBFS partition there shouldn't be any problem. Remember to adjust your USB Loader GX config to be able to find your cover directory. Try the script and let me know about it smile


There is no knowledge that is not power!

Offline

#6 2010-07-24 14:45:27

Arm-the-Homeless
Member
Registered: 2008-12-22
Posts: 273

Re: UPDATED - Wii Cover Downloader bash script

Well, I don't HAVE a wbfs partition. It can run games off of a FAT partition which was what I was saying.

Offline

#7 2010-07-24 20:50:15

spookykid
Member
From: Portugal
Registered: 2006-07-23
Posts: 141

Re: UPDATED - Wii Cover Downloader bash script

EDIT: Well I guess it will _NOT_ work, just found out recently you now can have Wii backups on NTFS partitions and this script expects you to have backups on WBFS partitions.

spook

Last edited by spookykid (2010-08-03 14:49:09)


There is no knowledge that is not power!

Offline

Board footer

Powered by FluxBB