ekeih / OmNomNom

A simple Telegram bot to get canteen information.
https://t.me/omnbot
GNU Affero General Public License v3.0
32 stars 6 forks source link

Improve documentation #27

Open ekeih opened 7 years ago

ekeih commented 7 years ago

Currently the bot is missing mostly everything you would expect from a well documented project.

If you are thinking about contributing code or just want to run the bot yourself, please let me know, so I can prioritize this issue ;-)

DopeforHope commented 6 years ago

Could you provide a basic developer example how to start the bot locally and maybe how to test it? This would allow interested developers and especially students to contribute to the project. Even if it's a one-liner, having a starting point as a newbie would be great.

Thank you in advance

ekeih commented 6 years ago

Hi,

to get startet you can take the following steps:

  1. Create a bot token by talking to https://t.me/botfather
  2. Talk to you dev-bot by sending /start to it.
  3. git clone git@github.com:ekeih/OmNomNom.git && cd OmNomNom
  4. Create virtual python environment: mkvirtualenv -p $(which python3) omnomnom
  5. Install dependencies: pip install -r requirements.txt -r requirements-dev.txt
  6. Install the git package: pip install -e .
  7. Install a local redis server and start it with an empty database.
  8. export OMNOMNOM_AUTH_TOKEN=your_bot_token
  9. export OMNOMNOM_ADMIN=your_own_telegram_id
  10. omnbot-frontend to start the frontend that communicates with the telegram API.
  11. omnbot-worker to start a worker that parses websites.
  12. omnbot-beat to schedule regular cache updates.
  13. omnbot-housekeeping to handle some maintenance tasks like sending error messages to you.

I will try to include this with more details in the documentation. Let me know if you have any questions or if I missed something.

Best regards Max

ekeih commented 6 years ago

@DopeforHope Feel free to talk to me via https://t.me/ekeih if you have any questions.

ekeih commented 6 years ago

@DopeforHope Additional documentation is available at https://docs.omnbot.io/ but currently it is only generated from the docstrings.

I attached an overview of the architecture. The picture is explained in: https://fotoallerlei.com/post/2018-01-i-talked-about-omnomnom/

bla