Fix bookmarking.
This commit is contained in:
parent
ddb3a5a893
commit
f6a8f20a07
13
av98.py
13
av98.py
|
@ -860,13 +860,14 @@ Optionally, specify the new name for the bookmark."""
|
||||||
def do_bookmarks(self, *args):
|
def do_bookmarks(self, *args):
|
||||||
"""Show the current bookmarks menu.
|
"""Show the current bookmarks menu.
|
||||||
Bookmarks are stored in the ~/.av98-bookmarks.txt file."""
|
Bookmarks are stored in the ~/.av98-bookmarks.txt file."""
|
||||||
file_name = "~/.av98-bookmarks.txt"
|
bm_file = os.path.expanduser("~/.av98-bookmarks.txt")
|
||||||
if not os.path.isfile(os.path.expanduser(file_name)):
|
if not os.path.exists(bm_file):
|
||||||
print("You need to 'add' some bookmarks, first")
|
print("You need to 'add' some bookmarks, first!")
|
||||||
else:
|
else:
|
||||||
gi = GeminiItem(None, None, os.path.expanduser(file_name),
|
with open(bm_file, "r") as fp:
|
||||||
file_name)
|
body = fp.read()
|
||||||
self._go_to_gi(gi)
|
gi = GeminiItem("file://localhost/" + bm_file)
|
||||||
|
self._handle_index(body, gi)
|
||||||
|
|
||||||
### Help
|
### Help
|
||||||
def do_help(self, arg):
|
def do_help(self, arg):
|
||||||
|
|
Loading…
Reference in New Issue