mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
config folder names
This commit is contained in:
parent
36884c7d4d
commit
9d1339f31a
@ -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):
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -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):
|
||||
|
||||
17
sopel_modules/SpiceBot/Read.py
Normal file
17
sopel_modules/SpiceBot/Read.py
Normal 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()
|
||||
@ -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
Loading…
Reference in New Issue
Block a user