diff options
1 files changed, 6 insertions, 0 deletions
| -rw-r--r-- | demo/awk-scripts/Blog-info.awk | 6 |
diff --git a/demo/awk-scripts/Blog-info.awk b/demo/awk-scripts/Blog-info.awk new file mode 100644 index 0000000..89e044a --- /dev/null +++ b/demo/awk-scripts/Blog-info.awk @@ -0,0 +1,6 @@ +# .*blog/.*/.*\.html +# Adds an element with date created, date edited and estimated read time below h1 + +/<h1/ { + $0 = $0 ORS "<div>Created: " created " | Last edited: " edited " | Read time: " (int(words / 180)+1) " min</div>" +} |
