diff --git a/mycroft/skills/alarm/__init__.py b/mycroft/skills/alarm/__init__.py index 33083941c3..6ea212a549 100644 --- a/mycroft/skills/alarm/__init__.py +++ b/mycroft/skills/alarm/__init__.py @@ -33,12 +33,12 @@ __author__ = 'jdorleans' # TODO - Localization class AlarmSkill(ScheduledCRUDSkill): def __init__(self): - super(AlarmSkill, self).__init__("AlarmSkill", None, dirname(__file__)) + super(AlarmSkill, self).__init__("AlarmSkill", None) self.alarm_on = False self.max_delay = self.config.get('max_delay') self.repeat_time = self.config.get('repeat_time') self.extended_delay = self.config.get('extended_delay') - self.file_path = join(self.basedir, self.config.get('filename')) + self.file_path = join(dirname(__file__), self.config.get('filename')) def initialize(self): super(AlarmSkill, self).initialize() diff --git a/mycroft/skills/audio_record/__init__.py b/mycroft/skills/audio_record/__init__.py index f05e693383..e89537c6a0 100644 --- a/mycroft/skills/audio_record/__init__.py +++ b/mycroft/skills/audio_record/__init__.py @@ -47,8 +47,6 @@ class AudioRecordSkill(ScheduledSkill): self.record_process = None def initialize(self): - self.load_data_files(dirname(__file__)) - intent = IntentBuilder("AudioRecordSkillIntent").require( "AudioRecordSkillKeyword").build() self.register_intent(intent, self.handle_record) diff --git a/mycroft/skills/configuration/__init__.py b/mycroft/skills/configuration/__init__.py index c9703ec6e5..5946596bbe 100644 --- a/mycroft/skills/configuration/__init__.py +++ b/mycroft/skills/configuration/__init__.py @@ -34,7 +34,6 @@ class ConfigurationSkill(ScheduledSkill): self.api = DeviceApi() def initialize(self): - self.load_data_files(dirname(__file__)) intent = IntentBuilder("UpdateConfigurationIntent") \ .require("ConfigurationSkillKeyword") \ .require("ConfigurationSkillUpdateVerb") \ diff --git a/mycroft/skills/date_time/__init__.py b/mycroft/skills/date_time/__init__.py index 936c427ebf..52b06f3b89 100644 --- a/mycroft/skills/date_time/__init__.py +++ b/mycroft/skills/date_time/__init__.py @@ -43,7 +43,6 @@ class TimeSkill(MycroftSkill): self.format = "%I:%M, %p" def initialize(self): - self.load_data_files(dirname(__file__)) intent = IntentBuilder("TimeIntent").require("TimeKeyword") \ .optionally("Location").build() self.register_intent(intent, self.handle_intent) diff --git a/mycroft/skills/desktop_launcher/__init__.py b/mycroft/skills/desktop_launcher/__init__.py index 92054a5d2a..b4ee9480f3 100644 --- a/mycroft/skills/desktop_launcher/__init__.py +++ b/mycroft/skills/desktop_launcher/__init__.py @@ -49,8 +49,6 @@ class DesktopLauncherSkill(MycroftSkill): logger.error("Could not import gio") return - self.load_vocab_files(join(dirname(__file__), 'vocab', self.lang)) - self.load_regex_files(join(dirname(__file__), 'regex', self.lang)) tokenizer = EnglishTokenizer() for app in gio.app_info_get_all(): diff --git a/mycroft/skills/dial_call/__init__.py b/mycroft/skills/dial_call/__init__.py index 8392787d92..1722024739 100644 --- a/mycroft/skills/dial_call/__init__.py +++ b/mycroft/skills/dial_call/__init__.py @@ -45,9 +45,6 @@ class DialCallSkill(MycroftSkill): 'sean': '34567890'} # TODO - Use API def initialize(self): - self.load_vocab_files(join(dirname(__file__), 'vocab', self.lang)) - self.load_regex_files(join(dirname(__file__), 'regex', self.lang)) - intent = IntentBuilder("DialCallIntent").require( "DialCallKeyword").require("Contact").build() self.register_intent(intent, self.handle_intent) diff --git a/mycroft/skills/helloworld/__init__.py b/mycroft/skills/helloworld/__init__.py index be4b9b0e47..9dc00e28fe 100644 --- a/mycroft/skills/helloworld/__init__.py +++ b/mycroft/skills/helloworld/__init__.py @@ -32,8 +32,6 @@ class HelloWorldSkill(MycroftSkill): super(HelloWorldSkill, self).__init__(name="HelloWorldSkill") def initialize(self): - self.load_data_files(dirname(__file__)) - thank_you_intent = IntentBuilder("ThankYouIntent").\ require("ThankYouKeyword").build() self.register_intent(thank_you_intent, self.handle_thank_you_intent) diff --git a/mycroft/skills/ip_skill/__init__.py b/mycroft/skills/ip_skill/__init__.py index 038a6df637..812e530184 100644 --- a/mycroft/skills/ip_skill/__init__.py +++ b/mycroft/skills/ip_skill/__init__.py @@ -39,8 +39,6 @@ class IPSkill(MycroftSkill): super(IPSkill, self).__init__(name="IPSkill") def initialize(self): - self.load_vocab_files(join(dirname(__file__), 'vocab', 'en-us')) - intent = IntentBuilder("IPIntent").require("IPCommand").build() self.register_intent(intent, self.handle_intent) diff --git a/mycroft/skills/joke/__init__.py b/mycroft/skills/joke/__init__.py index b6be37f9d8..f2dc79a606 100644 --- a/mycroft/skills/joke/__init__.py +++ b/mycroft/skills/joke/__init__.py @@ -34,8 +34,6 @@ class JokingSkill(MycroftSkill): super(JokingSkill, self).__init__(name="JokingSkill") def initialize(self): - self.load_vocab_files(join(dirname(__file__), 'vocab', self.lang)) - intent = IntentBuilder("JokingIntent").require("JokingKeyword").build() self.register_intent(intent, self.handle_intent) diff --git a/mycroft/skills/naptime/__init__.py b/mycroft/skills/naptime/__init__.py index ad6bed46c0..54bb25cca7 100644 --- a/mycroft/skills/naptime/__init__.py +++ b/mycroft/skills/naptime/__init__.py @@ -30,7 +30,6 @@ class NapTimeSkill(MycroftSkill): super(NapTimeSkill, self).__init__(name="NapTimeSkill") def initialize(self): - self.load_data_files(dirname(__file__)) naptime_intent = IntentBuilder("NapTimeIntent").require( "SleepCommand").build() self.register_intent(naptime_intent, self.handle_intent) diff --git a/mycroft/skills/npr_news/__init__.py b/mycroft/skills/npr_news/__init__.py index 355b103110..22106b3cd9 100644 --- a/mycroft/skills/npr_news/__init__.py +++ b/mycroft/skills/npr_news/__init__.py @@ -40,7 +40,6 @@ class NPRNewsSkill(MycroftSkill): self.process = None def initialize(self): - self.load_data_files(dirname(__file__)) intent = IntentBuilder("NPRNewsIntent").require( "NPRNewsKeyword").build() self.register_intent(intent, self.handle_intent) diff --git a/mycroft/skills/pairing/__init__.py b/mycroft/skills/pairing/__init__.py index 5e92945f77..b833cfbc92 100644 --- a/mycroft/skills/pairing/__init__.py +++ b/mycroft/skills/pairing/__init__.py @@ -55,7 +55,6 @@ class PairingSkill(MycroftSkill): '0': 'Zero'} def initialize(self): - self.load_data_files(dirname(__file__)) intent = IntentBuilder("PairingIntent") \ .require("PairingKeyword").require("DeviceKeyword").build() self.register_intent(intent, self.handle_pairing) diff --git a/mycroft/skills/personal/__init__.py b/mycroft/skills/personal/__init__.py index f47e2ed73e..2557204fbc 100644 --- a/mycroft/skills/personal/__init__.py +++ b/mycroft/skills/personal/__init__.py @@ -32,8 +32,6 @@ class PersonalSkill(MycroftSkill): super(PersonalSkill, self).__init__(name="PersonalSkill") def initialize(self): - self.load_data_files(dirname(__file__)) - when_were_you_born_intent = IntentBuilder("WhenWereYouBornIntent")\ .require("WhenWereYouBornKeyword").build() self.register_intent(when_were_you_born_intent, diff --git a/mycroft/skills/reminder/__init__.py b/mycroft/skills/reminder/__init__.py index 0c16194a1c..5b9f4c484e 100644 --- a/mycroft/skills/reminder/__init__.py +++ b/mycroft/skills/reminder/__init__.py @@ -37,7 +37,7 @@ class ReminderSkill(ScheduledCRUDSkill): def __init__(self): super(ReminderSkill, self).__init__( - "ReminderSkill", None, dirname(__file__)) + "ReminderSkill", None) self.reminder_on = False self.max_delay = self.config.get('max_delay') self.repeat_time = self.config.get('repeat_time') diff --git a/mycroft/skills/scheduled_skills.py b/mycroft/skills/scheduled_skills.py index f89a0080f7..87c07cc516 100644 --- a/mycroft/skills/scheduled_skills.py +++ b/mycroft/skills/scheduled_skills.py @@ -147,12 +147,14 @@ class ScheduledCRUDSkill(ScheduledSkill): super(ScheduledCRUDSkill, self).__init__(name, emitter) self.data = {} self.repeat_data = {} - self.basedir = basedir + if basedir: + logger.debug('basedir argument is no longer required and is ' + + 'depreciated.') + self.basedir = basedir def initialize(self): self.load_data() self.load_repeat_data() - self.load_data_files(self.basedir) self.register_regex("(?P<" + self.name + "Amount>\d+)") self.register_intent( self.build_intent_create().build(), self.handle_create) diff --git a/mycroft/skills/send_sms/__init__.py b/mycroft/skills/send_sms/__init__.py index 67e10a11d1..f693214f55 100644 --- a/mycroft/skills/send_sms/__init__.py +++ b/mycroft/skills/send_sms/__init__.py @@ -42,8 +42,6 @@ class SendSMSSkill(MycroftSkill): 'sean': '34567890'} # TODO - Use API def initialize(self): - self.load_vocab_files(join(dirname(__file__), 'vocab', self.lang)) - self.load_regex_files(join(dirname(__file__), 'regex', self.lang)) intent = IntentBuilder("SendSMSIntent").require( "SendSMSKeyword").require("Contact").require("Message").build() self.register_intent(intent, self.handle_intent) diff --git a/mycroft/skills/speak_skill/__init__.py b/mycroft/skills/speak_skill/__init__.py index 610784d722..467649fce4 100644 --- a/mycroft/skills/speak_skill/__init__.py +++ b/mycroft/skills/speak_skill/__init__.py @@ -31,8 +31,6 @@ class SpeakSkill(MycroftSkill): super(SpeakSkill, self).__init__(name="SpeakSkill") def initialize(self): - self.load_vocab_files(join(dirname(__file__), 'vocab', 'en-us')) - prefixes = [ 'speak', 'say', 'repeat'] self.__register_prefixed_regex(prefixes, "(?P.*)") diff --git a/mycroft/skills/spelling/__init__.py b/mycroft/skills/spelling/__init__.py index c8156024a2..faadbcf9ff 100644 --- a/mycroft/skills/spelling/__init__.py +++ b/mycroft/skills/spelling/__init__.py @@ -35,9 +35,6 @@ class SpellingSkill(MycroftSkill): super(SpellingSkill, self).__init__(name="SpellingSkill") def initialize(self): - self.load_vocab_files(join(dirname(__file__), 'vocab', self.lang)) - self.load_regex_files(join(dirname(__file__), 'regex', self.lang)) - intent = IntentBuilder("SpellingIntent").require( "SpellingKeyword").require("Word").build() self.register_intent(intent, self.handle_intent) diff --git a/mycroft/skills/stock/__init__.py b/mycroft/skills/stock/__init__.py index a11a3df38f..247cd629fc 100644 --- a/mycroft/skills/stock/__init__.py +++ b/mycroft/skills/stock/__init__.py @@ -34,8 +34,6 @@ class StockSkill(MycroftSkill): super(StockSkill, self).__init__(name="StockSkill") def initialize(self): - self.load_data_files(dirname(__file__)) - stock_price_intent = IntentBuilder("StockPriceIntent") \ .require("StockPriceKeyword").require("Company").build() self.register_intent(stock_price_intent, diff --git a/mycroft/skills/stop/__init__.py b/mycroft/skills/stop/__init__.py index 5c5a7a40ea..adba78a5b9 100644 --- a/mycroft/skills/stop/__init__.py +++ b/mycroft/skills/stop/__init__.py @@ -34,7 +34,6 @@ class StopSkill(MycroftSkill): def initialize(self): # TODO - To be generalized in MycroftSkill - self.load_vocab_files(join(dirname(__file__), 'vocab', self.lang)) intent = IntentBuilder("StopIntent").require("StopKeyword").build() self.register_intent(intent, self.handle_intent) diff --git a/mycroft/skills/volume/__init__.py b/mycroft/skills/volume/__init__.py index 835bd2fc03..24cc27b209 100644 --- a/mycroft/skills/volume/__init__.py +++ b/mycroft/skills/volume/__init__.py @@ -53,7 +53,6 @@ class VolumeSkill(MycroftSkill): self.volume_sound = join(dirname(__file__), "blop-mark-diangelo.wav") def initialize(self): - self.load_data_files(dirname(__file__)) self.__build_set_volume() def __build_set_volume(self): diff --git a/mycroft/skills/weather/__init__.py b/mycroft/skills/weather/__init__.py index 9bf18249d1..9cde0807d9 100644 --- a/mycroft/skills/weather/__init__.py +++ b/mycroft/skills/weather/__init__.py @@ -105,7 +105,6 @@ class WeatherSkill(MycroftSkill): self.owm = OWMApi() def initialize(self): - self.load_data_files(dirname(__file__)) self.__build_current_intent() self.__build_next_hour_intent() self.__build_next_day_intent() diff --git a/mycroft/skills/wiki/__init__.py b/mycroft/skills/wiki/__init__.py index fcbc0bd95d..9f50341198 100644 --- a/mycroft/skills/wiki/__init__.py +++ b/mycroft/skills/wiki/__init__.py @@ -46,9 +46,6 @@ class WikipediaSkill(MycroftSkill): 'FeedbackSearch.dialog')) def initialize(self): - self.load_vocab_files(join(dirname(__file__), 'vocab', self.lang)) - self.load_regex_files(join(dirname(__file__), 'regex', self.lang)) - intent = IntentBuilder("WikipediaIntent").require( "WikipediaKeyword").require("ArticleTitle").build() self.register_intent(intent, self.handle_intent)