Giter Site home page Giter Site logo

aztwittersar's Introduction

AzTwitterSAR -- tweet analysis and notification

This is an Azure Function that polls Twitter's API to obtain new tweets from a given account. Then it scores the new tweetby the presence of specific words. If this indicates that the tweet may be of interest, then a machine learning-based filter function (see the sibling project TwitterSARai) is called. If that, too, indicates relevance, then the tweet is posted to a slack channel through a webhook.

Prerequisites

  • An Azure account and decent knowledge of deploying and running a serverless solution. ARM templates are included, i.e. the Azure infrastructure can be set up mostly automatically.
  • Twitter API key + secret.
  • The environment variable AZTWITTERSAR_SLACKHOOK must be set with a link to a web hook that should be used to post the notification. For local testing the definition must be in local.settings.json, on Azure it must be added in the deployment template parameters so that it can be written to the key vault.

Workflow when redeploying the code

  • Send a POST request to the terminatePostUri (obtained when starting the workflow).
  • Send a POST request to the purgeHistoryDeleteUri.
  • Stop the Azure function.
  • Optionally: download the tweets from the storage account (can be done at any time).
  • Optionally: delete or expunge the tables in the storage account.
  • Run infrastructure and/or code deployment.
  • Start the Azure function.
  • Start the workflow by triggering the starter function from the Azure portal with the id of the last treated tweet as argument. Save the response with the durable function management webhooks.

aztwittersar's People

Watchers

 avatar  avatar

aztwittersar's Issues

Multiple notification targets

  • For all messages or per omr.
  • Event grid?
  • How to configure multiple targets? (Idea: create naming scheme for webhooks in the keyvault; in code: list all secrets, get those according to the naming scheme; send to all; but this should still go into some code/function/infra of its own!)

"Fjell" kommune: feil trigger

"#Fjell, Sotra, 0918: UP stanset kjøretøy hvor bilfører (mann 36) ikke innehar førerkort+ mistanke ruspåvirkning. Bilfører blir tatt med til legevakt for blodprøve."

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.