aboutsummaryrefslogtreecommitdiff
path: root/lib/_ak_html
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_ak_html')
-rwxr-xr-xlib/_ak_html30
1 files changed, 25 insertions, 5 deletions
diff --git a/lib/_ak_html b/lib/_ak_html
index 38723c8..281790e 100755
--- a/lib/_ak_html
+++ b/lib/_ak_html
@@ -1,7 +1,26 @@
-#!/bin/bash
-source $AK_LIBDIR/_ak_log
+#!/usr/bin/env bash
+###
+### arching-kaos-tools
+### Tools to interact and build an Arching Kaos Infochain
+### Copyright (C) 2021 - 2025 kaotisk
+###
+### This program is free software: you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation, either version 3 of the License, or
+### (at your option) any later version.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program. If not, see <http://www.gnu.org/licenses/>.
+###
+source $AK_LIBDIR/_ak_lib_load
+_ak_lib_load _ak_log
-_ak_generate_html_header(){
+function _ak_generate_html_header(){
printf '<!DOCTYPE html>\n<html>\n<head>\n'
printf '<title>Arching Kaos Chain Data</title>\n'
printf ' <meta charset="UTF-8">\n'
@@ -64,7 +83,7 @@ _ak_generate_html_header(){
printf '<body>\n'
}
-_ak_generate_html_zblock(){
+function _ak_generate_html_zblock(){
if [ ! -z $1 ] && [ -n "$1" ]
then
arg="$1"
@@ -142,7 +161,6 @@ _ak_generate_html_zblock(){
_ak_log_error "Empty datablock value"
exit 1
fi
-
# Output data in HTML format
printf ' <h1>%s</h1>\n' "$PROGRAM"
printf ' <h2>🔎 %szblock</h2>\n' "$zblock"
@@ -288,3 +306,5 @@ _ak_generate_html_zblock(){
printf ' </table>\n'
fi
}
+
+_ak_log_debug "_ak_html loaded $(caller)"