A personal assistant
Python JavaScript CSS HTML
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
clients
data
functions
interfaces
kernel
.dockerignore
.gitignore
Dockerfile
LICENSE
README.md
config_example.py
cron.py
jarvis.service
requirements.txt
start_server.py
test-requirements.txt
test.py

README.md

Jarvis

Jarvis is a very simple personal assistant. It's probably not much use to anyone but me at the moment!

Jarvis is a Python daemon which communicates with it's clients via a REST interface.

It's clients include:

Docker

Jarvis can be run inside docker. It uses a mysql installation outside of the docker. See included files (Dockerfile, jarvis.service)

Dependencies:

  • Python 2.x
  • MySQL

Installation:

# Install packages
sudo apt-get install python-pip libmysqld-dev python-dev libcurl4-openssl-dev

# Install virtualenv
sudo pip install virtualenv

# Setup virtualenv for this project
cd ~/code/jarvis-src
virtualenv .

# Install requirements
bin/pip install -r requirements.txt

# Create database and database user

# Create config file
cp config_example.py config.py

# Edit config file
vim config.py

# Set up cron (fix user and pathname)
echo "* * * * * jarvisuser ~/code/jarvis-src/cron.py" >> /etc/cron.d/jarvis

Running

# Run Jarvis
cd ~/code/jarvis-src
./start_server.py

Database tables will be installed on first run.

Testing:

# Install testing requirements
bin/pip install -r test-requirements.txt

# Invoke test suite
bin/nosetests

# Invote test suite with coverage calculations
bin/nosetests --with-coverage --cover-package=clients,data,functions,interfaces,kernel

Twitter setup:

Visit the Twitter developer page and create a new application:

https://dev.twitter.com/apps/new

This will get you a consumer key and consumer secret. Performing the "oauth dance" gets you an oauth key and secret that authenticates yourself with Twitter.

Add them all to your config (follow the examples in the example config).