aboutsummaryrefslogtreecommitdiffstats
path: root/genindice.awk
diff options
context:
space:
mode:
authorsejo <sejo@texto-plano.xyz>2021-05-20 17:58:00 -0500
committersejo <sejo@texto-plano.xyz>2021-05-20 17:58:00 -0500
commite2003fcc93d8cc25a85e55f12ef1044ca3a3bd1d (patch)
tree9ec6ec8f8626935e0667f389862687deddb948f6 /genindice.awk
parent5ee0826789dfc0beb432b29104a16b0480884b99 (diff)
downloadsitio-e2003fcc93d8cc25a85e55f12ef1044ca3a3bd1d.tar.gz
acomodando sitio
Diffstat (limited to 'genindice.awk')
-rw-r--r--genindice.awk21
1 files changed, 21 insertions, 0 deletions
diff --git a/genindice.awk b/genindice.awk
new file mode 100644
index 0000000..aa84f79
--- /dev/null
+++ b/genindice.awk
@@ -0,0 +1,21 @@
+# ls src/*gmo | awk -f genindice.awk
+
+function link2nombre( t ){ # convierte un nombre con "_" a uno con espacios
+ gsub("_"," ",t);
+ sub(".gmo", "", t)
+ return t
+}
+
+BEGIN{
+ print "# índice de páginas"
+ print
+}
+
+{
+ sub("src/","",$0)
+ nombre = link2nombre($0) # convierte _ a espacios
+ sub(".gmo",".gmi",$0)
+
+ if(nombre!="index") # no imprimas el índice
+ print "=> ./"$0" {"nombre"}"
+}
Un proyecto texto-plano.xyz