added some color
This commit is contained in:
+3
-3
@@ -177,9 +177,9 @@ esac
|
|||||||
wget "$URL" -O "$SYSTEM_HTML"
|
wget "$URL" -O "$SYSTEM_HTML"
|
||||||
|
|
||||||
# process system html to get game url list
|
# process system html to get game url list
|
||||||
printf "%s\r" "${BLUE_COLOR}Processing $SYSTEM_NAME. ${RESET_COLOR}"
|
printf "%s\n" "${BLUE_COLOR}Processing $SYSTEM_NAME. ${RESET_COLOR}"
|
||||||
grep -E "Game/[0-9]+" -Eo "$SYSTEM_HTML" | sort -u | sed 's,Game/,https://retroachievements.org/linkedhashes.php?g=,' > "$URL_LIST"
|
grep -E "Game/[0-9]+" -Eo "$SYSTEM_HTML" | sort -u | sed 's,Game/,https://retroachievements.org/linkedhashes.php?g=,' > "$URL_LIST"
|
||||||
echo "Found $(wc -l <"$URL_LIST") games."
|
printf "%s\n" "${BLUE_COLOR}Found $(wc -l <"$URL_LIST") games.${RESET_COLOR}"
|
||||||
|
|
||||||
# create system folder for webpages with hashes
|
# create system folder for webpages with hashes
|
||||||
if test -d "./${GAME_LIST_DIR}/$SYSTEM_NAME"; then
|
if test -d "./${GAME_LIST_DIR}/$SYSTEM_NAME"; then
|
||||||
@@ -240,5 +240,5 @@ perl -i -pe 's/(^\/.*?=)([0-9]+):([0-9A-Za-z]{32})/ "$3": $2,/' "${HASHLIBRAR
|
|||||||
echo " }" >> "${HASHLIBRARY_JSON}"
|
echo " }" >> "${HASHLIBRARY_JSON}"
|
||||||
echo "}" >> "${HASHLIBRARY_JSON}"
|
echo "}" >> "${HASHLIBRARY_JSON}"
|
||||||
perl -i -00pe 's/,(?!.*,)//s' "${HASHLIBRARY_JSON}"
|
perl -i -00pe 's/,(?!.*,)//s' "${HASHLIBRARY_JSON}"
|
||||||
printf "%s\n" "Parsed $(wc -l < "${HASHLIBRARY_JSON}") hashes from $(find "${GAME_LIST_DIR}"/"$1" -type f | wc -l) games. "
|
printf "%s\n" "${BLUE_COLOR}Parsed $(wc -l < "${HASHLIBRARY_JSON}") hashes from $(find "${GAME_LIST_DIR}"/"$1" -type f | wc -l) games. ${RESET_COLOR}"
|
||||||
echo "File: $HASHLIBRARY_JSON created."
|
echo "File: $HASHLIBRARY_JSON created."
|
||||||
|
|||||||
Reference in New Issue
Block a user