diff options
| author | Mitja Felicijan <m@mitjafelicijan.com> | 2023-07-16 22:46:06 +0200 |
|---|---|---|
| committer | Mitja Felicijan <m@mitjafelicijan.com> | 2023-07-16 22:46:11 +0200 |
| commit | 0cb6a5c81271a61e930505f3315b1d67bdf22724 (patch) | |
| tree | 27df39e2004dda656f5e8ae09e9d4e6395d4f903 /content/notes/2023-06-04-bulk-make-thumbnails.md | |
| parent | 89b2019bfa3bd8f1f0ceb7724c492fdf337dd519 (diff) | |
| download | mitjafelicijan.com-0cb6a5c81271a61e930505f3315b1d67bdf22724.tar.gz | |
Renamed all the notes files to include date
Diffstat (limited to 'content/notes/2023-06-04-bulk-make-thumbnails.md')
| -rw-r--r-- | content/notes/2023-06-04-bulk-make-thumbnails.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/content/notes/2023-06-04-bulk-make-thumbnails.md b/content/notes/2023-06-04-bulk-make-thumbnails.md new file mode 100644 index 0000000..4bab661 --- /dev/null +++ b/content/notes/2023-06-04-bulk-make-thumbnails.md | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | --- | ||
| 2 | title: "Bulk thumbnails" | ||
| 3 | url: bulk-make-thumbnails.html | ||
| 4 | date: 2023-06-04T20:46:56+02:00 | ||
| 5 | type: note | ||
| 6 | draft: false | ||
| 7 | tags: [bash] | ||
| 8 | --- | ||
| 9 | |||
| 10 | Make bulk thumbnails of JPGs with ImageMagick. | ||
| 11 | |||
| 12 | ```sh | ||
| 13 | #!/bin/bash | ||
| 14 | |||
| 15 | directory="./images/" | ||
| 16 | dimensions="360x360" | ||
| 17 | |||
| 18 | for file in "$directory"*.jpg; do | ||
| 19 | convert "$file" -resize $dimensions "$file" "${file%.*}-thumbnail.jpg" | ||
| 20 | done | ||
| 21 | ``` | ||
