Skip to content

Commit

Permalink
画像リサイズ時に引数で日にちを指定できるように変更
Browse files Browse the repository at this point in the history
  • Loading branch information
YusukeKato committed Aug 4, 2024
1 parent 2287988 commit 9aa5a82
Showing 39 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -16,6 +16,9 @@ Automatically deployed with GitHub Actions.
Execute the following command:
```sh
cd scripts
# ex: 2024/08/04
bash resize_images.bash 20240804
# ex: ALL
bash resize_images.bash
```

Binary file modified images/2023/cat_rotation.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240630_remon_1.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240630_remon_2.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240630_remon_3.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240707_remon_1.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240707_remon_2.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240707_remon_3.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240707_remon_4.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240707_remon_5.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240707_remon_6.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240707_remon_7.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240713_remon_10.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240713_remon_4.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240713_remon_5.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240713_remon_6.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240713_remon_7.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240713_remon_8.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240713_remon_9.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240716_remon_13.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240716_remon_14.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240716_remon_15.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240716_remon_16.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240716_remon_17.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240716_remon_18.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240716_remon_19.gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/2024/20240721_remon_18.gif.gif
Binary file modified images/2024/20240721_remon_19.gif.gif
Binary file modified images/2024/20240721_remon_20.gif.gif
Binary file modified images/2024/20240721_remon_21.gif.gif
Binary file modified images/2024/20240721_remon_22.gif.gif
Binary file modified images/2024/20240721_remon_23.gif.gif
Binary file modified images/2024/20240801_remon_10.gif.gif
Binary file modified images/2024/20240801_remon_11.gif.gif
Binary file modified images/2024/20240801_remon_16.gif.gif
Binary file modified images/2024/20240801_remon_3.gif.gif
Binary file modified images/2024/20240804_remon_13.gif.gif
Binary file modified images/2024/20240804_remon_14.gif.gif
14 changes: 7 additions & 7 deletions scripts/resize_images.bash
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
echo "start: resize images"

# delete
find ../images | grep "^../images/20.*/" | grep -e ".png.png$" -e ".jpg.png$" -e ".jpg.jpg$" -e ".png.jpg$" -e ".gif.gif$" | xargs -I@ rm @
find ../images | grep "^../images/20.*/" | grep -e "Zone.Identifier$" | xargs -I@ rm @
find ../images | grep "^../images/20.*/"$1 | grep -e ".png.png$" -e ".jpg.png$" -e ".jpg.jpg$" -e ".png.jpg$" -e ".gif.gif$" | xargs -I@ rm @
find ../images | grep "^../images/20.*/"$1 | grep -e "Zone.Identifier$" | xargs -I@ rm @

# rename
find ../images | grep "^../images/20.*/" | grep -e ".jpeg$" | sed 's/.jpeg//g' | xargs -I@ mv @".jpeg" @".jpg"
find ../images | grep "^../images/20.*/" | grep -e ".JPEG$" | sed 's/.JPEG//g' | xargs -I@ mv @".JPEG" @".jpg"
find ../images | grep "^../images/20.*/"$1 | grep -e ".jpeg$" | sed 's/.jpeg//g' | xargs -I@ mv @".jpeg" @".jpg"
find ../images | grep "^../images/20.*/"$1 | grep -e ".JPEG$" | sed 's/.JPEG//g' | xargs -I@ mv @".JPEG" @".jpg"

# resize
find ../images | grep "^../images/20.*/" | grep -e ".png$" -e ".jpg$" | xargs -I@ ffmpeg -y -i @ -vf scale=600:-1 @".jpg"
find ../images | grep "^../images/20.*/" | grep -e ".gif$" | xargs -I@ ffmpeg -y -i @ -r 10 -vf scale=400:-1 @".gif"
find ../images | grep "^../images/20.*/"$1 | grep -e ".png$" -e ".jpg$" | xargs -I@ ffmpeg -y -i @ -vf scale=600:-1 @".jpg"
find ../images | grep "^../images/20.*/"$1 | grep -e ".gif$" | xargs -I@ ffmpeg -y -i @ -r 10 -vf scale=400:-1 @".gif"

# Optimize
# find ../images | grep "^../images/20.*/" | grep -e ".gif.gif$" | xargs -I@ convert @ -layers Optimize @
find ../images | grep "^../images/20.*/"$1 | grep -e ".gif.gif$" | xargs -I@ convert @ -layers Optimize @

echo "finish: resize images"

0 comments on commit 9aa5a82

Please sign in to comment.