From e830805af26f321ddb87487caef08ce343bcf989 Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Tue, 5 May 2020 20:47:18 +0200 Subject: [PATCH] change auto generate --- README.md | 2 ++ raw/{body_android.md => android/body.md} | 0 raw/{header_android.md => android/header.md} | 0 raw/{ => default}/body.md | 3 ++ raw/{ => default}/header.md | 0 raw/generate.sh | 30 ++++++++++--------- .../body.md} | 0 .../header.md} | 4 +-- selfhosted.md | 2 +- 9 files changed, 24 insertions(+), 17 deletions(-) rename raw/{body_android.md => android/body.md} (100%) rename raw/{header_android.md => android/header.md} (100%) rename raw/{ => default}/body.md (98%) rename raw/{ => default}/header.md (100%) rename raw/{body_selfhosted.md => selfhosted/body.md} (100%) rename raw/{header_selfhosted.md => selfhosted/header.md} (66%) diff --git a/README.md b/README.md index a13bf58..5047b7d 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,8 @@ Links**](./selfhosted.md). - [**aria2**](https://aria2.github.io/) Lightweight multi-protocol & multi-source command-line download utility + - [**curl**](https://curl.haxx.se/) + Command line tool and library for transferring data with URLs - [**Mosh**](https://mosh.org/) Remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and diff --git a/raw/body_android.md b/raw/android/body.md similarity index 100% rename from raw/body_android.md rename to raw/android/body.md diff --git a/raw/header_android.md b/raw/android/header.md similarity index 100% rename from raw/header_android.md rename to raw/android/header.md diff --git a/raw/body.md b/raw/default/body.md similarity index 98% rename from raw/body.md rename to raw/default/body.md index 3702d9e..c019963 100644 --- a/raw/body.md +++ b/raw/default/body.md @@ -94,6 +94,9 @@ Nerdy : Lightweight multi-protocol & multi-source command-line download utility +[**curl**](https://curl.haxx.se/) +: Command line tool and library for transferring data with URLs + [**Mosh**](https://mosh.org/) : Remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and diff --git a/raw/header.md b/raw/default/header.md similarity index 100% rename from raw/header.md rename to raw/default/header.md diff --git a/raw/generate.sh b/raw/generate.sh index 66cbc3c..5701b80 100755 --- a/raw/generate.sh +++ b/raw/generate.sh @@ -1,17 +1,19 @@ #!/bin/sh -# Cleanup files -pandoc header.md -o header.md -pandoc body.md -o body.md -pandoc header_android.md -o header_android.md -pandoc body_android.md -o body_android.md -pandoc header_selfhosted.md -o header_selfhosted.md -pandoc body_selfhosted.md -o body_selfhosted.md +function generate { + HEADER=./$1/header.md + BODY=./$1/body.md + OUT=../$2.md + + # Cleanup files + pandoc $HEADER -o $HEADER + pandoc $BODY -o $BODY -# Generate README.md and android.md -pandoc -H header.md --toc body.md -o ../README.md -pandoc -t gfm ../README.md -o ../README.md -pandoc -H header_android.md --toc body_android.md -o ../android.md -pandoc -t gfm ../android.md -o ../android.md -pandoc -H header_selfhosted.md --toc body_selfhosted.md -o ../selfhosted.md -pandoc -t gfm ../selfhosted.md -o ../selfhosted.md + # Generate output file + pandoc -H $HEADER --toc $BODY -o $OUT + pandoc -t gfm $OUT -o $OUT +} + +generate "default" "README" +generate "android" "android" +generate "selfhosted" "selfhosted" diff --git a/raw/body_selfhosted.md b/raw/selfhosted/body.md similarity index 100% rename from raw/body_selfhosted.md rename to raw/selfhosted/body.md diff --git a/raw/header_selfhosted.md b/raw/selfhosted/header.md similarity index 66% rename from raw/header_selfhosted.md rename to raw/selfhosted/header.md index 342c07e..0f83284 100644 --- a/raw/header_selfhosted.md +++ b/raw/selfhosted/header.md @@ -1,4 +1,4 @@ -Android Links -============= +Selfhosted Links +================ This is a collection of nice open source software for your server. diff --git a/selfhosted.md b/selfhosted.md index 6e754b3..b7d4c1c 100644 --- a/selfhosted.md +++ b/selfhosted.md @@ -1,4 +1,4 @@ -# Android Links +# Selfhosted Links This is a collection of nice open source software for your server.