iens

Manager of links to read
git clone https://git.instinctive.eu/iens.git
Log | Files | Refs | README | LICENSE

commit 67ecdb5ec2bcff0acf7df0994b83f0ef6948fdfd
parent 5e228fda5ba877809d373561531aa61655306696
Author: Natasha Kerensikova <natgh@instinctive.eu>
Date:   Mon, 19 Feb 2024 18:45:29 +0000

Tag list is filtered through a count threshold
Diffstat:
Msrc/iens.scm | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/iens.scm b/src/iens.scm @@ -323,8 +323,9 @@ acc))) (reverse (append todo acc))))) -(defcmd (list-tags #!optional (cols 1)) - "[n-columns]" "List available tag, automatic tags are marked with *" +(defcmd (list-tags #!optional (cols 1) (threshold 0)) + "[n-columns [min-count]]" + "List available tag, automatic tags are marked with *" (apply for-each (lambda row (write-line (apply string-append row))) @@ -336,7 +337,8 @@ (conc name (if (zero? auto) " (" "* (") count ")"))) (sql db "SELECT name,auto,COUNT(tagrel.url_id) AS cnt FROM tag OUTER LEFT JOIN tagrel ON id=tagrel.tag_id - GROUP BY id ORDER BY name;")) + GROUP BY id HAVING cnt >= ? ORDER BY name;") + threshold) cols)))) (defcmd (remove-auto-tag name . rest)