Giter Site home page Giter Site logo

phq-text-notifier's Introduction

PHQ handshake Twilio

PHQ Text Notifier

Using Twilio & PredictHQ, this program to sends a text message with an area's top events of the day.

Currently set to include the top 5 events in an area.

To Run

Download the project...

git clone https://github.com/hhheath/phq-text-notifier.git

Create and start a virtual environment...

Note: This step is not required if you plan to run this as a CRON job. Instead, the requirements will need to be installed for the system user that will be running the cron.

python -m venv .venv

source .venv/bin/activate

Install requirements...

pip install -r requirements.txt

Create .env file from example env...

cp .example.env .env

Then fill out the fields in the .env file. Where POI takes the following form (see the PredictHQ Docs for more on within):

<radius><unit>@lat,long

After requirement installation, it's really up to you on how you want to run it. The preferred method is to run a cron job. In this example, I've cloned the project into my home directory ~/.

Add the following to your crontab (this runs the script every day at 9am)...

0 9 * * * python3 ~/phq-text-notifier/main.py

Future Improvements

  • offer other ways to send messages instead of just SMS
    • email
    • webhook
  • use Temporal to spawn text message workflows on a schedule instead of relying on cron.
    • this would enable the ability to "productize" this a bit more so you could send text messages to many different numbers rather than just one at a time.

If you have any ideas, please feel free to open an issue!

phq-text-notifier's People

Contributors

hhheath avatar

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.