This is a CLI tool I created for personal use. I published it on Github for fun, because I am a fan of a few tools and practices used in this tool.
Please note, the project structure is defined using Tuist. Please install that tool first and run tuist generate
to generate the Xcode project structure.
Of interest:
- RSParser a supporting lib of NetNewsWire to parse RSS feeds.
- Swift Argument Parser
- Calling out to the network with URLSession and keep the active as long as needed, but not any longer by using a RunLoop, DispatchGroups and proper exit calls.
- Securely storing secrets in the Keychain.
- Storing other config items in user defaults.
It fetched a bit of HTML from the internet, which happens to be output exactly the way it needs to be for the newsletter. The page content is then pushed to my Sendy install on a specific list which "happens" to contain the subscribers for Swift Weekly Brief.
Easy mode newsletter sending. 🤩
-
Direct to Sendy. This requires these options to be set with the
config
command.sendyApi
rssFeed
contentUrl
apiCampaignUrl
productionListId
testListId
-
Through an undisclosed bounce page I created that just adds the
sendyApi,
productionListIdand
testListId`. This requires these options to the config command:rssFeed
contentUrl
apiCampaignUrl
secret