Very simple skeleton for a XMPP chatbot. It will start as an expense tracking bot.
Core written in C using libstrophe. Grammar for messages is under src/grammar/ written in Lex + Yacc.
If the necessity arises this should be a generic interface for a bot that exposes functions such as message_handler that can parse and react to messages.
Requires make, libstrophe and libssl to be installed. See the makefile in the root directory of this repository.
make
This will compile an executable ./bin/xmpp-bot that can be run with the appropriate CLI variables, such as:
./bin/xmpp-bot <bot@myserver.io> <test> <report-file.csv> <avatar-png-image.base64>
make debug will compile ./bin/debug/xmpp-bot with -g debug flags turned on and optimization turned off.
The ./python subdirectory is meant to be used as a python3 virtual environment. Therefore it is necessary to install the required python3 packages prior to the first run:
python3 -m venv ./python cd ./python source ./bin/activate python3 -m pip -r requirements.txt
A convenience bash wrapper script ./python/report.sh is meant to be called by the xmpp-bot directly, activating the virtual environment and calling report.py