zeal_awk_docset/genindex.awk

15 lines
168 B
Awk
Raw Normal View History

2023-05-31 10:09:07 +00:00
BEGIN { OFS="\t"}
NR%2 == 1 { # path
split($0, A, "/")
path = A[length(A)]
next
}
NR%2==0 { # title
title = $0
print NR/2, title, "Section", path
next
}