From f7cc4cdc95981eb199d782c426356d35f01e6d71 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Mon, 13 Sep 2021 02:02:41 +0200 Subject: [PATCH] helper script to synchronize index storages --- index2post.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 index2post.sh diff --git a/index2post.sh b/index2post.sh new file mode 100755 index 0000000..5fdf9ca --- /dev/null +++ b/index2post.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +REQUEST_METHOD=manual +. "${_EXEC:-${0%/*}}/cgilite/cgilite.sh" +. "${_EXEC}/cgilite/storage.sh" + +find "${_DATA}" -path '*/.index/meta' -exec cat '{}' + \ +| while read l w h t c n; do + printf '?op=add&select=%s' "/$(URL "$(UNSTRING "${n%$CR}")"*)" + printf "&tag=%s" $(printf %s "${t#tags=}" |tr , \ ) + printf \\n +done -- 2.39.2