From b587c1d94ade7723bcda82d6befc64adc7fc088d Mon Sep 17 00:00:00 2001 From: kaotisk Date: Mon, 10 Jun 2024 17:30:41 +0300 Subject: (new flags) ak zchain: --crawl-[self]|[remote-ipfs]|[remote-ipns] --- bin/ak-zchain | 8 ++++++++ lib/_ak_zchain | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/bin/ak-zchain b/bin/ak-zchain index 2a60b37..c2ecbc6 100755 --- a/bin/ak-zchain +++ b/bin/ak-zchain @@ -34,6 +34,11 @@ ## ## --calculate-size Calculates the size of a zchain ## +## --crawl-self Crawls the local zchain +## +## --crawl-remote-ipfs Crawls a remote zchain +## +## --crawl-remote-ipns Crawls a remote zchain from ipns key ## fullprogrampath="$(realpath $0)" PROGRAM=$(basename $0) @@ -54,6 +59,9 @@ if [ ! -z $1 ]; then --extract-cids) _ak_zchain_extract_cids $2; exit;; --extract-data-cids) _ak_zchain_extract_data_cids $2; exit;; --calculate-size) _ak_zchain_calculate_size $2; exit;; + --crawl-self) _ak_zchain_crawl_self; exit;; + --crawl-remote-ipfs) _ak_zchain_crawl_remote_ipfs $2; exit;; + --crawl-remote-ipns) _ak_zchain_crawl_remote_ipns $2; exit;; * ) _ak_usage;; esac else _ak_usage diff --git a/lib/_ak_zchain b/lib/_ak_zchain index 8ba431d..a652a31 100755 --- a/lib/_ak_zchain +++ b/lib/_ak_zchain @@ -119,3 +119,15 @@ _ak_zchain_calculate_size(){ cd ~ rm -rf $temp } + +_ak_zchain_crawl_self(){ + ak enter +} + +_ak_zchain_crawl_remote_ipfs(){ + ak enter $1 +} + +_ak_zchain_crawl_remote_ipns(){ + ak enter -n $1 +} -- cgit v1.2.3