automatically create bookmarks list

This commit is contained in:
Lionel Dricot 2022-03-31 11:00:55 +02:00
parent 97f31c0762
commit 9adfb955d7
1 changed files with 5 additions and 1 deletions

View File

@ -836,6 +836,7 @@ class GopherRenderer(AbstractRenderer):
if not path.startswith("/"):
path = "/"+path
url = "gopher://%s%s/%s%s" %(host,port,itemtype,path)
url = url.replace(" ","%20")
linkline = url + " " + name
links.append(linkline)
towrap = "[%s] "%len(links)+ name
@ -3450,7 +3451,10 @@ see "handler" command to set your own."""
If no argument given, URL is added to Bookmarks."""
args = line.split()
if len(args) < 1 :
self.list_add_line("bookmarks")
list = "bookmarks"
if not self.list_path(list):
self.list_create(list)
self.list_add_line(list)
else:
self.list_add_line(args[0])