more feedback from subscribe
This commit is contained in:
parent
af57715f99
commit
b0a2961acc
30
offpunk.py
30
offpunk.py
|
@ -2915,21 +2915,21 @@ fetched and added to your next tour.
|
||||||
To unsubscribe, remove the page from the "subscribed" list."""
|
To unsubscribe, remove the page from the "subscribed" list."""
|
||||||
subs = self.gi.get_subscribe_links()
|
subs = self.gi.get_subscribe_links()
|
||||||
if len(subs) > 1:
|
if len(subs) > 1:
|
||||||
stri = "Multiple feeds have been found :\n\n"
|
stri = "Multiple feeds have been found :\n"
|
||||||
counter = 0
|
|
||||||
for l in subs:
|
|
||||||
link = self.gi.absolutise_url(l[0])
|
|
||||||
stri += "[%s] %s [%s]\n"%(counter+1,link,l[1])
|
|
||||||
counter += 1
|
|
||||||
stri += "\n\n"
|
|
||||||
stri += "Which feed do you want to subsribe ? > "
|
|
||||||
ans = input(stri)
|
|
||||||
if ans.isdigit() and 0 < int(ans) <= len(subs):
|
|
||||||
sublink,mime,title = subs[int(ans)-1]
|
|
||||||
else:
|
|
||||||
sublink,title = None,None
|
|
||||||
else:
|
else:
|
||||||
sublink,mime,title = subs[0]
|
stri = "No feed detected. You can still watch the page :\n"
|
||||||
|
counter = 0
|
||||||
|
for l in subs:
|
||||||
|
link = self.gi.absolutise_url(l[0])
|
||||||
|
stri += "[%s] %s [%s]\n"%(counter+1,link,l[1])
|
||||||
|
counter += 1
|
||||||
|
stri += "\n"
|
||||||
|
stri += "Which feed do you want to subsribe ? > "
|
||||||
|
ans = input(stri)
|
||||||
|
if ans.isdigit() and 0 < int(ans) <= len(subs):
|
||||||
|
sublink,mime,title = subs[int(ans)-1]
|
||||||
|
else:
|
||||||
|
sublink,title = None,None
|
||||||
if sublink:
|
if sublink:
|
||||||
sublink = self.gi.absolutise_url(sublink)
|
sublink = self.gi.absolutise_url(sublink)
|
||||||
gi = GeminiItem(sublink,name=title)
|
gi = GeminiItem(sublink,name=title)
|
||||||
|
@ -2939,6 +2939,8 @@ To unsubscribe, remove the page from the "subscribed" list."""
|
||||||
print("Subscribed to %s" %sublink)
|
print("Subscribed to %s" %sublink)
|
||||||
else:
|
else:
|
||||||
print("You are already subscribed to %s"%sublink)
|
print("You are already subscribed to %s"%sublink)
|
||||||
|
else:
|
||||||
|
print("No subscription registered")
|
||||||
|
|
||||||
def do_bookmarks(self, line):
|
def do_bookmarks(self, line):
|
||||||
"""Show or access the bookmarks menu.
|
"""Show or access the bookmarks menu.
|
||||||
|
|
Loading…
Reference in New Issue