summaryrefslogtreecommitdiff
path: root/parse.awk
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2018-09-04 10:49:01 +0100
committerKatolaZ <katolaz@freaknet.org>2018-09-04 10:49:01 +0100
commit5992644735138034b221398f73f4e97d56500e33 (patch)
tree417f92d6b037f5ea3c3cf1d046f412a27e00c5f0 /parse.awk
parentb4c015b23c34870243b75ca75fa824cf3452b471 (diff)
added README.md and removed debugging messages
Diffstat (limited to 'parse.awk')
-rw-r--r--parse.awk21
1 files changed, 5 insertions, 16 deletions
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);
}