Skip to content

Cuts up XKCD comics, creates permutations of them, and then posts them on Twitter. Powered by Serverless and AWS Lambda

License

Notifications You must be signed in to change notification settings

kevinlinxc/xkcdrandomizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xkcdrandomizer

Randomly generates xkcd comics and posts them to the twitter account @xkcdrandomizer

The pipeline is as follows:

  1. I use the xkcd package to randomly choose xkcd comics.
  2. I cut the comic into panels using a modified Kumiko
  3. I remove any cut panels that have too large/too small of an area/a bad aspect ratio
  4. I resize, append, and repeat until I have the width of an average comic
  5. I use Serverless with Docker to package Kumiko, other requirements, and my source code
  6. I deploy to AWS Lambda, which has a generous free tier allowing my bot to run until the heat death of the universe

The src directory has xkcdRoulette.py, which can be run locally. The serverless directory is where I set up serverless config files and copied the code base from src so that it would be compatible with Lambda (adding a handler).

I mostly followed this guide for using Serverless/Lambda: https://read.iopipe.com/the-right-way-to-do-serverless-in-python-e99535574454

About

Cuts up XKCD comics, creates permutations of them, and then posts them on Twitter. Powered by Serverless and AWS Lambda

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages