aboutsummaryrefslogtreecommitdiffstats
path: root/genindice.awk
blob: aa84f796187d27fdc254db452a7fc10f2e65d8cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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