An open API service indexing awesome lists of open source software.

https://github.com/majewsky/xmpp-bridge

Connect command-line programs to XMPP
https://github.com/majewsky/xmpp-bridge

Last synced: 5 days ago
JSON representation

Connect command-line programs to XMPP

Awesome Lists containing this project

README

        

# xmpp-bridge

A simple program that connects to an XMPP account and communicates with a
specified peer. Text is read from stdin and sent to the peer, and any messages
received from the peer will be printed on stdout.

The intended usage is as a building-block for other programs (or shell scripts)
that want to communicate status information over XMPP, or wish to ask for
input over XMPP.

## Installation

[libstrophe](https://github.com/strophe/libstrophe) is required. Build with

```bash
make
make install
```

As a developer, say `make MODE=debug` instead.

## Usage

Set the environment variables `XMPPBRIDGE_JID`, `XMPPBRIDGE_PASSWORD` and `XMPPBRIDGE_PEER_JID` to the respective
values, then call `xmpp-bridge`.

A common usecase is to prepend `xmpp-bridge` to a cron job's command line, so
that its stdin and stdout are connected to XMPP.

```bash
$ cat test.sh
echo "What's your name?"
read ANSWER
echo "Hi ${ANSWER}!"
$ xmpp-bridge bash test.sh
```

For details (e.g. option arguments), have a look at the [manpage](./xmpp-bridge.1).