Download the PHP package heidilabs/markov-bot without Composer

On this page you can find all versions of the php package heidilabs/markov-bot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package markov-bot

Markov Bot - Twitter

An open source Twitter bot that uses markov chains to generate tweets. This is basically a simple CLI application written in PHP, using the Symfony console. You can run the commands manually or schedule your bot to tweet periodically by adding the tweet command to crontab.

Requirements

Quick Installation Instructions

  1. Run composer create-project heidilabs/markov-bot myDirectory to clone the app repository and install the dependencies
  2. Create your config file by copying config/config-sample.yml to config/config.yml. Edit the file to set your options, including Twitter credentials.
  3. It's ready to use. Run php console.php to see the available commands. To test your current configuration without tweeting it, run php console.php markov:test .

Commands

twitter:test

Test the current Twitter settings and outputs which user is connected and would have the updates posted to, according to the provided keys.

markov:test

Test the current bot settings and outputs an example of tweet that would be posted using this settings.

markov:tweet

Posts an update to Twitter using the current settings. The tweet is also outputted.

cache:update

Updates the cached samples for Twitter and RSS feeds.

Configuring the sources

Currently there are 3 adapters: File, Twitter and RSS. The contents are cached in the first run, and you can run a command to update this cache if you want. It might be interesting to add it to crontab to update once a day, for instance.

Methods

Sources

Sources can come from a text file, a twitter account, or a RSS feed. The contents are cached locally in a simple txt file. You can update the samples anytime by running php console.php cache:update. The sources are defined using a prefix, followed by the path (in case of local file), url without protocol prefix(in case of RSS) or username (in case of Twitter sources).

Note: RSS with full content instead of only titles and descriptions work better.

Examples

Using wordchain based on text files

as a charm, that one should be heartily ashamed. To lose the intuition as to the EXTENT to which a process belongs

Using mixedsource based on text files

riddles which the conflicting nature at the basis of the kid is not my son She says I am the

Using mixedsource based on 2 different twitter users

Oh yes. Packing has started! @digitalocean @phpbenelux what a day... setup: Dive into service discovery and learn how it works

Using mixedsource with twitter and text file

marvelous. well done @ChasingUX , well done. So excited to always think twice (do think twice.) She told my baby

Using mixedsource with twitter and rss feed

magician show at #phpbnl15 closing. By the way: I have missed, and it's all on BitStream.... The changing color of

Managing multiple bots

You can run multiple bots within the same installation, for that you just need to create other config files and place them inside your "config" folder. Then, when calling the markov commands, you should provide the --config option, passing the name of the file as parameter.

Example:


All versions of markov-bot with dependencies

PHP Build Version
Package Version
Requires heidilabs/markov-php Version ~0.2
ttools/ttools Version ~2.1.0
symfony/console Version ~2.6.0
pimple/pimple Version ~3.0
symfony/yaml Version ~2.6.0
dg/rss-php Version ~1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package heidilabs/markov-bot contains the following files

Loading the files please wait ....