Giter Club home page Giter Club logo

sundryautomata's Introduction

sundryautomata

A simple-ish Mastodon/Twitter bot that posts pretty pictures of cellular automata.

The 1D cellular automaton generation is based on a previous project of mine, while the tooting/tweeting and logging part is adapted from another project of mine. Everything is a remix.

Check it out at @[email protected]!

Setup

The most vital dependency, apart from Python 3 which the bot is written in, is Cairo. You'll need to figure out how to install it on your system yourself, but chances are that it's available through your package manager. In fact, it might already be installed and you don't have to do anything!

Assuming things have gone smoothly so far, let's proceed โ€“ I suggest using the venv module (which is conveniently included in your Python installation) to avoid dependency hell. Run the following commands to get the bot installed on your system:

$ git clone https://github.com/doersino/sundryautomata
$ python3 -m venv sundryautomata
$ cd sundryautomata
$ source bin/activate
$ pip3 install -r requirements.txt

(To deactivate the virtual environment, run deactivate.)

Configuration

Copy config.sample.ini to config.ini, open it and modify it based on the instructions in the comments. Most notably, fill in your Mastodon or Twitter API credentials (but the bot will still generate images without those).

Running

Once you've set everything up and configured it to your liking, run:

$ python3 sundryautomata.py

That's basically it!

If you want your bot to post at predefined intervals, use cron, runwhen or a similar tool. To make cron work with venv, you'll need to use bash and execute the activate script before running the bot (in this example, it runs every six hours at 42 minutes past the hour):

42 */6 * * * /usr/bin/env bash -c 'cd /PATH/TO/sundryautomata && source bin/activate && python3 sundryautomata.py'

sundryautomata's People

Contributors

dependabot[bot] avatar doersino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.