Skip to content

Commit ce12ae3

Browse files
committed
Extract studySpaceList.dart and update image generation script
1 parent 9e2a32c commit ce12ae3

21 files changed

+169
-117
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
Find study spaces at the University of Michigan, Ann Arbor
44

5-
## Generate Study Space Thumbnails
5+
## Generate Image Assets
66

7-
Run the `generate_thumbnails.sh` to convert jpeg images in `images/` folder to webp images. The script
8-
then outputs the webp images to `thumbnails/`
7+
Run the `generate_images.sh` to convert jpeg images in `images/` folder to webp images.
8+
The script then outputs the webp images to `assets/`
99

1010
## Generate Selected Material Icons
1111

assets/east_quad.webp

7.44 KB
Loading

assets/east_quad_blue_cafe.webp

11.8 KB
Loading

assets/east_quad_open_space.webp

14.2 KB
Loading

assets/hatcher_asia.webp

17.3 KB
Loading

assets/image_coming_soon.webp

928 Bytes
Loading

generate_images.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
for input_file in images/buildings/*
4+
do
5+
# Remove the "images/buildings/" dir prefix
6+
# Now left with for example "hatcher.jpeg"
7+
input_file_without_dir="${input_file:17}"
8+
# Convert original images like "hatcher.jpeg" to thumbnails named "hatcher.webp"
9+
# Aimed at saving storage space
10+
cwebp "$input_file" -o "assets/${input_file_without_dir%.*}.webp" -resize 200 0
11+
done
12+
13+
for input_file in images/areas/*
14+
do
15+
# Remove the "images/areas/" dir prefix
16+
# Now left with for example "hatcher_asia.jpeg"
17+
input_file_without_dir="${input_file:13}"
18+
# Convert original images like "hatcher_asia.jpeg" to "hatcher_asia.webp"
19+
# Aimed at saving storage space
20+
cwebp "$input_file" -o "assets/${input_file_without_dir%.*}.webp" -resize 400 0
21+
done
22+
23+
cwebp "images/image_coming_soon.jpeg" -o "assets/image_coming_soon.webp" -resize 400 0

generate_thumbnails.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.
138 KB
Loading
70.4 KB
Loading

0 commit comments

Comments
 (0)