pyGBot.ini "channel" option fixes #37

Closed
Laogeodritt opened this Issue Jul 14, 2012 · 4 comments

Comments

Projects
None yet
3 participants
@Laogeodritt
Member

Laogeodritt commented Jul 14, 2012

Current "channel" option spec/behaviour in pyGBot.ini:

  • pyGBot.ini comments state not to quote the value (i.e. not to use field = "value").
  • channel parameter requires a space-separated list of channels without leading # character.
  • The # character is considered to begin an inline comment when used on a value line (by ConfigObj). It is interpreted as a literal character iff the value is quoted (i.e. ̀field = "value with a # character in it"` will interpret the literal # character as part of the value).
  • It is not possible to join a channel with a double-hash prefix, e.g. ##electronics, which is common on some networks like freenode.

Proposed changes:

  • Remove the line in the default ini comments stating not to use value quotes.
  • channel parameter shall require a space-separated list of channels with the leading # character (regular channel name), and MUST be placed in quotes for it to work. Edit the instructions to that effect.

ConfigObj reference: http://www.voidspace.org.uk/python/configobj.html

Submitting this as a todo when I find time for pyGBot, more or less. Feel free to pick this up if you want, though; the changes are fairly mundane.

@Dritz

This comment has been minimized.

Show comment
Hide comment
@Dritz

Dritz Feb 5, 2013

Member

I might pick this up myself soon, as a warmup to get me back into development.

Member

Dritz commented Feb 5, 2013

I might pick this up myself soon, as a warmup to get me back into development.

@ghost ghost assigned Dritz Feb 5, 2013

@chaos95

This comment has been minimized.

Show comment
Hide comment
@chaos95

chaos95 Feb 5, 2013

Member

Maybe we should just switch to YAML or JSON for config :P

Member

chaos95 commented Feb 5, 2013

Maybe we should just switch to YAML or JSON for config :P

@Dritz

This comment has been minimized.

Show comment
Hide comment
@Dritz

Dritz Feb 5, 2013

Member

YAML might work, but isn't JSON not as readable?

Either way, a rework like that should probably be filed under "someday maybe". This fix will be easy, at least.

Member

Dritz commented Feb 5, 2013

YAML might work, but isn't JSON not as readable?

Either way, a rework like that should probably be filed under "someday maybe". This fix will be easy, at least.

@Laogeodritt

This comment has been minimized.

Show comment
Hide comment
@Laogeodritt

Laogeodritt Feb 5, 2013

Member

JSON is fairly readable if formatted nicely (... does the spec allow extra whitespace?), just requires a hell of a lot of extraneous quotation marks. (Not as bad as XML! Ugh, so verbose for no reason.) I would suggest against it for the reason that it's a bit too strict for hand-edited configuration; I'd rather go with a more leniently-specified language.

YAML might work. It represents arbitrary objects, so we might be able to organize everything decently.

I also think it'd be a good idea to separate out plugin configuration files so that third-party or separately-shipped plugins could ship with default/annotated plugins, instead of having to merge into the main bot config.

... again, all cursory ideas that should probably be submitted as enhancements XD

Member

Laogeodritt commented Feb 5, 2013

JSON is fairly readable if formatted nicely (... does the spec allow extra whitespace?), just requires a hell of a lot of extraneous quotation marks. (Not as bad as XML! Ugh, so verbose for no reason.) I would suggest against it for the reason that it's a bit too strict for hand-edited configuration; I'd rather go with a more leniently-specified language.

YAML might work. It represents arbitrary objects, so we might be able to organize everything decently.

I also think it'd be a good idea to separate out plugin configuration files so that third-party or separately-shipped plugins could ship with default/annotated plugins, instead of having to merge into the main bot config.

... again, all cursory ideas that should probably be submitted as enhancements XD

@Dritz Dritz closed this in 4c10f69 Feb 5, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment