#!/bin/bash
# Check if there are enough arguments
if [ $# -lt 1 ]
then
echo "Error: Not enough arguments provided"
exit 1
fi
# Create HTML document
echo ""
echo "
"
echo " Arching Kaos Chain Data"
echo ""
echo ""
# Iterate through each argument and parse data
for arg in "$@"
do
# Extract data from argument
zblock=$(echo $arg | jq -r '.zblock')
block=$(echo $arg | jq -r '.block')
timestamp=$(echo $arg | jq -r '.timestamp')
block_signature=$(echo $arg | jq -r '.block_signature')
detach=$(echo $arg | jq -r '.detach')
module=$(echo $arg | jq -r '.module')
action=$(echo $arg | jq -r '.action')
gpg=$(echo $arg | jq -r '.gpg')
previous=$(echo $arg | jq -r '.previous')
# Output data in HTML format
echo " ZBLOCK: $zblock
"
echo " BLOCK: $block
"
echo " TIMESTAMP: $timestamp
"
echo " BLOCK SIGNATURE: $block_signature
"
echo " DETACH: $detach
"
echo " MODULE: $module
"
echo " ACTION: $action
"
echo " GPG: $gpg
"
echo " PREVIOUS: $previous
"
done
echo ""
echo ""