index.md (2137B)
1 +++ 2 title = "Tofu" 3 date = 2021-04-07 4 description = "An easy-to-use, open-source, two-factor authentication app designed specifically for iOS." 5 +++ 6 7 [**Tofu**][tofu] is an easy-to-use, open-source, two-factor 8 authentication app designed specifically for iOS, made by 9 [Calle Luks][calle]. I adopted it after migrating from Authy, 10 and ended up overhauling its icon system. 11 12 It's a really well designed app: 13 14 ![A screenshot of Tofu in action][sc] 15 16 When I migrated to Tofu, it had a limited number of hand-designed 17 icons in one big [Sketch file][sketch]. Each icon was created and 18 exported manually. I set out to [simplify][issue] the process, and 19 Calle [proposed][proposal] we create a shell script to generate 20 icons on-demand from a folder of pngs. 21 22 I got my shell hat on and a week later, [my pull request][pr] 23 was commited to upstream with a brand new bash script. [The 24 script][script] iterates over a given directory using `sed` 25 and [regex][post] to grab the names of each png inside and add 26 them to Xcode's assets folder. It uses a [heredoc][heredoc] as 27 a template for the new imageset's JSON, and the `sips` cli to 28 generate properly sized icons for use in the app. 29 30 Contributing to open source projects is incredibly fun. If you've 31 got a free weekend, take some time to hack on your favorite codebase. 32 Big thanks to [Calle][calle] for creating such an awesome app – I 33 look forward to collaborating more in the future. 34 35 Download the app [on the App Store][store], and explore the source 36 code [on GitHub][tofu]. 37 38 [tofu]: https://github.com/calleluks/Tofu 39 [calle]: https://www.calleluks.com 40 41 [sc]: accounts.jpg 42 43 [sketch]: https://github.com/calleluks/Tofu/blob/d6b4544f7a996fd2c7a4feaa77cdee7735240749/IssuerIcons.sketch 44 [issue]: https://github.com/calleluks/Tofu/issues/52 45 [proposal]: https://github.com/calleluks/Tofu/issues/52#issuecomment-760989928 46 47 [pr]: https://github.com/calleluks/Tofu/pull/60 48 [script]: https://github.com/calleluks/Tofu/blob/master/GenerateIssuerIconAssets.sh 49 [post]: @/posts/my-first-regex.md 50 [heredoc]: https://stackoverflow.com/a/2954835 51 52 [store]: https://apps.apple.com/app/tofu-authenticator/id1082229305