Skip to content
Joshua Haas edited this page Jan 30, 2017 · 4 revisions

By default, sibyl does not join any rooms, and just opens a Command Line Interface (CLI). To get sibyl to join a chat room, control XBMC, or search your media library you'll have to edit its configuration file. You must always set the protocols option, although some protocols may add additional required options. For detailed explanations about config options, see sibyl.conf.default.

Examples

This project includes two example config files; both must be copied or renamed to be called sibyl.conf to use them. The first, sibyl.conf.default, contains the default values of every config option included in this repository. To modify them, first remove the # at the beginning of the line then change the value. This file also contains descriptions of each option. The second, sibyl.conf.example, does not have any explanation and has some basic options that most users will find useful. Note that you must still edit it for the bot to work. You also have the option of creating a blank file called sibyl.conf and editing that.

Syntax

Sibyl's behavior is mostly controlled using the configuation file. It's in the form of Windows INI files, so generally you have one entry per line that looks like option = value. Values can span multiple lines, which can be nice for options that take a list. Finally, any line starting with # is a comment and will be ignored by Sibyl. Comments can also be made at the end of a line using ; as long as it is preceeded by white space. For example:

opt1 = val1 ; this text will be ignored
opt2 = v
       a
# this line will be ignored
       l
       2

Any options that Sibyl doesn't recognize will also be ignored. For example, if you had the below in the config file, Sibyl would ignore it and just log a warning to let you know (handy if you misspell something).

n3h9f8scj3 = whatidonteven

Finally, you can define your own variables for use in the config file. Just make sure not to use the name of an actual config option. These variables can be referenced using %(NAME)s to make things more readable or prevent having to type something over and over again. As a simple example, the values for opt1 and opt2 will be the same. The values for opt3 and opt4 will also be the same.

primes = 3, 5, 7, 11, 13
evens = 2, 6, 8, 10, 12
others = 0, 1, 4, 6, 9

opt1 = 0, 1, 4, 6, 9
opt2 = %(others)s

opt3 = 3, 5, 7, 11, 13, 2, 6, 8, 10, 12, 0, 1, 4, 6, 9
opt4 = %(primes)s, %(evens)s, %(others)s

Developers

Sibyl's config framework uses Python's ConfigParser.SafeConfigParser to read the options and values from the config file as strings. It then runs the config option's parse, valid, and post functions if present to arrive at the final value. For more details on adding your own config options read through Adding Config Options on the Plug-In Development page.

Clone this wiki locally