aboutsummaryrefslogtreecommitdiffstats
path: root/genindice.awk
diff options
context:
space:
mode:
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