class BucketSection(StaticSection): # TODO some validation rules maybe? db_host = ValidatedAttribute('db_host', str, default='localhost') db_user = ValidatedAttribute('db_user', str, default='bucket') db_pass = ValidatedAttribute('db_pass', str) db_name = ValidatedAttribute('db_name', str, default='bucket') inv_size = ValidatedAttribute('inv_size', default='15')
class PhabricatorSection(StaticSection): host = ValidatedAttribute('host', str) api_token = ListAttribute('api_token', str) querykey = ListAttribute('querykey', str) highpri_notify = ValidatedAttribute('highpri_notify', bool) highpri_channel = ValidatedAttribute('highpri_channel', str) datafile = ValidatedAttribute('datafile', str)
class UrbanTerrorSection(StaticSection): """UrbanTerror server host. Default to localhost.""" server_host = ValidatedAttribute('server_host', str, default='localhost') """UrbanTerror server port. Default to 27960.""" server_port = ValidatedAttribute('server_port', int, default=27960) """UrbanTerror server rcon password.""" rcon_password = ValidatedAttribute('rcon_password', str)
class SafetySection(StaticSection): enabled_by_default = ValidatedAttribute('enabled_by_default', bool, default=True) """Enable URL safety in all channels where it isn't explicitly disabled.""" known_good = ListAttribute('known_good') """List of "known good" domains to ignore.""" vt_api_key = ValidatedAttribute('vt_api_key') """Optional VirusTotal API key."""
class StatusSection(StaticSection): """Create configuration for Sopel.""" datafile = ValidatedAttribute('datafile', str) bot_username = ValidatedAttribute('bot_username', str) bot_password = ValidatedAttribute('bot_password', str) support_channel = ValidatedAttribute('support_channel', str)
class UrlSection(StaticSection): # TODO some validation rules maybe? exclude = ListAttribute('exclude') exclusion_char = ValidatedAttribute('exclusion_char', default='!') shorten_url_length = ValidatedAttribute('shorten_url_length', int, default=0)
class CurrencySection(StaticSection): fixer_io_key = ValidatedAttribute('fixer_io_key', default=None) """Optional API key for Fixer.io (increases currency support)""" auto_convert = ValidatedAttribute('auto_convert', parse=bool, default=False) """Whether to convert currencies without an explicit command"""
class TellSection(StaticSection): use_private_reminder = ValidatedAttribute('use_private_reminder', parse=bool, default=False) """When set to ``true``, Sopel will send reminder as private message.""" maximum_public = ValidatedAttribute('maximum_public', parse=int, default=4) """How many Sopel can send in public before using private message."""
class AdminSection(StaticSection): hold_ground = ValidatedAttribute('hold_ground', bool, default=False) """Auto re-join on kick""" auto_accept_invite = ValidatedAttribute('auto_accept_invite', bool, default=True) """Auto-join channels when invited"""
class TwitterSection(StaticSection): consumer_key = ValidatedAttribute('consumer_key', default=NO_DEFAULT) consumer_secret = ValidatedAttribute('consumer_secret', default=NO_DEFAULT) show_quoted_tweets = BooleanAttribute('show_quoted_tweets', default=True) alternate_domains = ListAttribute( "alternate_domains", default=["vxtwitter.com", "nitter.net"], )
class PhabricatorSection(StaticSection): """Set up configuration for Sopel.""" querykey = ListAttribute('querykey', str) api_token = ListAttribute('api_token', str) highpri_notify = BooleanAttribute('highpri_notify') highpri_channel = ValidatedAttribute('highpri_channel', str) datafile = ValidatedAttribute('datafile', str)
class WeatherSection(StaticSection): here_url = ValidatedAttribute( 'here_url', default="https://geocoder.api.here.com/6.2/geocode.json") here_app_id = ValidatedAttribute('here_app_id', default=None) here_app_code = ValidatedAttribute('here_app_code', default=None) darksky_url = ValidatedAttribute( "darksky_url", default="https://api.darksky.net/forecast") darksky_key = ValidatedAttribute("darksky_key", default=None)
class SteamStatusSection(StaticSection): blacklist = ListAttribute('blacklist') url = ValidatedAttribute('url', default='https://crowbar.steamstat.us/Barney') user_agent = ValidatedAttribute( 'user_agent', default= 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0' )
class UrlSection(StaticSection): # TODO some validation rules maybe? exclude = ListAttribute('exclude') """A list of regular expressions to match URLs for which the title should not be shown.""" exclusion_char = ValidatedAttribute('exclusion_char', default='!') """A character (or string) which, when immediately preceding a URL, will stop that URL's title from being shown.""" shorten_url_length = ValidatedAttribute( 'shorten_url_length', int, default=0) """If greater than 0, the title fetcher will include a TinyURL version of links longer than this many characters."""
class TimeSection(StaticSection): tz = ValidatedAttribute('tz', parse=validate_timezone, serialize=validate_timezone, default='UTC') """Default time zone (see https://sopel.chat/tz)""" time_format = ValidatedAttribute('time_format', parse=validate_format, default='%Y-%m-%d - %T%Z') """Default time format (see http://strftime.net)"""
class KpopsundrySection(StaticSection): ogs_username = ValidatedAttribute('ogs_username') ogs_password = ValidatedAttribute('ogs_password') ogs_client_id = ValidatedAttribute('ogs_client_id') ogs_client_secret = ValidatedAttribute('ogs_client_secret') kps_strim_client_id = ValidatedAttribute('kps_strim_client_id') kps_strim_client_secret = ValidatedAttribute('kps_strim_client_secret') kps_strim_callback_uri = ValidatedAttribute('kps_strim_callback_uri') google_api_key = ValidatedAttribute('google_api_key') ollehtv_device_id = ValidatedAttribute('ollehtv_device_id') ollehtv_svc_pw = ValidatedAttribute('ollehtv_svc_pw')
class TwitterSection(StaticSection): consumer_key = ValidatedAttribute('consumer_key', str, default='undefined') consumer_secret = ValidatedAttribute('consumer_secret', str, default='undefined') access_token_key = ValidatedAttribute('access_token_key', str, default='undefined') access_token_secret = ValidatedAttribute('access_token_secret', str, default='undefined')
class WeatherSection(StaticSection): geocoords_provider = ValidatedAttribute('geocoords_provider', str, default='LocationIQ') geocoords_api_key = ValidatedAttribute('geocoords_api_key', str, default='') weather_provider = ValidatedAttribute('weather_provider', str, default='DarkSky') weather_api_key = ValidatedAttribute('weather_api_key', str, default='')
class MbtiSection(StaticSection): descs = [ 'http://personalitycafe.com/intp-forum-thinkers/94751-intp-jungian-cognitive-function-analysis.htm', 'http://www.intp.org/intprofile.html', 'http://www.personalitydesk.com/intp', 'http://www.16personalities.com/intp-personality' ] subreddit = 'https://reddit.com/r/INTP' famous = 'http://www.celebritytypes.com/intp.php' descriptions = ValidatedAttribute('descriptions', list, default=descs) famous = ValidatedAttribute('famous', str, default=famous) subreddit = ValidatedAttribute('subreddit', str, default=subreddit)
class WeatherSection(StaticSection): geocoords_provider = ValidatedAttribute('geocoords_provider', str, default='locationiq') geocoords_api_key = ValidatedAttribute('geocoords_api_key', str, default='') weather_provider = ChoiceAttribute('weather_provider', WEATHER_PROVIDERS, default=NO_DEFAULT) weather_api_key = ValidatedAttribute('weather_api_key', str, default='') sunrise_sunset = ValidatedAttribute('sunrise_sunset', str, default=False)
class LogToolsSection(StaticSection): '''Data class containing the parameters for the module.''' google_api_key_password = ValidatedAttribute('google_api_key_password') admin_channels = ListAttribute('admin_channels') acceptable_fuzz_ratio = ValidatedAttribute('acceptable_fuzz_ratio', int, default=75) spreadsheet_id = ValidatedAttribute('spreadsheet_id') relevant_sheets = ListAttribute('relevant_sheets') relevant_range = ValidatedAttribute('relevant_range') sheet_fields = ListAttribute('sheet_fields') line_report_format = ValidatedAttribute('line_report_format', str)
class GithubSection(StaticSection): client_id = ValidatedAttribute('client_id', default=None) secret = ValidatedAttribute('secret', default=None) webhook = ValidatedAttribute('webhook', bool, default=False) webhook_host = ValidatedAttribute('webhook_host', default='0.0.0.0') webhook_port = ValidatedAttribute('webhook_port', default='3333') external_url = ValidatedAttribute( 'external_url', default='http://your_ip_or_domain_here:3333') webhook_notices = ValidatedAttribute('webhook_notices', bool, default=False) url_parsing = ValidatedAttribute('url_parsing', bool, default=True) issue_parsing = ValidatedAttribute('issue_parsing', bool, default=True) commit_limit = ValidatedAttribute('commit_limit', int, default=3)
class CTFSection(StaticSection): """Config section for CTF information""" uname = ValidatedAttribute('uname', default='b01lers') """The username for logging into CTFs""" email = ValidatedAttribute('email', default='*****@*****.**') """Email used to login for CTFs""" passwd = ValidatedAttribute('passwd') """Password used to login for CTFS""" teamid = ValidatedAttribute('teamid') """The Team ID code for joining team"""
class RemeSection(StaticSection): '''A class containing the configuration parameters for the module.''' admin_channels = ListAttribute('admin_channels') allowed_channels = ListAttribute('allowed_channels') days_before_forgotten = ValidatedAttribute('days_before_forgotten', int, default=14) minimum_time_seconds = ValidatedAttribute('minimum_time_seconds', int, default=7200) minimum_line_number = ValidatedAttribute('minimum_line_number', int, default=30) sass_list = ListAttribute('sass_list') db_path = FilenameAttribute('db_path')
class UrlSection(StaticSection): # TODO some validation rules maybe? exclude = ListAttribute('exclude') """A list of regular expressions to match URLs for which the title should not be shown.""" exclusion_char = ValidatedAttribute('exclusion_char', default='!') """A character (or string) which, when immediately preceding a URL, will stop that URL's title from being shown.""" shorten_url_length = ValidatedAttribute( 'shorten_url_length', int, default=0) """If greater than 0, the title fetcher will include a TinyURL version of links longer than this many characters.""" enable_private_resolution = ValidatedAttribute( 'enable_private_resolution', bool, default=False) """Enable URL lookups for RFC1918 addresses""" enable_dns_resolution = ValidatedAttribute( 'enable_dns_resolution', bool, default=False) """Enable DNS resolution for all domains to validate if there are RFC1918 resolutions"""
class HelpSection(StaticSection): """Configuration section for this module.""" output = ChoiceAttribute('output', list(PASTEBIN_PROVIDERS), default='clbin') """The pastebin provider to use for help output.""" show_server_host = ValidatedAttribute('show_server_host', bool, default=True) """Show the IRC server's hostname/IP in the first line of the help listing?"""
class ChanlogsSection(StaticSection): dir = FilenameAttribute('dir', directory=True, default='~/chanlogs') """Path to channel log storage directory""" by_day = ValidatedAttribute('by_day', parse=bool, default=True) """Split log files by day""" privmsg = ValidatedAttribute('privmsg', parse=bool, default=False) """Record private messages""" microseconds = ValidatedAttribute('microseconds', parse=bool, default=False) """Microsecond precision""" localtime = ValidatedAttribute('localtime', parse=bool, default=False) """Attempt to use preferred timezone instead of UTC""" ## TODO: Allow configuration of templates, perhaps the user would like to use ## parsers that support only specific formats. message_template = ValidatedAttribute('message_template', default=None) action_template = ValidatedAttribute('action_template', default=None) join_template = ValidatedAttribute('join_template', default=None) part_template = ValidatedAttribute('part_template', default=None) quit_template = ValidatedAttribute('quit_template', default=None) nick_template = ValidatedAttribute('nick_template', default=None)
class MeetbotSection(StaticSection): meeting_log_path = FilenameAttribute('meeting_log_path', directory=True, default='~/www/meetings') """Path to meeting logs storage directory This should be an absolute path, accessible on a webserver.""" meeting_log_baseurl = ValidatedAttribute( 'meeting_log_baseurl', default='http://localhost/~sopel/meetings') """Base URL for the meeting logs directory"""
class HelpSection(StaticSection): """Configuration section for this plugin.""" output = ChoiceAttribute('output', list(PASTEBIN_PROVIDERS), default='clbin') """The pastebin provider to use for help output.""" reply_method = ChoiceAttribute('reply_method', REPLY_METHODS, default='channel') """Where/how to reply to help commands (public/private).""" show_server_host = ValidatedAttribute('show_server_host', bool, default=True) """Show the IRC server's hostname/IP in the first line of the help listing?"""
class GitHubSection(StaticSection): client_id = ValidatedAttribute('client_id', default=None) client_secret = ValidatedAttribute('client_secret', default=None) secret = ValidatedAttribute( 'secret', default=None) # TODO remove in 0.3.0 or thereabouts webhook = ValidatedAttribute('webhook', bool, default=False) webhook_host = ValidatedAttribute('webhook_host', default='0.0.0.0') webhook_port = ValidatedAttribute('webhook_port', default='3333') external_url = ValidatedAttribute( 'external_url', default='http://your_ip_or_domain_here:3333')