summaryrefslogtreecommitdiffstats
path: root/doc/updt.sh
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2016-11-21 23:25:02 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2016-12-05 16:23:48 +0100
commit71d4728f61f2b650449838a6d96034697a36736d (patch)
tree3800ebc0df774021500cb26b1f93c19af0cac2cb /doc/updt.sh
parent2a2a9835cfe31a495020c79b0eeadbddb70f52ae (diff)
Fix typo, get diagrams pictures and reordering doc
Change-Id: Id8327460cf59b330283a98db8cef3a89ef505d30 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'doc/updt.sh')
-rwxr-xr-xdoc/updt.sh53
1 files changed, 0 insertions, 53 deletions
diff --git a/doc/updt.sh b/doc/updt.sh
deleted file mode 100755
index d0c02e7a..00000000
--- a/doc/updt.sh
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/bash
-
-title() {
- sed '/^[ \t]*$/d' "$1" |
- sed '/^===/Q' |
- sed '/^---/Q' |
- sed 's/^# //;T;Q' |
- sed 's/^## //;T;Q' |
- sed '/^---/Q'
-}
-
-authors() {
- git log --numstat --format='A %aN' -- "$1" |
- awk '$1=="A"{sub(/^A /,"");a=$0; s[a]+=0; next}NF==3{s[a]+=($1+0)}END{for(a in s)print s[a]" : "a}' |
- sort -nr |
- sed 's/[^:]* : //' |
- sed '1!s/^/; /' |
- tr -d '\n'
-}
-
-dateof() {
- local file="$1"
- local t=$(git log -n 1 --format=%ct "$file")
- [[ -n "$t" ]] || t=$(stat -c %Y "$file")
- LANG= date -d @$t +"%d %B %Y"
-}
-
-meta() {
- local file="$1"
- local t=$(title "$file")
- local a=$(authors "$file")
- local d=$(dateof "$file")
- echo "% $t"
- echo "% $a"
- echo "% $d"
- cat "$file"
-}
-
-
-# make the html file for $1
-mkhtml() {
- local x=$1
- local h=${x%%.md}.html
- echo updating $h from $x
- meta "$x" |
- pandoc --css doc.css -f markdown -t html5 --toc > "$h"
-}
-
-# apply
-for x in *.md; do
- mkhtml $x
-done
-