config folder names

This commit is contained in:
deathbybandaid 2019-06-20 09:38:38 -04:00
parent 36884c7d4d
commit 9d1339f31a
101 changed files with 22 additions and 5 deletions

View File

@ -63,7 +63,7 @@ class SpiceBot_AI():
braindirs = []
for plugin_dir in set(sopel_modules.__path__):
configsdir = os.path.join(plugin_dir, "SpiceBot_Configs")
aimldir = os.path.join(configsdir, "aiml")
aimldir = os.path.join(configsdir, "SpiceBot_AI")
braindirs.append(aimldir)
if len(botconfig.SpiceBot_AI.extra):

View File

@ -43,7 +43,7 @@ class BotJSONCommands():
dir_to_scan = []
for plugin_dir in set(sopel_modules.__path__):
configsdir = os.path.join(plugin_dir, "SpiceBot_Configs")
gifcfgdir = os.path.join(configsdir, "dictcoms")
gifcfgdir = os.path.join(configsdir, "SpiceBot_DictComs")
dir_to_scan.append(gifcfgdir)
if len(botconfig.SpiceBot_DictComs.extra):

View File

@ -39,7 +39,7 @@ class BotGif():
dir_to_scan = []
for plugin_dir in set(sopel_modules.__path__):
configsdir = os.path.join(plugin_dir, "SpiceBot_Configs")
gifcfgdir = os.path.join(configsdir, "gifapi")
gifcfgdir = os.path.join(configsdir, "SpiceBot_Gif")
dir_to_scan.append(gifcfgdir)
if len(botconfig.SpiceBot_Gif.extra):

View File

@ -0,0 +1,17 @@
# coding=utf8
from __future__ import unicode_literals, absolute_import, division, print_function
"""This is a method to read files, online and local, and cache them"""
import sopel_modules
class BotRead():
def __init__(self):
self.dict = dict()
def config_dir(self):
return
read = BotRead()

View File

@ -21,10 +21,10 @@ class Sherlock():
dir_to_scan = []
for plugin_dir in set(sopel_modules.__path__):
configsdir = os.path.join(plugin_dir, "SpiceBot_Configs")
usercfgdir = os.path.join(configsdir, "sherlock")
usercfgdir = os.path.join(configsdir, "SpiceBot_Sherlock")
dir_to_scan.append(usercfgdir)
valid_usernames_dict = read_directory_json_to_dict(dir_to_scan, "Gif API", "SpiceBot_Gif")
valid_usernames_dict = read_directory_json_to_dict(dir_to_scan, "Sherlock", "SpiceBot_Sherlock")
for social_network in list(valid_usernames_dict.keys()):
self.dict[social_network] = valid_usernames_dict[social_network]

Some files were not shown because too many files have changed in this diff Show More