mirror of
https://github.com/a2-4am/4sports.git
synced 2025-01-17 15:30:36 +00:00
update box art
This commit is contained in:
parent
7c0d7540f8
commit
fbc3b930e7
35
bin/forevershr.sh
Executable file
35
bin/forevershr.sh
Executable file
@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
# directory of PNG files (assume they are properly sized and named)
|
||||
PNGS="$HOME/Dropbox/a2/4cade/artwork/cropped-and-named-320x200/_4sports"
|
||||
|
||||
# Python 3
|
||||
export PYTHON="python"
|
||||
|
||||
# https://github.com/KrisKennaway/ii-pix/
|
||||
export CONVERT_PY="$HOME/Documents/a2/ii-pix/convert.py"
|
||||
|
||||
# directories within Total Replay repository
|
||||
export SHR_SCORES="./res/ARTWORK.SHR.SCORES"
|
||||
export SHR_UNCOMPRESSED="./res/ARTWORK.SHR.UNCOMPRESSED"
|
||||
|
||||
# convert.py flags:
|
||||
# --no-show-output to suppress focus-stealing popup window during conversion
|
||||
# --no-save-preview to suppress saving -preview.png file
|
||||
# --fixed-colours=1 to prevent visual glitches during transition from black
|
||||
# --show-final-score to get score so the score matching can work
|
||||
|
||||
while true; do
|
||||
parallel '
|
||||
tmp=$(mktemp)
|
||||
newscore=$("$PYTHON" "$CONVERT_PY" shr --no-show-output --no-save-preview --fixed-colours=1 --show-final-score {} "$tmp" | grep FINAL_SCORE | cut -d":" -f2)
|
||||
oldscore=$(<"$SHR_SCORES"/{/.})
|
||||
if [ -z "$oldscore" ]; then
|
||||
oldscore=10000
|
||||
fi
|
||||
if (( $(echo "$newscore < $oldscore" | bc) )); then
|
||||
cp "$tmp" "$SHR_UNCOMPRESSED/"{/.}
|
||||
echo "$newscore" > "$SHR_SCORES/"{/.}
|
||||
fi
|
||||
rm "$tmp"' ::: "$PNGS"/*.png
|
||||
done
|
@ -1 +1 @@
|
||||
118.4183059321748
|
||||
118.31095755470594
|
||||
|
@ -1 +1 @@
|
||||
442.4742780524651
|
||||
433.3690735982368
|
||||
|
1
res/ARTWORK.SHR.SCORES/BOP.N.WRESTLE
Normal file
1
res/ARTWORK.SHR.SCORES/BOP.N.WRESTLE
Normal file
@ -0,0 +1 @@
|
||||
378.0825620390625
|
@ -1 +1 @@
|
||||
640.4267337791725
|
||||
639.7921859387318
|
||||
|
1
res/ARTWORK.SHR.SCORES/FIGHT.NIGHT
Normal file
1
res/ARTWORK.SHR.SCORES/FIGHT.NIGHT
Normal file
@ -0,0 +1 @@
|
||||
60.703603292915716
|
1
res/ARTWORK.SHR.SCORES/HARDBALL
Normal file
1
res/ARTWORK.SHR.SCORES/HARDBALL
Normal file
@ -0,0 +1 @@
|
||||
311.9758267169848
|
1
res/ARTWORK.SHR.SCORES/KARATE.CHAMP
Normal file
1
res/ARTWORK.SHR.SCORES/KARATE.CHAMP
Normal file
@ -0,0 +1 @@
|
||||
278.4427650714732
|
@ -1 +1 @@
|
||||
424.81889155735087
|
||||
419.9990476697459
|
||||
|
1
res/ARTWORK.SHR.SCORES/SS.BASEBALL
Normal file
1
res/ARTWORK.SHR.SCORES/SS.BASEBALL
Normal file
@ -0,0 +1 @@
|
||||
265.9379601737052
|
1
res/ARTWORK.SHR.SCORES/SS.BASKETBALL
Normal file
1
res/ARTWORK.SHR.SCORES/SS.BASKETBALL
Normal file
@ -0,0 +1 @@
|
||||
382.78291085848053
|
1
res/ARTWORK.SHR.SCORES/SS.SOCCER
Normal file
1
res/ARTWORK.SHR.SCORES/SS.SOCCER
Normal file
@ -0,0 +1 @@
|
||||
298.6764002812424
|
1
res/ARTWORK.SHR.SCORES/SUMMER.EDITION
Normal file
1
res/ARTWORK.SHR.SCORES/SUMMER.EDITION
Normal file
@ -0,0 +1 @@
|
||||
291.0425311807241
|
1
res/ARTWORK.SHR.SCORES/SUMMER.GAMES
Normal file
1
res/ARTWORK.SHR.SCORES/SUMMER.GAMES
Normal file
@ -0,0 +1 @@
|
||||
203.36070788075392
|
1
res/ARTWORK.SHR.SCORES/SUMMER.GAMES.II
Normal file
1
res/ARTWORK.SHR.SCORES/SUMMER.GAMES.II
Normal file
@ -0,0 +1 @@
|
||||
234.9604972580183
|
1
res/ARTWORK.SHR.SCORES/TEST.DRIVE
Normal file
1
res/ARTWORK.SHR.SCORES/TEST.DRIVE
Normal file
@ -0,0 +1 @@
|
||||
99.74319798241757
|
1
res/ARTWORK.SHR.SCORES/WINTER.EDITION
Normal file
1
res/ARTWORK.SHR.SCORES/WINTER.EDITION
Normal file
@ -0,0 +1 @@
|
||||
317.67105799746304
|
1
res/ARTWORK.SHR.SCORES/WINTER.GAMES
Normal file
1
res/ARTWORK.SHR.SCORES/WINTER.GAMES
Normal file
@ -0,0 +1 @@
|
||||
399.6469728119406
|
1
res/ARTWORK.SHR.SCORES/WORLD.GAMES
Normal file
1
res/ARTWORK.SHR.SCORES/WORLD.GAMES
Normal file
@ -0,0 +1 @@
|
||||
370.46139791376936
|
1
res/ARTWORK.SHR.SCORES/WORLD.KARATE
Normal file
1
res/ARTWORK.SHR.SCORES/WORLD.KARATE
Normal file
@ -0,0 +1 @@
|
||||
302.09757325846147
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user