From 1568fa2be103bd26b643133b1f68ae0dd7974134 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sat, 20 Jul 2024 17:30:27 +0300 Subject: new function _ak_zchain_extract_cids_limit() for future usage --- lib/_ak_zchain | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/_ak_zchain') diff --git a/lib/_ak_zchain b/lib/_ak_zchain index dd9400c..a5203a7 100755 --- a/lib/_ak_zchain +++ b/lib/_ak_zchain @@ -87,6 +87,16 @@ _ak_zchain_extract_cids(){ fi } +_ak_zchain_extract_cids_limit(){ + if [ ! -z $1 ] && [ -n "$1" ] && [ ! -z $2 ] && [ -n "$2" ] + + then + _ak_zchain_crawl -l $2 $1 | jq -M | grep Qm | sed -e 's/".*"://g; s/ //g; s/[{,"]//g' | sort | uniq + else + _ak_zchain_crawl | jq -M | grep Qm | sed -e 's/".*"://g; s/ //g; s/[{,"]//g' | sort | uniq + fi +} + _ak_zchain_extract_data_cids(){ if [ ! -z $1 ] then -- cgit v1.2.3