Getting started

A few simple steps to get started with EFB.

Install EH Forwarder Bot

EH Forwarder Bot can be installed in the following ways:

Note

The following instructions may not work properly until a stable release is uploaded. As you are in the beta version documentation, I assume you know what to do.

Install from PyPI

pip will by default install the latest stable version from PyPI, but development versions are available at PyPI as well.

pip3 install ehforwarderbot

Install from GitHub

This will install the latest commit from GitHub. It might not be stable, so proceed with caution.

pip3 install git+https://github.com/blueset/ehforwarderbot.git

A good network environment

Since most of our channels are using polling for message retrieval, a good network environment is necessary for channels to run smoothly. A poor network environment may lead to slow response, or loss of messages.

Create local directories

EFB uses a *nix user configuration style, which is described in details in Directories. In short, if you are using the default configuration, you need to create ~/.ehforwarderbot, and give read and write permission to the user running EFB.

Choose, install and enable modules

Currently, all modules that was submitted to us are recorded in the channels repository. You can choose the channels that fits your need the best.

Instructions about installing each channel is available at their respective documentations.

When you have successfully installed a channel, you can enable it by listing its Channel ID in the configuration file. The default path is ~/.ehforwarderbot/profiles/default/config.yaml. Please refer to Directories if you have configured otherwise.

Please note that although you can have more than one slaves channels running at the same time, you can only have exactly one master channels running in one profile. Meanwhile, middlewares are completely optional.

Example

To enable the following modules:

  • Master channel
    • Demo Master (foo.demo_master)
  • Slave channels
    • Demo Slave (foo.demo_slave)
    • Dummy Slave (bar.dummy)
  • Middlewares
    • Null Middleware (foo.null)

In the config.yaml it should have the following lines:

master_channel: foo.demo_master
slave_channels:
- foo.demo_slave
- bar.dummy
middlewares:
- foo.null

Launch EFB

ehforwarderbot

This will launch EFB directly in the current environment. The default Profiles is named default, to launch EFB in a different profile, append --profile <profile-name> to the command.

For more command line options, use --help option.

Launch EFB as a daemon process

Since version 2, EH Forwarder Bot has removed the daemon helper as it is unstable to use. We recommend you to use mature solutions for daemon management, such as systemd, upstart, or pm2.