|
19 | 19 | <link rel="manifest" href="/static/website/favicons/manifest.json"> |
20 | 20 | <link rel="mask-icon" href="/static/website/favicons/safari-pinned-tab.svg" color="#5bbad5"> |
21 | 21 | <link rel="shortcut icon" href="/static/website/favicons/favicon.ico"> |
| 22 | + <link rel="stylesheet" type="text/css" href="/static/website/reset.css" /> |
| 23 | + <link rel="stylesheet" type="text/css" href="/static/website/style.css" /> |
| 24 | + <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto+Slab"> |
| 25 | + <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Convergence"> |
22 | 26 | <meta name="msapplication-TileColor" content="#2b5797"> |
23 | 27 | <meta name="msapplication-TileImage" content="/static/website/favicons/mstile-144x144.png"> |
24 | 28 | <meta name="msapplication-config" content="/static/website/favicons/browserconfig.xml"> |
25 | 29 | <meta name="theme-color" content="#4f7096"> |
26 | | - <style type="text/css"> |
27 | | - html { |
28 | | - height: 50%; |
29 | | - } |
30 | | - body { |
31 | | - position: relative; |
32 | | - height: 100%; |
33 | | - } |
34 | | - #content { |
35 | | - position: absolute; |
36 | | - height: 122px; |
37 | | - width: 768px; |
38 | | - left: 50%; |
39 | | - bottom: 0; |
40 | | - margin-left: -384px; |
41 | | - text-align: center; |
42 | | - } |
43 | | - </style> |
44 | 30 | </head> |
45 | 31 | <body> |
46 | | - <div id="content"> |
47 | | - <a href="https://github.com/python-telegram-bot/python-telegram-bot"><img src="https://github.com/python-telegram-bot/logos/raw/master/logo-text/png/ptb-logo-text_768.png?raw=true" /></a> |
48 | | - </div> |
| 32 | + <img class="logo" width="128" src="https://github.com/python-telegram-bot/logos/blob/master/logo/png/ptb-logo_240.png?raw=true" /> |
| 33 | + |
| 34 | + <div class="content"> |
| 35 | + <section> |
| 36 | + <header> |
| 37 | + |
| 38 | + <hgroup> |
| 39 | + <h1 class="title">python-telegram-bot</h1> |
| 40 | + <h2 class="subtitle">Not just a Python wrapper around the |
| 41 | + Telegram Bot API</h2> |
| 42 | + </hgroup> |
| 43 | + <nav> |
| 44 | + <ul> |
| 45 | + <li><a href="https://telegram.me/pythontelegrambotgroup">Community</a></li> |
| 46 | + <li><a href="https://github.com/python-telegram-bot/python-telegram-bot">Development</a></li> |
| 47 | + <li><a href="http://pythonhosted.org/python-telegram-bot/">Documentation</a></li> |
| 48 | + <li><a href="https://pypi.python.org/pypi/python-telegram-bot">Download</a></li> |
| 49 | + </ul> |
| 50 | + </nav> |
| 51 | + </header> |
| 52 | + |
| 53 | + <p class="buttons"> |
| 54 | + <a class="github-button" href="https://github.com/python-telegram-bot/python-telegram-bot" data-icon="octicon-star" data-count-href="/python-telegram-bot/python-telegram-bot/stargazers" data-count-api="/repos/python-telegram-bot/python-telegram-bot#stargazers_count" data-count-aria-label="# stargazers on GitHub" aria-label="Star python-telegram-bot/python-telegram-bot on GitHub">Star</a> |
| 55 | + <a class="github-button" href="https://github.com/python-telegram-bot/python-telegram-bot/fork" data-icon="octicon-repo-forked" data-count-href="/python-telegram-bot/python-telegram-bot/network" data-count-api="/repos/python-telegram-bot/python-telegram-bot#forks_count" data-count-aria-label="# forks on GitHub" aria-label="Fork python-telegram-bot/python-telegram-bot on GitHub">Fork</a> |
| 56 | + </p> |
| 57 | + </section> |
| 58 | + |
| 59 | + <section> |
| 60 | + <br /> |
| 61 | + <h2>It's fun</h2> |
| 62 | + <pre>from telegram.ext import Updater, CommandHandler |
| 63 | + |
| 64 | +def start(bot, update): |
| 65 | + bot.sendMessage(update.message.chat_id, text='Hello World!') |
| 66 | + |
| 67 | +def hello(bot, update): |
| 68 | + bot.sendMessage(update.message.chat_id, |
| 69 | + text='Hello {0}'.format(update.message.from_user.name)) |
| 70 | + |
| 71 | +updater = Updater('<strong>YOUR TOKEN HERE</strong>') |
| 72 | + |
| 73 | +updater.dispatcher.addHandler(CommandHandler('start', start)) |
| 74 | +updater.dispatcher.addHandler(CommandHandler('hello', hello)) |
| 75 | + |
| 76 | +updater.start_polling() |
| 77 | +updater.idle()</pre> |
| 78 | + <br /> |
| 79 | + <h2>Easy to setup</h2> |
| 80 | + <pre>$ pip install python-telegram-bot==4.0rc1 |
| 81 | +$ python bot.py</pre> |
| 82 | + <br /> |
| 83 | + <h2>And it is free</h2> |
| 84 | + <p>python-telegram-bot is distributed under a |
| 85 | + <a href="http://www.gnu.org/licenses/lgpl-3.0.html">LGPLv3 |
| 86 | + license.</a></p> |
| 87 | + </section> |
| 88 | + </div> |
| 89 | + |
| 90 | + <section> |
| 91 | + <footer> |
| 92 | + <p>© Copyright 2015-2016. Licensed by <a href="http://creativecommons.org/licenses/by/3.0/" rel="license" target="_blank">Creative Commons</a>.</p> |
| 93 | + </footer> |
| 94 | + </section> |
| 95 | + |
| 96 | + <script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script> |
49 | 97 | </body> |
50 | 98 | </html> |
0 commit comments