diff options
Diffstat (limited to 'modules/title.py')
| -rw-r--r-- | modules/title.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/modules/title.py b/modules/title.py index a6e924cc..709b59ba 100644 --- a/modules/title.py +++ b/modules/title.py @@ -5,16 +5,12 @@ import hashlib, re, urllib.parse from src import EventManager, ModuleManager, utils -@utils.export("channelset", {"setting": "auto-title", - "help": "Disable/Enable automatically getting info titles from URLs", - "validate": utils.bool_or_none, "example": "on"}) -@utils.export("channelset", {"setting": "title-shorten", - "help": "Enable/disable shortening URLs when getting their title", - "validate": utils.bool_or_none, "example": "on"}) -@utils.export("channelset", {"setting": "auto-title-first", - "help": ("Enable/disable showing who first posted a URL that was " - "auto-titled"), - "validate": utils.bool_or_none, "exaple": "on"}) +@utils.export("channelset", utils.BoolSetting("auto-title", + "Disable/Enable automatically getting info titles from URLs")) +@utils.export("channelset", utils.BoolSetting("title-shorten", + "Enable/disable shortening URLs when getting their title")) +@utils.export("channelset", utils.BoolSetting("auto-title-first", + "Enable/disable showing who first posted a URL that was auto-titled")) class Module(ModuleManager.BaseModule): def _url_hash(self, url): return "sha256:%s" % hashlib.sha256(url.lower().encode("utf8") |
