Skip to content

majewsky/xmpp-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 is required. Build with

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.

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