Skip to content

Instantly share code, notes, and snippets.

@arnicas
Last active July 23, 2017 13:43
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arnicas/104b5a4643896bde0100bb5394f99a78 to your computer and use it in GitHub Desktop.
Save arnicas/104b5a4643896bde0100bb5394f99a78 to your computer and use it in GitHub Desktop.
Bot Links and How-To's

Some Links on How to Make Bots Easily

Based on an improv demo workshop I "gave" at ELO2017 when the presenter didn't come.

For a non-progammer, the easiest method I know of is Cheap Bots Done Quick by @v21 based on Tracery.js grammar by @GalaxyKate (Kate Compton).

The example code we created in the tutorial is shown in the image below: Screenshot

All "stories" start with the origin, and the #hashtag# words are expanded and substituted.

There's an online Tracery tutorial here.

(The much more complicated rat bio app I showed integrates a bunch of data sources -- it's here.)

Putting SVG/Images in a Bot with CheapBotsDoneQuick

2 Tutorials from @v21:

Using Code - a Python Example

The YeatsBot I had made that we re-wrote used this Python code in my repo. I made it by following this tutorial by @spine_cone. I modified it a little to make the text extract from the book a little nicer.

The structure of the code is that the bot.py code tweets excerpts from a book.txt file, text taken from a random location and less than 140 characters. The secret twitter authorization keys are not shown in the repo. They can be found on your twitter app page if you "Create a new app." Your keys are on the "Keys and Access Tokens" tab. These keys are hand-uploaded or typed into Python Anywhere, which was hosting the bot before we turned it into a new bot using CheapBots. "Hosting" means that the code was uploaded to their site, which has a web server, and it is set up to run once a day automatically.

Some Bots I Showed

Here's my Medium newsletter that had a couple in it.

More Tutorial Links

Here's some introductory material on making bots. This is a good long list of twitter bot tutorials. Most still require learning or using a little bit of code.

Add Links for Newbies, Especially Non-Coders

Should I add some links here? Did I miss any non-coding important resources?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment