From 54a6cf3bba10027f2cf9d7d641b667c8d9a400ea Mon Sep 17 00:00:00 2001 From: kaotisk Date: Wed, 28 Feb 2024 08:32:20 +0200 Subject: Refactoring --- bin/ak-get-ipfs-hashes-from-my-zchain | 2 -- bin/ak-get-only-ipfs-key-values-from-our-or-a-zchain | 8 -------- bin/ak-get-only-ipfs-key-values-from-our-zchain | 3 --- bin/ak-news | 2 +- bin/ak-zchain-extract-data-cids | 8 ++++++++ 5 files changed, 9 insertions(+), 14 deletions(-) delete mode 100755 bin/ak-get-ipfs-hashes-from-my-zchain delete mode 100755 bin/ak-get-only-ipfs-key-values-from-our-or-a-zchain delete mode 100755 bin/ak-get-only-ipfs-key-values-from-our-zchain create mode 100755 bin/ak-zchain-extract-data-cids (limited to 'bin') diff --git a/bin/ak-get-ipfs-hashes-from-my-zchain b/bin/ak-get-ipfs-hashes-from-my-zchain deleted file mode 100755 index 4d60d13..0000000 --- a/bin/ak-get-ipfs-hashes-from-my-zchain +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -ak-enter | jq -M | grep Qm | sed -e 's/{"zblock":"//g; s/",//; s/".*".*: "//g; s/"//g; s/{//g; s/://g; s/ //g' diff --git a/bin/ak-get-only-ipfs-key-values-from-our-or-a-zchain b/bin/ak-get-only-ipfs-key-values-from-our-or-a-zchain deleted file mode 100755 index 303d595..0000000 --- a/bin/ak-get-only-ipfs-key-values-from-our-or-a-zchain +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# Outputs all the "ipfs" values from the DATA blocks of our ZCHAIN -if [ ! -z $1 ] -then - ak-enter $1 | jq | grep ipfs | awk '{print $2}' | sed -e 's/"//g;s/,//g' -else - ak-enter | jq | grep ipfs | awk '{print $2}' | sed -e 's/"//g;s/,//g' -fi diff --git a/bin/ak-get-only-ipfs-key-values-from-our-zchain b/bin/ak-get-only-ipfs-key-values-from-our-zchain deleted file mode 100755 index 747bb55..0000000 --- a/bin/ak-get-only-ipfs-key-values-from-our-zchain +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -# Outputs all the "ipfs" values from the DATA blocks of our ZCHAIN -ak-enter | jq | grep ipfs | awk '{print $2}' | sed -e 's/"//g;s/,//g' | sort | uniq diff --git a/bin/ak-news b/bin/ak-news index d6f0660..1f265de 100755 --- a/bin/ak-news +++ b/bin/ak-news @@ -43,7 +43,7 @@ _ak_modules_news_create(){ _ak_modules_news_index(){ FILES="$(ls -1 $ZNEWSDIR)" i=0 - ak-get-ipfs-hashes-from-my-zchain | sort | uniq > temp + ak-zchain-extract-cids | sort | uniq > temp for FILE in $FILES do DATE="$(echo $FILE | cut -d - -f 1 | awk '{print $1}')" diff --git a/bin/ak-zchain-extract-data-cids b/bin/ak-zchain-extract-data-cids new file mode 100755 index 0000000..303d595 --- /dev/null +++ b/bin/ak-zchain-extract-data-cids @@ -0,0 +1,8 @@ +#!/bin/bash +# Outputs all the "ipfs" values from the DATA blocks of our ZCHAIN +if [ ! -z $1 ] +then + ak-enter $1 | jq | grep ipfs | awk '{print $2}' | sed -e 's/"//g;s/,//g' +else + ak-enter | jq | grep ipfs | awk '{print $2}' | sed -e 's/"//g;s/,//g' +fi -- cgit v1.2.3