voxpupuli/thevoxfox

Name: thevoxfox

Owner: Vox Pupuli

Description: null

Created: 2016-11-18 16:31:31.0

Updated: 2016-11-18 20:01:44.0

Pushed: 2017-10-04 20:51:41.0

Homepage: null

Size: 105

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

The VoxFox

Installation

We provide a basic config file, it is located at config.example.ini. Please rename it to config.ini

Local

Note that python packages for this are 'pinned' in requirements.txt

pip3 install -r ./requirements.txt

venv
ualenv --python=/usr/bin/python3 venv
ce venv/bin/activate
 install -r ./requirements.txt
Running

If you decide to do this in Docker, local installation is not necessary.

With Docker

./run.sh SomeLocalContainerName will start a local python:3 container, mount the repo into /usr/src/legobot, install deps, and then run the chatbot.py script.

Without Docker

If you don't use virtualenv you can directly start the bot:

on3 chatbot.py

In case of virtualenv you first have to activate it:

ce venv/bin/activate
on3 chatbot.py
virtualenv and systemd

We can create a systemd service file in the namespace of our linux user, which doesn't require any root priviledges. This allows us to easily utilize systemd features. Create the directory:

r -p ~/.config/systemd/user

After that, create a thevoxfox.service file in it with the following content (it assumes that you cloned this repository into your home directory, please replace $USER with your actual username):

t]
ription=TheVoxFox IRC Bot
r=network.target

vice]
ingDirectory=/home/$USER/thevoxfox
Start=/home/$USER/thevoxfox/venv/bin/python3 /home/$USER/thevoxfox/chatbot.py
ateTmp=true

tall]
edBy=default.target

You can now start/stop/restart/status the bot with:

emctl --user start thevoxfox
emctl --user status thevoxfox
emctl --user restart thevoxfox
emctl --user restart thevoxfox

If you want the service to start at boot and run when logged out:

 loginctl enable-linger $USER

You can run it persistently with:

emctl --user enable thevoxfox
Setting configuration

Use the config.ini to provide settings to the chatbot.py script

Developing Plugins

See this link


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.