README

Trumpet 🎺

A bot that generates tweets based on the accounts it follows.

GoDoc Build Status Go Report Card

Building

First, you will need to make sure you have the dependencies:

$ make deps

Next, you are able to build the program:

$ make

Installing

To install to $GOPATH/bin:

$ make install

To install to a custom location, for example /usr/local/bin:

$ sudo make install prefix=/usr/local

Configuration

Trumpet needs to be configured to connect to Twitter. You will need a consumer key, a consumer secret, an access token, and an access secret. See https://developer.twitter.com/en/docs/basics/authentication/guides/access-tokens.html for more information.

Once you have the required information, you can use the trumpet-mkconfig tool to create the configuration file.

$ trumpet-mkconfig

For more information on how to use the tool, run:

$ trumpet-mkconfig -help

Running

Once you have created the configuration file, you are ready to run the bot:

$ trumpet

For more information on the program's usage, run:

$ trumpet -help

License

See LICENSE.

Expand ▾ Collapse ▴

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator interface {
	Train(s string)
	Generate(maxLength int) string
}

    Generator gets trained by calls to Train and creates strings of text by calls to Generate.

    type Scheduler

    type Scheduler interface {
    	Train(d time.Time)
    	Chan() <-chan struct{}
    }

      A Scheduler learns from calls to Train() and decides when by sending a signal through Chan().

      Directories

      Path Synopsis
      cmd
      trumpet
      trumpet is a bot that generates tweets based on the accounts it follows.
      trumpet is a bot that generates tweets based on the accounts it follows.
      trumpet-mkconfig
      trumpet-mkconfig is an interactive trumpet configuration creation tool.
      trumpet-mkconfig is an interactive trumpet configuration creation tool.
      generator
      count
      Package count provides a trumpet.Generator that keeps count of the number of times Train is called.
      Package count provides a trumpet.Generator that keeps count of the number of times Train is called.
      dummy
      Package dummy provides a dummy trumpet.Generator.
      Package dummy provides a dummy trumpet.Generator.
      markov
      Package markov provides a trumpet.Generator that uses markov chains.
      Package markov provides a trumpet.Generator that uses markov chains.
      multi
      Package multi provides a trumpet.Generator that multiplexes training data over multiple trumpet.Generators.
      Package multi provides a trumpet.Generator that multiplexes training data over multiple trumpet.Generators.
      verbatim
      Package verbatim provides a trumpet.Generator that keeps track of training data for the purposes of checking that generated data isn't identical to any piece of training data.
      Package verbatim provides a trumpet.Generator that keeps track of training data for the purposes of checking that generated data isn't identical to any piece of training data.
      scheduler
      noop
      Package noop provides a trumpet.Scheduler that does nothing.
      Package noop provides a trumpet.Scheduler that does nothing.
      sametime
      Package sametime provides a trumpet.Scheduler that schedules tweets to go out at the same time Train is called.
      Package sametime provides a trumpet.Scheduler that schedules tweets to go out at the same time Train is called.
      timer
      Package timer provides a trumpet.Scheduler that schedules tweets to go out repeatedly on a timer.
      Package timer provides a trumpet.Scheduler that schedules tweets to go out repeatedly on a timer.
      source
      twitter
      Package twitter is the layer that connects trumpet to Twitter so that other parts of the program don't need to directly interact with the Twitter API.
      Package twitter is the layer that connects trumpet to Twitter so that other parts of the program don't need to directly interact with the Twitter API.
      twitter/logger
      Package logger provides a simple anaconda.Logger that uses the standard library's log package.
      Package logger provides a simple anaconda.Logger that uses the standard library's log package.