Skip to content
This repository has been archived by the owner on Jan 1, 2022. It is now read-only.

Latest commit

 

History

History
30 lines (22 loc) · 1.1 KB

CONTRIBUTING.md

File metadata and controls

30 lines (22 loc) · 1.1 KB

Contributing

Structure

The source code of wat-bridge is not very intuitive, so here is a list of what each file is in charge of:

  • watbridge.py: program launcher, connects signals with handlers and initializes configuration
  • helper.py: generally, functions that interact with the TinyDB database (in case database changes in the future)
  • listeners.py: the main loops for the WhatsApp and Telegram bots
  • signals.py: signal handlers for terminating the program and message relaying between WhatsApp and Telegram
  • static.py: settings and static stuff used accross all modules
  • tg.py: Telegram bot implementation using pyTelegramBotAPI
  • wa.py: WhatsApp bot implementation using Yowsup

Usually, each component is well isolated, which allows for easier modifications and maintenance.

Documentation

I tend to use Google style docstrings where appropriate as shown here: http://www.sphinx-doc.org/es/stable/ext/napoleon.html, as I find these are easy to read at a glance when viewing the source code.