From 286b71a6ead8c7234cfbc0b8ece05c8239a4f32c Mon Sep 17 00:00:00 2001 From: kaotisk Date: Wed, 29 Mar 2023 23:45:49 +0300 Subject: Renamed everything --- bin/ak2html | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 bin/ak2html (limited to 'bin/ak2html') diff --git a/bin/ak2html b/bin/ak2html new file mode 100755 index 0000000..1fb0114 --- /dev/null +++ b/bin/ak2html @@ -0,0 +1,45 @@ +#!/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 "" + -- cgit v1.2.3