#!/bin/bash # 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" | sed 's/Qm[A-Za-z0-9]\{44\}//g')" if [ -n "$test" ] then echo not ok exit 1 fi fi ak-enter -l 1 "$1" | jq '.[]' > tempz arg="tempz" ( \ # Create HTML document echo "" echo "
" echo "BLOCK SIGNATURE: $block_signature
" echo "$(ak-ipfs-cat $zblock | jq)" echo "
$(ak-ipfs-cat $block | jq)" echo "
TIMESTAMP: $timestamp
" echo "DETACH: $detach
" echo "$(ak-ipfs-cat $detach)" echo "
MODULE: $module
" echo "ACTION: $action
" echo "GPG: $gpg
" echo "$(ak-ipfs-cat $gpg)" echo "
PREVIOUS: $previous
" echo "$datablock" echo "
ipfs: $(echo $datablock | jq -r '.ipfs')
" echo "detach: $(echo $datablock | jq -r '.detach')
" echo "$(ak-ipfs-cat $(echo $datablock | jq -r '.detach'))" echo "
$(cat $arg | jq)" fi #done echo "" echo "" ) > zblock-$1.html rm tempz