Skip to content

SPARCS Contacts with Command Line Tool + Slack Bot

License

Notifications You must be signed in to change notification settings

sparcs-kaist/nugu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPARCS nugu

  • Slack Bot
  • Homepage
  • Command line

Installation

Prerequisite

  • On Debin/Ubuntu Linux

    • apt-get install libmysqlclient-dev
  • On MacOS

    • brew install mysql --client-only --universal

The main package

For developemnt or as an editable package inside a virtual environment:

source $NUGU_VENV/bin/activate
pip install -e .

Configuration

Environment Variables (Common)

  • NUGU_SLACK_TOKEN: The API token for Slack bot
  • NUGU_DB_HOST: The database server's hostname
  • NUGU_DB_USER: The username to connect to the database server
  • NUGU_DB_PASSWORD: The password to connect to the database server
  • NUGU_DB_NAME: The database name

If DEBUG is set to 1, it uses a local sqlite3 database as specified in NUGU_DB_PATH variable.

As a Command

Add the following as /SPARCS/bin/nugu

#! /bin/bash
source $NUGU_VENV/bin/activate
exec python -m nugu.cli $@

As a Slack bot using supervisord

Add the following as /etc/supervisor/conf.d/nugu.conf after modifying the paths to match with your setup.

[program:nugu]
command=/SPARCS/nugu/run_bot.sh
user=slack-bot
environment=NUGU_VENV="/SPARCS/nugu/venv"
directory=/SPARCS/nugu
stopasgroup=true
killasgroup=true

Developers

See Also

API Server

About

SPARCS Contacts with Command Line Tool + Slack Bot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •