Coder Social home page Coder Social logo

pressure_tracker_bot's Introduction

Blood Pressure Log Bot

The Blood Pressure Log Bot is a Telegram bot designed to help users track their blood pressure readings over time. It offers features for logging readings, generating reports, and managing logged data directly through Telegram.

Features

  • Log Readings: Users can log their systolic and diastolic blood pressure readings along with optional date and time.
  • Generate Reports: Generates a PDF report of blood pressure readings for a specified date range or all logged readings.
  • Remove Readings: Users can remove their most recent reading or all readings for a specific date.

Getting Started

Prerequisites

  • Python 3.8+
  • SQLite3
  • Telegram account

Installation

  1. Clone the repository:
  2. Install the required Python packages:
    pip install python-telegram-bot reportlab
    
  3. Initialize the SQLite database:
    python -c 'from index import init_db; init_db()'
    
  4. Set your Telegram Bot Token:
    • Replace 'YOUR_BOT_TOKEN' in the main function with your actual bot token provided by BotFather.

Running the Bot

Run the bot with the following command:

python index.py

Usage

  • Start the Bot: Send /start to get started with the bot.
  • Log a Reading: Use /log <systolic> <diastolic> [YYYY-MM-DD HH:MM] to log a new blood pressure reading.
  • Generate a Report: Send /report [start_date] [end_date] to generate and receive a PDF report.
  • Remove the Last Reading: Use /removelast to remove your most recent reading.
  • Remove Readings by Date: Use /removebydate <YYYY-MM-DD> to remove all readings for a specific date.
  • Help: Send /help to see all available commands.

Contributing

Contributions are welcome! Please feel free to submit pull requests, report bugs, or suggest new features.

License

MIT - See the LICENSE file for details.


pressure_tracker_bot's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.