---------------------------------------- Reshaped gopherhole December 18th, 2020 ---------------------------------------- In between a cloud deployment and the other, I started to look into gaining more control on my gopherhole, as I mentioned in the previous post. The phlog part is handled by burrow, while the remaining part is now built according to a makefile I made for the purpose. The makefile compiles files having a ".in" suffix into the final files that constitute my gopherhole. The compilation is handled by an awk script, whose current version can be find at the bottom of this very post. Basically, it offers some convenience in writing gophermap files, in a similar way as a static blog engine works. I've also added a link page, that I plan to use as a bookmarking for useful resources that I find around. Currently I've put them just a couple, but I should probably complete with all the others, that I've jotted down over time. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #!/usr/bin/awk -f BEGIN { FS = "|" hostname = "tilde.institute"; port = "70"; root = "~dacav"; } function info() { printf "i%s\t\t%s\t%s\n", $0, hostname, port; return 1; } function link() { if (NF <= 1 || length($1) > 1) return 0; if (NF < 3) return error(sprintf("broken link: %d fields", NF)); sub(/:root:/, root, $3); if (NF < 4) $4 = hostname else sub(/:hostname:/, hostname, $4); if (NF < 5) $5 = port else sub(/:port:/, port, $5); printf "%s%s\t%s\t%s\t%s\n", $1, $2, $3, $4, $5; return 1; } function error(message) { printf "3%s\t\t%s\t%s\n", message, hostname, port; } { # Skip comments. if (substr($1, 1, 1) == "#") next; # Verbatim if (substr($1, 1, 1) == ">") { sub(/^>/, ""); info(); next; } link() || info(); }