Fix configuration and allow commenting unused keys
This commit is contained in:
parent
8dcff0b2fe
commit
386b10ae15
3 changed files with 13 additions and 32 deletions
|
@ -20,4 +20,4 @@ Simone "roughnecks" Canaletti
|
||||||
|
|
||||||
Strix from Loqi
|
Strix from Loqi
|
||||||
|
|
||||||
Slixmpp participants amf #python members who explicitly chose to remain anonymous or not to appear in this list.
|
Slixmpp participants and #python members who explicitly chose to remain anonymous or not to appear in this list.
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
# and also from which accounts it receives instructions.
|
# and also from which accounts it receives instructions.
|
||||||
|
|
||||||
[XMPP]
|
[XMPP]
|
||||||
# JID of bot master
|
|
||||||
operator =
|
operator =
|
||||||
reconnect_timeout = 30
|
reconnect_timeout = 30
|
||||||
type = client
|
type = client
|
||||||
|
@ -12,10 +11,8 @@ type = client
|
||||||
alias = Slixfeed
|
alias = Slixfeed
|
||||||
jid =
|
jid =
|
||||||
password =
|
password =
|
||||||
# Hostname (also address) may be an i2p or onion hostname
|
#hostname =
|
||||||
hostname =
|
#port =
|
||||||
# Port may be 5347
|
|
||||||
port =
|
|
||||||
|
|
||||||
[XMPP Component]
|
[XMPP Component]
|
||||||
alias = Slixfeed
|
alias = Slixfeed
|
||||||
|
@ -41,77 +38,61 @@ birthday = 21 June 2022
|
||||||
# NOTE Consider not to use a version number as it might give an
|
# NOTE Consider not to use a version number as it might give an
|
||||||
# impression of an archaic feature in the future.
|
# impression of an archaic feature in the future.
|
||||||
|
|
||||||
# Example hostname 127.0.0.1
|
#socks5_host =
|
||||||
socks5_host =
|
#socks5_port =
|
||||||
# Example port 9050
|
|
||||||
socks5_port =
|
|
||||||
#socks5_username =
|
#socks5_username =
|
||||||
#socks5_password =
|
#socks5_password =
|
||||||
# NOTE Consider renaming key proxy_enabled to socks5_enabled
|
|
||||||
# NOTE Consider removing proxy_enabled key (if you want to enable just comment)
|
|
||||||
proxy_enabled = 1
|
|
||||||
|
|
||||||
[ActivityPub]
|
[ActivityPub]
|
||||||
# Not yet implemented
|
|
||||||
username =
|
username =
|
||||||
password =
|
password =
|
||||||
operator =
|
operator =
|
||||||
|
|
||||||
[Email]
|
[Email]
|
||||||
# Not yet implemented
|
|
||||||
recipient_emails =
|
recipient_emails =
|
||||||
sender_emails =
|
sender_emails =
|
||||||
|
|
||||||
[IMAP]
|
[IMAP]
|
||||||
# Not yet implemented
|
|
||||||
username =
|
username =
|
||||||
password =
|
password =
|
||||||
# port = 993
|
#port = 993
|
||||||
|
|
||||||
[SMTP]
|
[SMTP]
|
||||||
# Not yet implemented
|
|
||||||
host =
|
host =
|
||||||
# port = 465
|
#port = 465
|
||||||
|
|
||||||
[IRC]
|
[IRC]
|
||||||
# Not yet implemented
|
|
||||||
username =
|
username =
|
||||||
password =
|
password =
|
||||||
# port = 6667
|
#port = 6667
|
||||||
operator =
|
operator =
|
||||||
|
|
||||||
[LXMF]
|
[LXMF]
|
||||||
# Not yet implemented
|
|
||||||
username =
|
username =
|
||||||
password =
|
password =
|
||||||
operator =
|
operator =
|
||||||
|
|
||||||
[Matrix]
|
[Matrix]
|
||||||
# Not yet implemented
|
|
||||||
username =
|
username =
|
||||||
password =
|
password =
|
||||||
operator =
|
operator =
|
||||||
|
|
||||||
[Nostr]
|
[Nostr]
|
||||||
# Not yet implemented
|
|
||||||
username =
|
username =
|
||||||
password =
|
password =
|
||||||
operator =
|
operator =
|
||||||
|
|
||||||
[Session]
|
[Session]
|
||||||
# Not yet implemented
|
|
||||||
username =
|
username =
|
||||||
password =
|
password =
|
||||||
operator =
|
operator =
|
||||||
|
|
||||||
[SIP]
|
[SIP]
|
||||||
# Not yet implemented
|
|
||||||
username =
|
username =
|
||||||
password =
|
password =
|
||||||
operator =
|
operator =
|
||||||
|
|
||||||
[TOX]
|
[TOX]
|
||||||
# Not yet implemented
|
|
||||||
username =
|
username =
|
||||||
password =
|
password =
|
||||||
operator =
|
operator =
|
||||||
|
|
|
@ -62,23 +62,23 @@ def get_value(filename, section, keys):
|
||||||
if isinstance(keys, list):
|
if isinstance(keys, list):
|
||||||
result = []
|
result = []
|
||||||
for key in keys:
|
for key in keys:
|
||||||
try:
|
if key in section_res:
|
||||||
value = section_res[key]
|
value = section_res[key]
|
||||||
logging.debug(
|
logging.debug(
|
||||||
"Found value {} for key {}".format(value, key)
|
"Found value {} for key {}".format(value, key)
|
||||||
)
|
)
|
||||||
except:
|
else:
|
||||||
value = ''
|
value = ''
|
||||||
logging.error("Missing key:", key)
|
logging.debug("Missing key:", key)
|
||||||
result.extend([value])
|
result.extend([value])
|
||||||
elif isinstance(keys, str):
|
elif isinstance(keys, str):
|
||||||
key = keys
|
key = keys
|
||||||
try:
|
if key in section_res:
|
||||||
result = section_res[key]
|
result = section_res[key]
|
||||||
logging.debug(
|
logging.debug(
|
||||||
"Found value {} for key {}".format(result, key)
|
"Found value {} for key {}".format(result, key)
|
||||||
)
|
)
|
||||||
except:
|
else:
|
||||||
result = ''
|
result = ''
|
||||||
# logging.error("Missing key:", key)
|
# logging.error("Missing key:", key)
|
||||||
if result == None:
|
if result == None:
|
||||||
|
|
Loading…
Reference in a new issue