From 5992644735138034b221398f73f4e97d56500e33 Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Tue, 4 Sep 2018 10:49:01 +0100 Subject: added README.md and removed debugging messages --- parse.awk | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'parse.awk') diff --git a/parse.awk b/parse.awk index e725532..db83b49 100644 --- a/parse.awk +++ b/parse.awk @@ -10,11 +10,10 @@ BEGIN{ delete link; ### configurable variables - BASEDIR="./"; - ROOTFILE="./lawn/index.gph"; - ROOTSEL="/lawn/index.gph"; - HOST="localhost"; - PORT="1500"; + BASEDIR="./"; # the folder where the hierarchy will be created + ROOTSEL="/lawn/index.gph"; # the selector of the root page (back) + HOST="localhost"; # the default host + PORT="1500"; # and the default port } function is_empty(a){ @@ -39,7 +38,6 @@ function add_category(c){ function get_cur(cur){ - #print "cur[Type]:", cur["Type"]; switch (cur["Type"]) { case "": { print "empty type -- skipping record"; @@ -63,7 +61,6 @@ function get_cur(cur){ /^[A-Z][-a-zA-Z]+:/{## New field - #print "Field:",$1,"-","Value:",$2 gsub(/^ +/,"",$2); gsub(/ *$/,"",$2); cur[$1]=$2; @@ -86,18 +83,10 @@ function get_cur(cur){ } END{ -## for (i=1;i<=cnum;i++){ -## printf("[1%s|%s|%s|%s]\r\n", category[i,"LinkName"], category[i,"Selector"], \ -## category[i,"Host"], category[i,"Port"]); -## } - render_init(); render_categories(category, cnum); render_post_categories(category, cnum); render_links(category, cnum, link, lnum); render_finalise(category, cnum, link, lnum); - ##render_links(link, lnum, cfiles); - #for (k in cnames) - # print k, cnames[k]; - + dump_links(category, cnum, link, lnum); } -- cgit v1.2.3