Code Monkey home page Code Monkey logo

psa's Introduction

Public Service Announcer

PSA can multiplex annoucements, important or otherwise.

It's a single binary that works as a CLI for sending messages from a console, and can provide announcements as a service via e.g. a webhook.

Usage

Usage of ./psa:
  -dryrun
    	validate and log but don't send anything
  -message string
    	the message to announce
  -v	verbose logging

Configuration

For information on how to prepare your Discord server or Slack workspace for receiving announcements, see the Discord webhooks intro or Slack webhooks API guide.

All configuration is optional, but without any there will be nowhere to announce messages.

export PSA_DISCORD_WEBHOOK="https://discord.com/api/webhooks/.../..."
export PSA_SLACK_WEBHOOK="https://hooks.slack.com/services/.../.../..."

If you want to customize the way announcements are presented, you can set PSA_MSG_TEMPLATE in your environment:

export PSA_MSG_TEMPLATE="๐Ÿ“ฃ {{.Message}}"

.Message is (currently) the only field available to the template. If your template does not use it, psa will not send anything.

TODO

  • CLI for sending
  • Discord announce
  • Slack announce
  • incoming webhook (HMAC verification)
  • Twitter announce
  • configuration by simple file in ~/.config (simplifying CLI use)
  • more configurable announcement sinks (e.g. multiple Discord hooks)

Maybe TODO

  • Structured logging
  • RBAC (users authenticated by e.g. Slack can be authorized to announce)
  • Announce from Slack or Discord
  • More integrations
    • IRC, email, text messages, Signal, Telegram, Cabal

psa's People

Contributors

fabjan 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.