mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2025-01-15 18:36:48 +00:00
fix make-dist, fix doc links
This commit is contained in:
parent
e0a6d38884
commit
8dcbc292a2
@ -69,7 +69,7 @@
|
||||
<li>Prepare a new version</li>
|
||||
<li>Bashbot testsuite</li>
|
||||
</ul></li>
|
||||
<li><a href="doc/8_customize.md">Customize bashbot environment</a></li>
|
||||
<li><a href="doc/8_custom.md">Customize bashbot environment</a></li>
|
||||
<li><a href="examples/README.md">Examples</a></li>
|
||||
</ul>
|
||||
<h2 id="security-considerations">Security Considerations</h2>
|
||||
@ -97,6 +97,6 @@
|
||||
<p><span class="citation">@Gnadelwartz</span></p>
|
||||
<h2 id="thats-it">That’s it!</h2>
|
||||
<p>If you feel that there’s something missing or if you found a bug, feel free to submit a pull request!</p>
|
||||
<h4 id="version-v0.7-pre2-1-g4b83377"><br /><span class="math display"><em>V</em><em>E</em><em>R</em><em>S</em><em>I</em><em>O</em><em>N</em></span><br /> v0.7-pre2-1-g4b83377</h4>
|
||||
<h4 id="version-v0.7-pre2-3-ge0a6d38"><br /><span class="math display"><em>V</em><em>E</em><em>R</em><em>S</em><em>I</em><em>O</em><em>N</em></span><br /> v0.7-pre2-3-ge0a6d38</h4>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user