From 63796ee701ae7ad72477abd4ebee50b1e0037d6b Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 16 Dec 2021 11:17:20 +0300 Subject: [PATCH] rcl no will disable abstracts. Replace abstracts with snippets. Add less --- recoll/bin/rcl | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/recoll/bin/rcl b/recoll/bin/rcl index feae293..00440ad 100755 --- a/recoll/bin/rcl +++ b/recoll/bin/rcl @@ -1,18 +1,20 @@ #!/bin/sh +[ "$1" = "no" ] && shift || args="-A -p 2" + cd ~/recoll -idx="-c main" +args="$args -c main" while : ; do [ -d "$1" ] || break - idx="$idx -i $1/xapiandb" + args="$args -i $1/xapiandb" shift done -recollq $idx -A "$@" 2>/dev/null | perl -ne ' - if (/^ABSTRACT/../^\/ABSTRACT/) { - print "\t$_" unless /^.?ABSTRACT/; +recollq $args "$@" 2>/dev/null | perl -ne ' + if (/^(ABSTRACT|SNIPPETS)/../^\/(ABSTRACT|SNIPPETS)/) { + print "\t$_" unless /^.?(ABSTRACT|SNIPPETS)/; next; }; next unless /^(.*)\t\[file:\/\/(.*)\]\t\[.*\]\t\d+\t.*\t.*$/; print "$2\t$1\n"; -' | spc -e grn,"(^/.*)" +' | spc -e grn,"(^/.*)" | less -- 2.44.0