Mercurial > libervia-backend
comparison src/plugins/plugin_misc_extra_pep.py @ 1728:0eaa1a409dfb
plugin XEP-0277, EXTRA-PEP: get massive blogs from all the roster also retrieve items from a special JIDs list defined in EXTRA-PEP
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 08 Dec 2015 17:41:34 +0100 |
parents | |
children | cc31dd72526d |
comparison
equal
deleted
inserted
replaced
1727:68e498b3367e | 1728:0eaa1a409dfb |
---|---|
1 #!/usr/bin/python | |
2 # -*- coding: utf-8 -*- | |
3 | |
4 # SAT plugin for displaying messages from extra PEP services | |
5 # Copyright (C) 2015 Adrien Cossa (souliane@mailoo.org) | |
6 | |
7 # This program is free software: you can redistribute it and/or modify | |
8 # it under the terms of the GNU Affero General Public License as published by | |
9 # the Free Software Foundation, either version 3 of the License, or | |
10 # (at your option) any later version. | |
11 | |
12 # This program is distributed in the hope that it will be useful, | |
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 # GNU Affero General Public License for more details. | |
16 | |
17 # You should have received a copy of the GNU Affero General Public License | |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 | |
20 from sat.core.i18n import _ | |
21 from sat.core.log import getLogger | |
22 log = getLogger(__name__) | |
23 | |
24 | |
25 PLUGIN_INFO = { | |
26 "name": "Extra PEP", | |
27 "import_name": "EXTRA-PEP", | |
28 "type": "MISC", | |
29 "protocols": [], | |
30 "dependencies": [], | |
31 "recommendations": ['XEP-0277'], | |
32 "main": "ExtraPEP", | |
33 "handler": "no", | |
34 "description": _(u"""Display messages from extra PEP services""") | |
35 } | |
36 | |
37 CONFIG_SECTION = "plugin extra pep" | |
38 | |
39 default_conf = {"get_items_from_list": ["salut-a-toi@libervia.org"], } | |
40 | |
41 | |
42 class ExtraPEP(object): | |
43 | |
44 def __init__(self, host): | |
45 log.info(_(u"Plugin Extra PEP initialization")) | |
46 self.host = host | |
47 | |
48 def getConfig(self, name): | |
49 return self.host.memory.getConfig(CONFIG_SECTION, name, default_conf[name]) |