Crates.io | seinbot-rs |
lib.rs | seinbot-rs |
version | 1.0.3 |
source | src |
created_at | 2019-03-04 09:26:32.183441 |
updated_at | 2019-04-11 09:08:41.936449 |
description | A seinfeld twitter bot using markov chains in rust. |
homepage | https://github.com/arosspope/seinbot-rs.git |
repository | https://github.com/arosspope/seinbot-rs.git |
max_upload_size | |
id | 118608 |
size | 7,294,061 |
A seinfeld twitter bot using aws lambda functions and markov chains in rust.
Example tweet from frank costanza
I've always wanted to make a robot that contributes to the heat death of the universe through asinine tweets. This is the result!
Primarily for learning purposes, the intent of this project was to see how easy it would be to:
Thankfully, there were a number of well-documented Rust libraries that made implemention of this project quite simple. Using AWS Lambda functions and the serverless application framework for Rust, it was trivial to deploy and configure the code to run periodically:
service: daily-tweet
provider:
name: aws
runtime: rust
...
functions:
seinbot:
handler: seinbot-rs
events:
- schedule: rate(24 hours)
Snippet from serverless.yml (used to deploy to AWS)
Whilst the bot mostly produces nonsensical output, it can sometimes construct something quite amusing (see above tweet). Overall, I am quite happy with final product and would like to thank the following projects that made it so:
seinfeld-scripts: For providing the database of seinfeld content used in the markov chain.
markov: For providing a Rust implementation of markov chains.
egg_mode: For providing the library used to interact with Twitter's API.
aws-lambda-rust-runtime: For providing the library used to implement an AWS Lambda function in Rust.
serverless-rust: For providing the framework used to configure, test, and deploy the bot.