From 8dcbc292a2c1a3b066df798c1b8cd0a5657289ca Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Tue, 30 Apr 2019 14:21:24 +0200 Subject: [PATCH] fix make-dist, fix doc links --- README.html | 4 ++-- README.md | 4 ++-- README.txt | 4 ++-- dev/make-dist.sh | 15 ++++++++------- doc/6_reference.md | 4 ++-- doc/7_develop.md | 4 ++-- examples/README.md | 10 +++++----- 7 files changed, 23 insertions(+), 22 deletions(-) diff --git a/README.html b/README.html index ea61c68..3af1370 100644 --- a/README.html +++ b/README.html @@ -69,7 +69,7 @@
  • Prepare a new version
  • Bashbot testsuite
  • -
  • Customize bashbot environment
  • +
  • Customize bashbot environment
  • Examples
  • Security Considerations

    @@ -97,6 +97,6 @@

    @Gnadelwartz

    That’s it!

    If you feel that there’s something missing or if you found a bug, feel free to submit a pull request!

    -


    VERSION
    v0.7-pre2-1-g4b83377

    +


    VERSION
    v0.7-pre2-3-ge0a6d38

    diff --git a/README.md b/README.md index 8003e09..868b9a1 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Bashbot [Documentation](https://github.com/topkecleon/telegram-bot-bash) and [Do * Test, Add, Push changes * Prepare a new version * Bashbot testsuite -* [Customize bashbot environment](doc/8_customize.md) +* [Customize bashbot environment](doc/8_custom.md) * [Examples](examples/README.md) ## Security Considerations @@ -93,4 +93,4 @@ Well, thats a damn good question ... may be because I'm an Unix/Linux admin from If you feel that there's something missing or if you found a bug, feel free to submit a pull request! -#### $$VERSION$$ v0.7-pre2-1-g4b83377 +#### $$VERSION$$ v0.7-pre2-3-ge0a6d38 diff --git a/README.txt b/README.txt index 89eec0f..63f0133 100644 --- a/README.txt +++ b/README.txt @@ -57,7 +57,7 @@ all](https://core.telegram.org/bots#3-how-do-i-create-a-bot) * Test, Add, Push changes * Prepare a new version * Bashbot testsuite -* [Customize bashbot environment](doc/8_customize.md) +* [Customize bashbot environment](doc/8_custom.md) * [Examples](examples/README.md) ## Security Considerations @@ -130,4 +130,4 @@ health status If you feel that there's something missing or if you found a bug, feel free to submit a pull request! -#### $$VERSION$$ v0.7-pre2-1-g4b83377 +#### $$VERSION$$ v0.7-pre2-3-ge0a6d38 diff --git a/dev/make-dist.sh b/dev/make-dist.sh index 03ae356..28fef22 100755 --- a/dev/make-dist.sh +++ b/dev/make-dist.sh @@ -1,18 +1,18 @@ #!/usr/bin/env bash # this has to run once atfer git clone # and every time we create new hooks -#### $$VERSION$$ v0.7-pre2-0-g7ce2c5b +#### $$VERSION$$ v0.7-pre2-3-ge0a6d38 # magic to ensure that we're always inside the root of our application, # no matter from which directory we'll run script GIT_DIR=$(git rev-parse --git-dir) cd "$GIT_DIR/.." || exit 1 -VERSION="$(git describe --tags | sed -e 's/-.*//' -e 's/v//')" +VERSION="$(git describe --tags | sed -e 's/-[0-9].*//' -e 's/v//')" DISTNAME="telegram-bot-bash" DISTDIR="./dist/${DISTNAME}" -DISTFILES="bashbot.rc bashbot.sh commands.sh mycommands.sh doc examples modules LICENSE README.md README.txt" +DISTFILES="bashbot.rc bashbot.sh commands.sh mycommands.sh doc examples modules LICENSE README.md README.txt README.html" # run tests first! @@ -36,16 +36,17 @@ mv "mycommands.sh" "mycommands.sh.dist" JSONSHFILE="JSON.sh/JSON.sh" if [ ! -f "${JSONSHFILE}" ]; then - mkdir "JSON.sh" 2>/dev/null; + mkdir "JSON.sh" 2>/dev/null curl -sL -o "${JSONSHFILE}" "https://cdn.jsdelivr.net/gh/dominictarr/JSON.sh/JSON.sh" chmod +x "${JSONSHFILE}" fi # make html doc -mkdir html +mkdir html 2>/dev/null cp README.html html/index.html -find ./doc -iname "*.md" -type f -exec sh -c 'pandoc -s -S -M "title=Bashobot Documentation - ${0%.md}.html" "${0}" -o "./html/$(basename ${0%.md}.html)"' {} \; -find README.html html -iname "*.html" -type f -exec sh -c 'sed -i -E "s/href=\"(.*).md\"/href=\"\1.html\"/g" ${0}' {} \; +find doc -iname "*.md" -type f -exec sh -c 'pandoc -s -S -M "title=Bashobot Documentation - ${0%.md}.html" "${0}" -o "./html/$(basename ${0%.md}.html)"' {} \; +find examples -iname "*.md" -type f -exec sh -c 'pandoc -s -S -M "title=Bashobot Documentation - ${0%.md}.html" "${0}" -o "${0%.md}.html"' {} \; +find README.html html examples -iname "*.html" -type f -exec sh -c 'sed -i -E "s/href=\"(\.\.\/)*doc\//href=\"\1html\//g;s/href=\"(.*).md(#.*)*\"/href=\"\1.html\"/g" ${0}' {} \; # create archive cd .. || exit 1 diff --git a/doc/6_reference.md b/doc/6_reference.md index 5bbb880..3fe0605 100644 --- a/doc/6_reference.md +++ b/doc/6_reference.md @@ -238,7 +238,7 @@ fi *See also [Chat Member](https://core.telegram.org/bots/api/#chatmember)* ##### user_is_allowed -Bahsbot supports User Access Control, see [Advanced Usage](4_advanced.md) +Bahsbot supports User Access Control, see [Advanced Usage](3_advanced.md) *usage:* user_is_allowed "${USER[ID]}" "what" "${CHAT[ID]}" @@ -489,5 +489,5 @@ Send Input from Telegram to waiting Interactive Chat. #### [Prev Best Practice](5_practice.md) #### [Next Notes for Developers](7_develop.md) -#### $$VERSION$$ v0.7-pre2-0-g7ce2c5b +#### $$VERSION$$ v0.7-pre2-3-ge0a6d38 diff --git a/doc/7_develop.md b/doc/7_develop.md index 0b4b1a0..7e17777 100644 --- a/doc/7_develop.md +++ b/doc/7_develop.md @@ -89,8 +89,8 @@ else fi ``` -#### [Prev Function Reference](6_function.md) +#### [Prev Function Reference](6_reference.md) #### [Next Bashbot Environment](8_custom.md) -#### $$VERSION$$ v0.7-pre2-0-g7ce2c5b +#### $$VERSION$$ v0.7-pre2-3-ge0a6d38 diff --git a/examples/README.md b/examples/README.md index dbd9cc3..24535a1 100644 --- a/examples/README.md +++ b/examples/README.md @@ -13,9 +13,9 @@ Two examples for interactive scripts are provided as **calc.sh** and **question. Background jobs are an easy way to provide sceduled messages or alerts if something happens. -**notify.sh** is a simple example how to send a message ervery x seonds, e.g. actual time. +**notify.sh** is a simple example on how to send a message every x seonds, e.g. current time. -**background-scripts** contains a more concrete example on how to start and kill diffrent background scripts plus some example backgound scripts. +**background-scripts** contains a more concrete example on how to start and stop different scripts plus some example backgound scripts. ``` mycommands.sh - /run_xxx and /kill-xxx wil start any script named run_xxx.sh @@ -25,13 +25,13 @@ Background jobs are an easy way to provide sceduled messages or alerts if someth run_filecontent.sh - shown the content of new files in a named dir run_notify.sh - same as notify.sh ``` -**Note:** Output of system commands often contains newlines, each newline results in a a sepperate telegram message, see function send_telegram in -mycommands.sh on how to avoid this. +**Note:** Output of system commands often contains newlines, each newline results in a telegram message, the function 'send_telegram' in +mycommands.sh avoids this by converting each newline to ' mynewlinestartshere ' before output the string. ### Use bashbot from external scripts **external-use** will contain some examples on how to send messages from external scripts to Telegram chats or users. -#### $$VERSION$$ v0.7-pre2-2-g68afdbf +#### $$VERSION$$ v0.7-pre2-3-ge0a6d38