Automating My Now Page, Update

My now page automation continues to evolve

In a recent post I wrote about a new Lambda function, called traktbot that pulls my TV and movie watching and rating info into my Now page automatically. The new function pushes the relevant data into a DynamoDB table, which another Lambda Function, called nowbot uses to write the content using the OMG.lol API.

The nowbot function also dealt with pulling data from a paste that I edit manually. (This is for books, magazine articles, music, podcasts, and anything else I’m into at the moment.)

I decided to split the function of handling the paste contents from the work of building and updating the Now page. The paste handling work is now handled by a new Lambda Function called pastebot, with nowbot simplified to only getting the recent items from DynamoDB and updating the Now page.

The rationale for splitting the nowbot function up comes from the complexity of figuring out when updates to the Now page are actually needed, given that data comes from two sources and may include new items, updates, modifications, and deletions. Now, the two content bots (pastebot and traktbot) work independently, and can trigger a Now Page rebuild when necessary using the Amazon Simple Queue Service (SQS).

Architecture of the Now page generator

You can check out the latest Lambda code out on GitHub: