From df9b21af0c6787277bb06c50a7598f57a4b6ced3 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Mon, 11 Nov 2019 01:44:15 +0100 Subject: [PATCH] :art: Update --- docs/BuildingTheDocs.mdr | 9 +++++++-- docs/Contributors.mdr | 7 +++++++ docs/Reference/ControlFlow/ControlFlow.mdr | 4 ---- docs/list | 3 +++ scripts/ensure.sh | 3 ++- scripts/mdr2mdbook.sh | 4 +++- scripts/summary.sh | 4 ++-- scripts/watch.sh | 5 +++-- 8 files changed, 27 insertions(+), 12 deletions(-) create mode 100644 docs/Contributors.mdr delete mode 100644 docs/Reference/ControlFlow/ControlFlow.mdr diff --git a/docs/BuildingTheDocs.mdr b/docs/BuildingTheDocs.mdr index 99190c1c..e71e25b1 100644 --- a/docs/BuildingTheDocs.mdr +++ b/docs/BuildingTheDocs.mdr @@ -1,7 +1,12 @@ # How this doc is build -## mdr +## This is basically markdown +All documentation files are in docs. +They are [mdr](https://github.com/fennecdjay/mdr) files. +Along with them is a `list` file, helping to build the summary. ## makefile -## mkdocs +## sciprt + +## Mdbook diff --git a/docs/Contributors.mdr b/docs/Contributors.mdr new file mode 100644 index 00000000..2865f150 --- /dev/null +++ b/docs/Contributors.mdr @@ -0,0 +1,7 @@ +# Contributors + +@exec git show "master:README.md" > master_readme.md + +@exec sed "$(/usr/bin/cat -n master_readme.md | grep "ALL-CONTRIBUTOR" | cut -f1 | tr '\n' '\t' | sed 's/\t/,/')!d" master_readme.md + +@exec rm master_readme.md diff --git a/docs/Reference/ControlFlow/ControlFlow.mdr b/docs/Reference/ControlFlow/ControlFlow.mdr deleted file mode 100644 index 2e9c1854..00000000 --- a/docs/Reference/ControlFlow/ControlFlow.mdr +++ /dev/null @@ -1,4 +0,0 @@ -# Control Flow - -## Repeats -let start simple ;-) diff --git a/docs/list b/docs/list index 56157449..a6e92973 100644 --- a/docs/list +++ b/docs/list @@ -6,3 +6,6 @@ Contributing Benchmarks.md BuildingTheDocs.md + +----- +Contributors.md diff --git a/scripts/ensure.sh b/scripts/ensure.sh index b836f707..82bd905f 100644 --- a/scripts/ensure.sh +++ b/scripts/ensure.sh @@ -4,8 +4,9 @@ cat < book.toml [book] authors = ["Jérémie Astor"] title = "Gwion" -theme = "rust" + [output.html] +default-theme = "rust" additional-css = ["custom.css"] [output.html.fold] diff --git a/scripts/mdr2mdbook.sh b/scripts/mdr2mdbook.sh index 0997cb6a..c0a1e51b 100644 --- a/scripts/mdr2mdbook.sh +++ b/scripts/mdr2mdbook.sh @@ -35,6 +35,8 @@ runall() { } if [ $1 ] -then doc2src $1 +#then [[ $1 == *".mdr" ]] && doc2src $1 +then [ -f $1 ] && doc2src $1 +echo $1 else runall fi diff --git a/scripts/summary.sh b/scripts/summary.sh index 6fded10e..2ad29231 100644 --- a/scripts/summary.sh +++ b/scripts/summary.sh @@ -30,8 +30,8 @@ entry() { handle() { while read -r line do - if [ -z "$line" ] - then echo "" + if [ -z "$line" ] || [[ "$line" == "-----"* ]] + then echo "$line" continue fi if [ -f "$1/${line}r" ] diff --git a/scripts/watch.sh b/scripts/watch.sh index 5943fa7f..50088aaa 100644 --- a/scripts/watch.sh +++ b/scripts/watch.sh @@ -5,6 +5,7 @@ wait() { } while true -do [[ $1 == *".mdr" ]] && - sh scripts/mdr2mdbook.sh $(wait); +do + file=$(wait) + sh scripts/mdr2mdbook.sh $file; done -- 2.43.0