diff options
| author | Trygve Laugstøl <trygvis@inamo.no> | 2025-07-10 18:58:30 +0200 |
|---|---|---|
| committer | Trygve Laugstøl <trygvis@inamo.no> | 2025-07-10 18:58:30 +0200 |
| commit | b98c3fb1c46f6be09a1a5860340822ae9f5a6ecd (patch) | |
| tree | 201de8afbf27052a6bd6866569c4915e0a910325 /convert.awk | |
| parent | a1a68049744768403f63e6e2806eb79dff9522c6 (diff) | |
| download | constance-ring-b98c3fb1c46f6be09a1a5860340822ae9f5a6ecd.tar.gz constance-ring-b98c3fb1c46f6be09a1a5860340822ae9f5a6ecd.tar.bz2 constance-ring-b98c3fb1c46f6be09a1a5860340822ae9f5a6ecd.tar.xz constance-ring-b98c3fb1c46f6be09a1a5860340822ae9f5a6ecd.zip | |
Reformatting awk
Diffstat (limited to 'convert.awk')
| -rw-r--r-- | convert.awk | 33 |
1 files changed, 10 insertions, 23 deletions
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 } |
