Skip to content

Commit

Permalink
Merge pull request #1 from sukeesh/master
Browse files Browse the repository at this point in the history
Updating
  • Loading branch information
InEdited authored Oct 27, 2018
2 parents 4bf7aa3 + 383df3a commit e729ba7
Show file tree
Hide file tree
Showing 79 changed files with 2,572 additions and 2,121 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ setup.cfg
setup.py
jarviscli/packages/ghostdriver.log
npm-debug.log
ghostdriver.log
ghostdriver.log
jarvis
jarviscli/data/key_timein.json
17 changes: 3 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ matrix:
cache: pip
env: TOXENV=py27
- os: osx
osx_image: xcode9.3
language: generic
cache: pip
sudo: required
Expand All @@ -21,23 +22,11 @@ matrix:
cache: pip
sudo: required
env: TOXENV=py36
addons:
apt:
packages:
- python-imdbpy
- python-notify2
before_install:
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TOXENV" == "py27" ]; then
brew install python;
fi
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TOXENV" == "py36" ]; then
brew install python3;
fi
install:
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TOXENV" == "py27" ]; then
sudo pip2 install -r requirements.txt;
sudo -H pip2 install -r requirements.txt;
elif [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TOXENV" == "py36" ]; then
sudo pip3 install -r requirements.txt;
sudo -H pip3 install -r requirements.txt;
else
pip install -r requirements.txt;
fi
Expand Down
31 changes: 31 additions & 0 deletions PLUGINS.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,34 @@ class HelloWorld(Plugin):
This will make "Hello world" available.

Note that this only works for two-word commands - there is currently nothing like "three world commands".


### Init

If a Class-Plugins has a method ``init(self, jarvis)`` this method will be called during initialisation.

This feature works for Composed-Plugins. This feature is not available for decorator-style.

```
from plugin import Plugin
class HelloWorld(Plugin):
"""
Description of Hello world
"""
def init(self, jarvis):
jarvis.say("INIT HelloWorld!!!")
def require(self):
pass
def complete(self):
pass
def alias(self):
pass
def run(self, jarvis, s):
jarvis.say("Hello world!")
```
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In order to start Jarvis just clone the repository and run `./setup.sh`

Run **Jarvis** from anywhere by command `jarvis`

On Mac OS X don't forget to activate virtual environment before running jarvis with the command `. env/bin/activate`
On Mac OS X run `source setup.sh`

You can start by typing `help` within the Jarvis command line to check what Jarvis can do for you.

Expand All @@ -31,7 +31,7 @@ You can start by typing `help` within the Jarvis command line to check what Jarv
- Please don't forget to comment (document) your code

### How to run tests:

Run `test.sh`
```bash
./test.sh
Expand Down Expand Up @@ -73,6 +73,11 @@ jarvis is cool
[Click here](PLUGINS.md) to learn more about plugins.
## Optional Dependencies
- Any pyttsx3 text-to-speech engine (``sapi5, nsss or espeak``) for Jarvis to talk out loud (e.g. Ubuntu do ``sudo apt install espeak``)
- ``notify-send`` on Linux if you want to recive *nice* and deskotp-notification instead of *ugly* popup windows (e.g. Ubuntu do ``sudo apt install libnotify-bin``)
- ``ffmpeg`` if you want ``music`` to download songs as .mp3 instead .webm
## Authors
Expand Down
12 changes: 12 additions & 0 deletions custom/hello_world.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from plugin import plugin

@plugin()
def helloworld(jarvis, s):
"""Prints \"hello world!\""""
jarvis.say("Hello World!")


@plugin()
def repeat(jarvis, s):
"""Repeats what you type"""
jarvis.say(s)
Loading

0 comments on commit e729ba7

Please sign in to comment.