This newsletter was written using a mac app
Since two weeks ago, I’ve migrated my weekly newsletter from Mailchimp to a service called Sendy. While Sendy has all the important features that Mailchip has, and does certain things better than Mailchimp, it also lacks some features.
For example, in Mailchimp I had some global styles set up for stuff like links and buttons. Any link I added to my newsletter would receive the same styling automatically.
When I discovered that Sendy didn’t have such a feature I was a little dissappointed.
I decided that there was no way that I would be happy with Sendy’s editor so instead, I wrote a little node.js script that reads a JSON file and transforms it into an HTML file that contains my newsletter with the correct layout and styling.
This worked well for the first two editions but then I figured I’d like to make this process easier.
So I decided to write a mac app with a bunch of form fields. These form fields are bound to a model using SwiftUI, and the model is Encodable so I can transform it to JSON. Then I use a Process to invoke my node.js script from earlier and I pass it the JSON string that I generate from my model. The script writes the HTML to a file and also writes it to the standard output so I can show a preview in my little app.
It’s still a bit hacky and not quite as convenient as I’d like but it’s getting there. The next step is to add quick and easy image uploading for the “On Repeat” section so I don’t have to upload album covers to Amazon’s S3 by hand.
Why am I telling you this?
I’m not sure either. I’m just having fun with this little tool, and hopefully this story inspires some of you to experiment and learn new things by building a tool for something you do regularly. It doesn’t have to be fancy. My mac app right now is anything but fancy, it gets the job done though!
Anyway, I hope you all have a great weekend! And if you’ve been putting off building that weekend project because you think it wouldn’t be a good app anyway, just give it a go.
Maybe you’ll build something that useful for nobody but you. But you’ll have built something, and that’s worth a lot.
Cheers, Donny
|