From f4263aeee0f5b02dbcc541509b49e67bc7b6f8b7 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Thu, 18 Jul 2024 03:17:17 +0300 Subject: removed ak-enter (hint: ak-zchain --crawl-*) --- README | 1 - bin/ak-enter | 122 ----------------------------------------------------------- 2 files changed, 123 deletions(-) delete mode 100755 bin/ak-enter diff --git a/README b/README index aae8780..ffaaf37 100644 --- a/README +++ b/README @@ -260,7 +260,6 @@ Utilities - ak-log # Logging tools - ak-clean # Cleans up temporary folders created by these tools - ak-config # Publish your configuration to IPNS - - ak-enter # Crawls ZCHAINS - ak-get-zlatest # Returns zlatest ZBLOCK according to IPFS FS - ak-gpg # Return your GPG key as IPFS CID - ak-network # Network Tools (connect to, scan for, dump peers) diff --git a/bin/ak-enter b/bin/ak-enter deleted file mode 100755 index e5b8fbc..0000000 --- a/bin/ak-enter +++ /dev/null @@ -1,122 +0,0 @@ -#!/bin/bash -# ak-enter -# -# Using this tool, we can seek a whole zchain, if available from -# an IPFS CID or an IPNS link. -# -# Default (no arguments) will retrieve the local ZCHAIN starting -# from the IPFS CID stored in the file that is tracked by the -# $AK_ZLATEST environment variable. -# -# ak-enter [-n IPNS_LINK] -# ak-enter [IPFS CID] -# ak-enter -N -# ak-enter -h -# ak-enter -## ak-enter [-N | --no-verify] [-l | --limit ] [zblock] -## ak-enter [-N | --no-verify] [-l | --limit ] -n -## Usage: -## --help, -h Print this help and exit -## --chain , -n Crawl specified chain -## --no-verify, -N Don't verify signatures -## Specify IPFS CID for entrance -## -## Note that combined flags don't work for now -## Running with no flags crawls your chain based on AK_ZLATEST environment -## variable -# -# Returns a JSON array representing the chain retrieved. -# Logs messages to $LOGSFILE. - -fullprogrampath="$(realpath $0)" -PROGRAM="$(basename $0)" -descriptionString="Crawl an arching kaos chain" -source $AK_LIBDIR/_ak_log -source $AK_LIBDIR/_ak_script -source $AK_LIBDIR/_ak_ipfs -source $AK_LIBDIR/_ak_gpg -source $AK_LIBDIR/_ak_zblock - -# Start of tests -#entrance="QmW5WVXCJfhb4peHG6cbEdamC24vZzMX2Vz386vpENh38U" -#entrance="QmNjQq7GkuXGF8kFT1z2Mv3i4JhY7sBXVUmHDiR1zkQjoE" -#entrance="QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH" -# End of tests -entrance="$(cat $AK_ZLATEST)" - -verify=1 -limit=0 -fromIpns=0 - -while [ "$#" ]; do - case "$1" in - -h | --help) - _ak_usage - ;; - -l | --limit) - limit=$2 - shift 2 - ;; - -N | --no-verify) - verify=0 - shift - ;; - -n | --chain | --ipns) - fromIpns=1 - ipns=$1 - shift - ol=$1 - entrance="$(_ak_ipns_resolve $1)" - if [ $? -ne 0 ] - then - _ak_log_error "Could not resolve IPNS name" - exit 1 - fi - shift - ;; - *) - test="$1" - if [ ! -z "$test" ] && [ $fromIpns -eq 0 ] - then - _ak_ipfs_cid_v0_check "$test" - entrance="$test" - elif [ -z "$entrance" ] && [ $fromIpns -eq 1 ] - then - entrance="$(cat $AK_ZLATEST)" - fi - break - esac -done - -# We assign the IPFS CIDv0 of an empty file as this is used -# as our GENESIS block, hence the "seed" that the tree grows -# from. -seed="$(cat $AK_ZGENESIS)" - -# We assume that we found the entrance inside a block, hence -# ZBLOCK is labeled as previous -zblock="$entrance" - -# Enter temp folder -TEMPASSIN="$(_ak_make_temp_directory)" -cd $TEMPASSIN -counter=0 - -# The loop -# We break the loop from inside the loop -while true -do - if [ $counter -eq 0 ] - then - echo -n '[' - fi - counter=$(($counter + 1)) - _ak_zblock_show "$zblock" - if [ $limit -ne 0 ] && [ $limit -eq $counter ] - then - echo -n ']' - exit 0 - else - echo -n ',' - fi -done -- cgit v1.2.3