summaryrefslogtreecommitdiff
path: root/parse.awk
diff options
context:
space:
mode:
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);
}