summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-09-06 10:23:05 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2014-09-10 17:57:55 -0400
commit1c63df0cc500b7cecbdb3c8b9d1b5b7e732f17d8 (patch)
treee555a9b0f8695182d6cc2ba0efa2980d9180bc41
parent6f88dcbf91da185b756dfdff7f62f60b04fd8d66 (diff)
downloadjasper-client-1c63df0cc500b7cecbdb3c8b9d1b5b7e732f17d8.tar.gz
jasper-client-1c63df0cc500b7cecbdb3c8b9d1b5b7e732f17d8.zip
Add shebang and PEP 0263 source encoding to every module
Source encoding should be specified and a shebang helps to execute a module directly (either to start jasper or just for testing purposes).
-rwxr-xr-xboot/boot.py2
-rw-r--r--boot/test.py2
-rw-r--r--boot/vocabcompiler.py2
-rw-r--r--client/alteration.py2
-rw-r--r--client/brain.py2
-rwxr-xr-xclient/conversation.py2
-rw-r--r--client/g2p.py2
-rw-r--r--client/local_mic.py2
-rwxr-xr-xclient/main.py2
-rw-r--r--client/mic.py2
-rw-r--r--client/modules/Birthday.py2
-rw-r--r--client/modules/Gmail.py2
-rw-r--r--client/modules/HN.py2
-rw-r--r--client/modules/Joke.py2
-rw-r--r--client/modules/Life.py2
-rw-r--r--client/modules/News.py2
-rw-r--r--client/modules/Notifications.py2
-rw-r--r--client/modules/Time.py2
-rw-r--r--client/modules/Unclear.py2
-rw-r--r--client/modules/Weather.py2
-rw-r--r--client/modules/app_utils.py2
-rw-r--r--client/music.py2
-rwxr-xr-xclient/musicmode.py2
-rw-r--r--client/notifier.py2
-rw-r--r--client/populate.py2
-rw-r--r--client/speaker.py2
-rw-r--r--client/stt.py2
-rw-r--r--client/test.py2
-rw-r--r--client/test_mic.py2
29 files changed, 57 insertions, 1 deletions
diff --git a/boot/boot.py b/boot/boot.py
index ed191f0..5291ea2 100755
--- a/boot/boot.py
+++ b/boot/boot.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import os
import sys
@@ -37,6 +38,7 @@ sys.path.append(lib_path)
import speaker as speak
speaker = speak.newSpeaker()
+
def testConnection():
try:
urllib2.urlopen("http://www.google.com").getcode()
diff --git a/boot/test.py b/boot/test.py
index 3d93936..638ca77 100644
--- a/boot/test.py
+++ b/boot/test.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import os
if os.environ.get('JASPER_HOME') is None:
diff --git a/boot/vocabcompiler.py b/boot/vocabcompiler.py
index a3aaf66..9177db4 100644
--- a/boot/vocabcompiler.py
+++ b/boot/vocabcompiler.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
"""
Iterates over all the WORDS variables in the modules and creates a dictionary for the client.
"""
diff --git a/client/alteration.py b/client/alteration.py
index 550bba1..5c58d92 100644
--- a/client/alteration.py
+++ b/client/alteration.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import re
diff --git a/client/brain.py b/client/brain.py
index 2babfdf..ab92934 100644
--- a/client/brain.py
+++ b/client/brain.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import logging
from os import listdir
diff --git a/client/conversation.py b/client/conversation.py
index a5937da..de0f8d5 100755
--- a/client/conversation.py
+++ b/client/conversation.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
from notifier import Notifier
from musicmode import *
from brain import Brain
diff --git a/client/g2p.py b/client/g2p.py
index bae40b6..7aa0f2d 100644
--- a/client/g2p.py
+++ b/client/g2p.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import os
import subprocess
import re
diff --git a/client/local_mic.py b/client/local_mic.py
index 44e232d..c3eb694 100644
--- a/client/local_mic.py
+++ b/client/local_mic.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
"""
A drop-in replacement for the Mic class that allows for all I/O to occur
over the terminal. Useful for debugging. Unlike with the typical Mic
diff --git a/client/main.py b/client/main.py
index a1b8ae4..d57acd7 100755
--- a/client/main.py
+++ b/client/main.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# -*- coding: utf-8-*-
import os
diff --git a/client/mic.py b/client/mic.py
index 01a37cb..9e0914b 100644
--- a/client/mic.py
+++ b/client/mic.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
"""
The Mic class handles all interactions with the microphone and speaker.
"""
diff --git a/client/modules/Birthday.py b/client/modules/Birthday.py
index 1388443..35dec59 100644
--- a/client/modules/Birthday.py
+++ b/client/modules/Birthday.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import datetime
import re
from facebook import *
diff --git a/client/modules/Gmail.py b/client/modules/Gmail.py
index b401ae6..195f0fb 100644
--- a/client/modules/Gmail.py
+++ b/client/modules/Gmail.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import imaplib
import email
import re
diff --git a/client/modules/HN.py b/client/modules/HN.py
index 863d40a..998625d 100644
--- a/client/modules/HN.py
+++ b/client/modules/HN.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import urllib2
import re
import random
diff --git a/client/modules/Joke.py b/client/modules/Joke.py
index 52b3eb9..6d78e7a 100644
--- a/client/modules/Joke.py
+++ b/client/modules/Joke.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import random
import re
diff --git a/client/modules/Life.py b/client/modules/Life.py
index 2c79ee1..259d976 100644
--- a/client/modules/Life.py
+++ b/client/modules/Life.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import random
import re
diff --git a/client/modules/News.py b/client/modules/News.py
index 8b4b9a3..56ea000 100644
--- a/client/modules/News.py
+++ b/client/modules/News.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import feedparser
import app_utils
import re
diff --git a/client/modules/Notifications.py b/client/modules/Notifications.py
index fc91da1..2b4cb88 100644
--- a/client/modules/Notifications.py
+++ b/client/modules/Notifications.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import re
from facebook import *
diff --git a/client/modules/Time.py b/client/modules/Time.py
index 2fe8a10..ea2c35a 100644
--- a/client/modules/Time.py
+++ b/client/modules/Time.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import datetime
import re
from app_utils import getTimezone
diff --git a/client/modules/Unclear.py b/client/modules/Unclear.py
index 23ab2ed..6af6082 100644
--- a/client/modules/Unclear.py
+++ b/client/modules/Unclear.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
from sys import maxint
import random
diff --git a/client/modules/Weather.py b/client/modules/Weather.py
index ad1ac29..446652a 100644
--- a/client/modules/Weather.py
+++ b/client/modules/Weather.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import re
import datetime
import feedparser
diff --git a/client/modules/app_utils.py b/client/modules/app_utils.py
index 68cce38..5ac7488 100644
--- a/client/modules/app_utils.py
+++ b/client/modules/app_utils.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import smtplib
from email.MIMEText import MIMEText
import urllib2
diff --git a/client/music.py b/client/music.py
index 2b22b81..f72d346 100644
--- a/client/music.py
+++ b/client/music.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import re
import difflib
from mpd import MPDClient
diff --git a/client/musicmode.py b/client/musicmode.py
index df3072c..8a4be67 100755
--- a/client/musicmode.py
+++ b/client/musicmode.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
"""
Manages the conversation
"""
diff --git a/client/notifier.py b/client/notifier.py
index 341ae04..ef4f0bb 100644
--- a/client/notifier.py
+++ b/client/notifier.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import Queue
from modules import Gmail
from apscheduler.scheduler import Scheduler
diff --git a/client/populate.py b/client/populate.py
index 054366e..aa6e589 100644
--- a/client/populate.py
+++ b/client/populate.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import re
from getpass import getpass
import yaml
diff --git a/client/speaker.py b/client/speaker.py
index 4c50a27..c07ce83 100644
--- a/client/speaker.py
+++ b/client/speaker.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
"""
A Speaker handles audio output from Jasper to the user
diff --git a/client/stt.py b/client/stt.py
index daa3fd3..e14ab26 100644
--- a/client/stt.py
+++ b/client/stt.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import traceback
import json
import requests
diff --git a/client/test.py b/client/test.py
index 54aeb49..a8f12be 100644
--- a/client/test.py
+++ b/client/test.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
import os
import sys
diff --git a/client/test_mic.py b/client/test_mic.py
index b01240f..73a0857 100644
--- a/client/test_mic.py
+++ b/client/test_mic.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8-*-
"""
A drop-in replacement for the Mic class used during unit testing.
Designed to take pre-arranged inputs as an argument and store any