forked from sch/Slixfeed
Add new command: options
This commit is contained in:
parent
ffa002cfa0
commit
ba61250f84
5 changed files with 22 additions and 3 deletions
|
@ -1190,6 +1190,7 @@ async def view_entry(url, num):
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
|
# TODO get all active feeds of active accounts and scan the feed with the earliest scanned time
|
||||||
# TODO Rename function name (idea: scan_and_populate)
|
# TODO Rename function name (idea: scan_and_populate)
|
||||||
async def scan(self, jid_bare, db_file, url):
|
async def scan(self, jid_bare, db_file, url):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -203,6 +203,12 @@ stop
|
||||||
Disable bot and stop updates.
|
Disable bot and stop updates.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
[options]
|
||||||
|
options = """
|
||||||
|
options
|
||||||
|
List options.
|
||||||
|
"""
|
||||||
|
|
||||||
[preview]
|
[preview]
|
||||||
read = """
|
read = """
|
||||||
read <url>
|
read <url>
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
__version__ = '0.1.35'
|
__version__ = '0.1.36'
|
||||||
__version_info__ = (0, 1, 35)
|
__version_info__ = (0, 1, 36)
|
||||||
|
|
|
@ -2126,7 +2126,6 @@ class Slixfeed(slixmpp.ClientXMPP):
|
||||||
e_key = e_key.capitalize()
|
e_key = e_key.capitalize()
|
||||||
# form.add_field(ftype='fixed',
|
# form.add_field(ftype='fixed',
|
||||||
# value=e_val)
|
# value=e_val)
|
||||||
print(type(e_val))
|
|
||||||
if e_key == 'Name':
|
if e_key == 'Name':
|
||||||
form.add_field(ftype='fixed',
|
form.add_field(ftype='fixed',
|
||||||
value=e_val)
|
value=e_val)
|
||||||
|
|
|
@ -829,6 +829,19 @@ async def message(self, message):
|
||||||
db_file, key, val)
|
db_file, key, val)
|
||||||
response = 'All items of newly added feeds be delivered.'
|
response = 'All items of newly added feeds be delivered.'
|
||||||
XmppMessage.send_reply(self, message, response)
|
XmppMessage.send_reply(self, message, response)
|
||||||
|
case 'options':
|
||||||
|
response = 'Options:\n```'
|
||||||
|
for key in self.settings[jid_bare]:
|
||||||
|
val = self.settings[jid_bare][key] or self.settings['default'][key]
|
||||||
|
# val = Config.get_setting_value(self.settings, jid_bare, key)
|
||||||
|
steps = 11 - len(key)
|
||||||
|
pulse = ''
|
||||||
|
for step in range(steps):
|
||||||
|
pulse += ' '
|
||||||
|
response += '\n' + key + pulse + ': ' + str(val)
|
||||||
|
print(response)
|
||||||
|
response += '\n```'
|
||||||
|
XmppMessage.send_reply(self, message, response)
|
||||||
case _ if message_lowercase.startswith('quantum'):
|
case _ if message_lowercase.startswith('quantum'):
|
||||||
key = message_text[:7]
|
key = message_text[:7]
|
||||||
val = message_text[8:]
|
val = message_text[8:]
|
||||||
|
|
Loading…
Reference in a new issue