From: Paul Hänsch Date: Mon, 13 Sep 2021 00:02:41 +0000 (+0200) Subject: helper script to synchronize index storages X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=f7cc4cdc95981eb199d782c426356d35f01e6d71;p=serve0 helper script to synchronize index storages --- 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