Update slixfeed.py
This commit is contained in:
parent
ba966c715f
commit
e9dfb60c45
1 changed files with 16 additions and 7 deletions
23
slixfeed.py
23
slixfeed.py
|
@ -560,13 +560,22 @@ def list_subscriptions(conn):
|
||||||
#sql = "SELECT id, address FROM feeds"
|
#sql = "SELECT id, address FROM feeds"
|
||||||
sql = "SELECT name, address, updated, id, status FROM feeds"
|
sql = "SELECT name, address, updated, id, status FROM feeds"
|
||||||
results = cur.execute(sql)
|
results = cur.execute(sql)
|
||||||
feeds_list = "List of subscriptions: \n"
|
if results.fetchone() is None:
|
||||||
for result in results:
|
# TODO Print the Slixfeed's JID .format(self.jid)
|
||||||
#feeds_list = feeds_list + '\n {}. {}'.format(str(result[0]), str(result[1]))
|
msg = ("List of subscriptions is empty. \n"
|
||||||
feeds_list += """\n{} \n{} \nLast updated: {} \nID: {} [{}]
|
"To add feed, send me a message as follows: \n"
|
||||||
""".format(str(result[0]), str(result[1]), str(result[2]),
|
"feed add URL \n"
|
||||||
str(result[3]), str(result[4]))
|
"For example: \n"
|
||||||
return feeds_list
|
"feed add https://reclaimthenet.org/feed/")
|
||||||
|
return msg
|
||||||
|
else:
|
||||||
|
feeds_list = "List of subscriptions: \n"
|
||||||
|
for result in results:
|
||||||
|
#feeds_list = feeds_list + '\n {}. {}'.format(str(result[0]), str(result[1]))
|
||||||
|
feeds_list += """\n{} \n{} \nLast updated: {} \nID: {} [{}]
|
||||||
|
""".format(str(result[0]), str(result[1]), str(result[2]),
|
||||||
|
str(result[3]), str(result[4]))
|
||||||
|
return feeds_list
|
||||||
|
|
||||||
def check_entry(conn, title, link):
|
def check_entry(conn, title, link):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue