From b98c3fb1c46f6be09a1a5860340822ae9f5a6ecd Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 10 Jul 2025 18:58:30 +0200 Subject: Reformatting awk --- convert.awk | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) (limited to 'convert.awk') diff --git a/convert.awk b/convert.awk index a36801e..f06c187 100644 --- a/convert.awk +++ b/convert.awk @@ -1,31 +1,18 @@ -BEGIN { - line=0; -} - -# NR==1,/Amalie Skram\. I\./ { next } - # Footer -/^ *[0-9]* *Constance *Ring *[0-9]* *$/ { next } +/^ *[0-9]* *Constance *Ring *[0-9]* *$/ { + next +} # Mark chapters /^ *([IVX][IVX]*)\.* *$/ { - gsub(/ */, "") - gsub(/\./, "") - print "" - print "# Kapittel " $0 - print "" - next + gsub(/ */, "") + gsub(/\./, "") + print "" + print "# Kapittel " $0 + print "" + next } { -# # Format paragaph starts -# gsub(/^ */, "\n") -# -# # Remove leading space -# gsub(/^ */, "") -# -# # Remove excessive inline space -# gsub(/ */, " ") -# - print + print } -- cgit v1.2.3