#!/bin/bash PROGRAM="$(basename $0)" source $AK_LIBDIR/_ak_ipfs time_started=$(date -u +%s.%N) ss=$(echo $time_started | cut -d '.' -f 1) nss=$(echo $time_started | cut -d '.' -f 2) # Check if there are enough arguments if [ $# -lt 1 ] then echo "Error: Not enough arguments provided" echo "Give a zblock's IPFS CID v0 as an argument" exit 1 fi if [ -n "$1" ] then TEST="$(echo -n "$1" | grep -v '^Qm[A-Za-z0-9]\{44\}$')" if [ -n "$TEST" ] then echo not ok exit 1 fi fi arg="$(mktemp)" ak-enter -l 1 "$1" | jq '.[]' > $arg ( \ # Create HTML document echo "" echo "" echo "
" echo ""
echo " đĻ ZBLOCK" echo " | "
echo " "
echo " "
echo " "
echo " $zblock" echo "$(_ak_ipfs_cat $zblock | jq)" echo " | "
echo "
"
echo " đĻ BLOCK" echo " | "
echo " "
echo " "
echo " "
echo " $block" echo "$(_ak_ipfs_cat $block | jq)" echo " | "
echo "
"
echo " đ BLOCK SIGNATURE" echo " | "
echo " "
echo " "
echo " "
echo " $block_signature" echo "$(_ak_ipfs_cat $block_signature)" echo " | "
echo "
"
echo " â TIMESTAMP" echo " | "
echo " "
echo " $timestamp " echo " | "
echo "
"
echo " đ MODULE" echo " | "
echo " "
echo " $module " echo " | "
echo "
"
echo " đĒ§ ACTION" echo " | "
echo " "
echo " $action " echo " | "
echo "
"
echo " đ GPG" echo " | "
echo " "
echo " "
echo " "
echo " $gpg" echo "$(_ak_ipfs_cat $gpg)" echo " | "
echo "
"
echo " đĻ PREVIOUS" echo " | "
echo " " echo ' đ '$previous'' echo " | " echo "
"
echo " đĻ DATA" echo " | "
echo " "
echo " "
echo " "
echo " $data" echo "$datablock" echo " | "
echo "
"
echo " đ DATA_SIGNATURE" echo " | "
echo " "
echo " "
echo " "
echo " $detach" echo "$(_ak_ipfs_cat $detach)" echo " | "
echo "
"
echo " đ ipfs" echo " | "
echo " " echo ' 'đ $(echo $datablock | jq -r '.ipfs')'' echo " | " echo "
"
echo " đ detach" echo " | "
echo " "
echo " "
echo " "
echo " $(echo $datablock | jq -r '.detach')" echo "$(_ak_ipfs_cat $(echo $datablock | jq -r '.detach'))" echo " | "
echo "
đ Rendered ZBLOCK" echo "
$(cat $arg | jq)" fi time_ended=$(date -u +%s.%N) se=$(echo $time_ended | cut -d '.' -f 1) nse=$(echo $time_ended | cut -d '.' -f 2) echo "