diff --git a/README.md b/README.md index 93cae5a..962b012 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,7 @@ EDIT OPTIONS: clears description, if no arguments --immutable N disable web-fetch during auto-refresh N=0: mutable (default), N=1: immutable + --preserve [...] values to preserve for -u SEARCH OPTIONS: -s, --sany [...] find records with ANY matching keyword @@ -453,10 +454,13 @@ PROMPT KEYS: buku (? for help) g > 5 3-2 // remove tags at taglist indices 4 and 6-9 from tags in bookmarks at indices 5 and 2-3 buku (? for help) g 4 9-6 << 5 3-2 -37. List bookmarks with **colored output**: +37. **Update** URL but **Preserve** title + + $ buku -u 479 --preserve title --url https://example.com +38. List bookmarks with **colored output**: $ buku --colors oKlxm -p -38. More **help**: +39. More **help**: $ buku -h $ man buku diff --git a/buku b/buku index f6ea257..2f16b3f 100755 --- a/buku +++ b/buku @@ -795,6 +795,7 @@ class BukuDb: tag_modified = False ret = False + preserve_title = False if preserve is not None: for option in preserve: if option == "url": @@ -805,6 +806,7 @@ class BukuDb: desc = None elif option == "title": title_in = None + preserve_title = True # Update URL if passed as argument if url is not None and url != '': @@ -871,7 +873,7 @@ class BukuDb: ptags = None if title_in is not None: title_to_insert = title_in - elif url is not None and url != '': + elif url is not None and url != '' and not preserve_title: title_to_insert, pdesc, ptags, mime, bad = network_handler(url) if bad: print('Malformed URL')