commit 5123e0c398665ce6d4051bbd07b04d367248b518
parent f54ffcad47990a6064b3a24a18e74a9ae9a9e5d1
Author: FIGBERT <figbert@figbert.com>
Date: Wed, 14 Apr 2021 14:50:54 -0700
Remove shell script from tofu.gmi
Diffstat:
1 file changed, 0 insertions(+), 51 deletions(-)
diff --git a/content/projects/tofu.gmi b/content/projects/tofu.gmi
@@ -16,57 +16,6 @@ Calle proposed we create a shell script to generate icons on-demand from a folde
Contributing to open source projects is incredibly fun. If you've got a free weekend, take some time to hack on your favorite codebase. Big thanks to Calle for creating such an awesome app – I look forward to collaborating more in the future.
-This was my first serious bash script, so I'm fairly proud:
-```bash
-#!/usr/bin/env bash
-set -euo pipefail
-
-get_name() {
- echo $1 | sed -E 's:.+/(.+)\.png:\1:'
-}
-
-write_json() {
- # JSON copied from Xcode output
- cat << EOF > "$2"
-{
- "images" : [
- {
- "idiom" : "universal",
- "filename" : "${1}.png",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "filename" : "${1}@2x.png",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "filename" : "${1}@3x.png",
- "scale" : "3x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
-EOF
-}
-
-cd "$(dirname "$0")"
-for file in ./IssuerIcons/*.png; do
- name="$(get_name $file)"
- echo "Generating icon for ${name}"
- imageset="./Tofu/Assets.xcassets/${name}.imageset/"
- mkdir -p "$imageset"
- sips --resampleWidth 192 "$file" --out "${imageset}${name}@3x.png" >/dev/null
- sips --resampleWidth 128 "$file" --out "${imageset}${name}@2x.png" >/dev/null
- sips --resampleWidth 64 "$file" --out "${imageset}${name}.png" >/dev/null
- write_json "$name" "${imageset}Contents.json"
-done
-```
-
=> https://apps.apple.com/app/tofu-authenticator/id1082229305 Download Tofu on the App Store
=> https://github.com/calleluks/Tofu Explore the source on GitHub
=> https://www.calleluks.com Check out Calle Luks