From faee6e1809594f8f1243002e75f2cb611ac22877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 7 Jun 2021 20:00:48 +0200 Subject: Dillo: Add 'bm' script bm automatically re-arranges new bookmarks. --- home/john/.dillo/bm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 home/john/.dillo/bm diff --git a/home/john/.dillo/bm b/home/john/.dillo/bm new file mode 100755 index 0000000..cc26f23 --- /dev/null +++ b/home/john/.dillo/bm @@ -0,0 +1,27 @@ +#!/bin/sh + +# bm -- re-arrange dillo bookmarks + +awk -F: ' + /^s0 / { + sub(/^s0 /, "") + new[i++] = $0 + next + } + { + print + } + /^:/ { + sub(/^ */, "", $3) + section[$3] = $2 + } + END { + if(section["Archive"]==""){ + print "error: section Archive not found" > "/dev/stderr" + exit 1 + } + for(j = 0; j ~/.dillo/bm.tmp && +mv ~/.dillo/bm.tmp ~/.dillo/bm.txt -- cgit v1.2.3