From cc39f1ba2a78cabc3d8c8324cd5f59a1dfee4afd Mon Sep 17 00:00:00 2001 From: christian Sillaber Date: Wed, 31 Aug 2016 08:14:26 +0200 Subject: [PATCH] added option to open (a)ll search results --- buku | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/buku b/buku index c109e9e..6ab39d2 100755 --- a/buku +++ b/buku @@ -1237,9 +1237,9 @@ def prompt(results, noninteractive=False, delete=False): while True: try: - nav = input('Result number or range (x-y) to open: ') + nav = input('Result number or range (x-y,(a)ll) to open: ') if not nav: - nav = input('Result number or range (x-y) to open: ') + nav = input('Result number or range (x-y,(a)ll) to open: ') if not nav: # Quit on double enter break @@ -1257,6 +1257,13 @@ def prompt(results, noninteractive=False, delete=False): except Exception as e: _, _, linenumber, func, _, _ = inspect.stack()[0] logger.error('%s(), ln %d: %s', func, linenumber, e) + elif nav == "a": + for index in range(0,count): + try: + browser_open(unquote(results[index][1])) + except Exception as e: + _, _, linenumber, func, _, _ = inspect.stack()[0] + logger.error('%s(), ln %d: %s', func, linenumber, e) elif "-" in nav and is_int(nav.split("-")[0]) and is_int(nav.split("-")[1]): lower = int(nav.split("-")[0]) upper = int(nav.split("-")[1])