I've been building TechBiteAsia. It scours Asian tech news, extracts the core insights, and delivers them as a daily newsletter.
I'm doing a "build in public" approach, where I document all the process transparently and invite your suggestions to shape the product together!
With those 5 lines, the full program is automated and can run on their own. But using cron has 1 problem, if your machine is off, the scheduler won't run. The solution is moving to cloud, but this is a future plan for now since it costs $
Line 5 is the scheduler for sending the email. I set it to run everyday at 08.30 AM WIB. This is because I want the newsletter to be sent out every morning
So at this point, our email content is created and ready to be sent out as a newsletter. For the email delivery, I look for tutorials on YT and found you can use the smtplib module for sending emails in Python. We just need to define the recipients and attach our HTML code here
It actually took me a good 3 days to finalize this. The reason was of an error where the input length (news article) was longer than what the model can handle. So I spent time reading the docs and googling. Eventually I've found this video that set me in the right track