mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-09-29 08:49:02 +00:00
77 lines
4.6 KiB
HTML
77 lines
4.6 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
<meta http-equiv="Content-Style-Type" content="text/css" />
|
||
<meta name="generator" content="pandoc" />
|
||
<title>Bashobot Documentation - 0_install.html</title>
|
||
<style type="text/css">code{white-space: pre;}</style>
|
||
</head>
|
||
<body>
|
||
<div id="header">
|
||
<h1 class="title">Bashobot Documentation - 0_install.html</h1>
|
||
</div>
|
||
<h4 id="home"><a href="../README.html">Home</a></h4>
|
||
<h2 id="install-bashbot">Install bashbot</h2>
|
||
<ol style="list-style-type: decimal">
|
||
<li>Go to the directory you want to install bashbot, e.g.
|
||
<ul>
|
||
<li>your $HOME directory (install and run with your user-ID)</li>
|
||
<li>/usr/local if you want to run as service</li>
|
||
</ul></li>
|
||
<li><a href="https://github.com/topkecleon/telegram-bot-bash/releases">Download latest release zip from github</a> and extract all files.</li>
|
||
<li>Change into the directory <code>telegram-bot-bash</code></li>
|
||
<li>Create default commands with <code>cp commands.sh.dist commands.sh; cp mycommands.sh.dist mycommands.sh</code></li>
|
||
<li>Run <code>./bashbot.sh init</code> to setup the environment and enter your Bots token given by botfather.</li>
|
||
</ol>
|
||
<p>Now your Bot is ready to start …</p>
|
||
<p><strong>If you are new to Bot development read <a href="https://core.telegram.org/bots">Bots: An introduction for developers</a></strong></p>
|
||
<h3 id="install-from-github">Install from Github</h3>
|
||
<p>As an alternative to download the zip files, you can clone the github repository to get the latest improvements/fixes.</p>
|
||
<ol style="list-style-type: decimal">
|
||
<li>Go to the directory you want to install bashbot, e.g.
|
||
<ul>
|
||
<li>your $HOME directory (install and run with your user-ID)</li>
|
||
<li>/usr/local if you want to run as service</li>
|
||
</ul></li>
|
||
<li>Run <code>git clone https://github.com/topkecleon/telegram-bot-bash.git</code></li>
|
||
<li>Change into the directory <code>telegram-bot-bash</code></li>
|
||
<li>Run <code>test/ALL-tests.sh</code> and if everthing finish OK …</li>
|
||
<li>Run <code>sudo ./bashbot.sh init</code> to setup the environment and enter your Bots token given by botfather.</li>
|
||
</ol>
|
||
<h3 id="update-bashbot">Update bashbot</h3>
|
||
<ol style="list-style-type: decimal">
|
||
<li>Go to the directory where you had installed bashbot, e.g.
|
||
<ul>
|
||
<li>your $HOME directory</li>
|
||
<li>/usr/local</li>
|
||
</ul></li>
|
||
<li><a href="https://github.com/topkecleon/telegram-bot-bash/releases">Download latest release zip from github</a></li>
|
||
<li>Extract all files to your existing bashbot dir <strong>Note: all files execpt ‘mycommands.sh’ and ‘commands.sh’ may overwritten!</strong></li>
|
||
<li>Run <code>sudo ./bashbot.sh init</code> to setup your environment after the update</li>
|
||
</ol>
|
||
<h3 id="notes-on-updates">Notes on Updates</h3>
|
||
<h4 id="location-of-tmp-data-dir">Location of tmp / data dir</h4>
|
||
<p>From version 0.70 on the tmp dir is renamed to ‘data-bot-bash’ to reflect the fact that not only temporary files are stored. an existing ‘tmp-bot-bash’ will be automatically renamed after update.</p>
|
||
<p>From version 0.50 on the temporary files are no more placed in ‘/tmp’. instead a dedicated tmp dir is used.</p>
|
||
<h4 id="changes-to-send_keyboard-in-v0.6">Changes to send_keyboard in v0.6</h4>
|
||
<p>From Version 0.60 on keybord format for <code>send_keyboard</code> and <code>send_message "mykeyboardstartshere ..."</code> was changed. Keybords are now defined in JSON Array notation e.g. “[ \“yes\” , \“no\” ]”. This has the advantage that you can create any type of keyboard supported by Telegram. The old format is supported for backward compatibility, but may fail for corner cases.</p>
|
||
<p><em>Example Keyboards</em>:</p>
|
||
<ul>
|
||
<li>yes no in two rows:
|
||
<ul>
|
||
<li>OLD format: ‘yes’ ‘no’ <em>(two strings)</em></li>
|
||
<li>NEW format: ‘[ “yes” ] , [ “no” ]’ <em>(two arrays with a string)</em></li>
|
||
</ul></li>
|
||
<li>new layouts made easy with NEW format:
|
||
<ul>
|
||
<li>Yes No in one row: ‘[ “yes” , “no” ]’</li>
|
||
<li>Yes No plus Maybe in 2.row: ‘[ “yes” , “no” ] , [ “maybe” ]’</li>
|
||
<li>numpad style keyboard: ‘[ “1” , “2” , “3” ] , [ “4” , “5” , “6” ] , [ “7” , “8” , “9” ] , [ “0” ]’</li>
|
||
</ul></li>
|
||
</ul>
|
||
<h4 id="next-create-bot"><a href="1_firstbot.html">Next Create Bot</a></h4>
|
||
<h4 id="version-v0.70-pre1-2-g293ad08"><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.70-pre1-2-g293ad08</h4>
|
||
</body>
|
||
</html>
|