2013-09-02 21:24:57 +01:00
2013-09-01 23:51:02 +01:00
2013-09-01 22:43:01 +01:00
2013-09-01 16:48:46 +01:00
2013-09-01 16:44:19 +01:00
2013-09-01 16:44:19 +01:00
2013-09-02 00:10:37 +01:00
2013-09-01 16:44:19 +01:00
2013-09-01 16:44:19 +01:00
2013-09-01 16:44:19 +01:00
2013-09-01 22:43:01 +01:00
2013-09-02 21:24:57 +01:00
2013-09-01 22:43:01 +01:00
2013-09-01 16:44:19 +01:00

profanity-plugins

Plugin support for Profanity is currently in development at the plugins branch.

Currently supported languages for writing plugins are Python, Ruby and C.

Building Profanity with plugin support

Check out the plugins branch and run the usual:

./bootstrap.sh
./configure
make
sudo make install

The last step will create a shared library libprofanity and install headers required for developing C plugins.

You will need a few more dependencies installed on your system:

python-dev
ruby-dev
libtool
autoconf-archives

Loading plugins

  1. Copy the plugin

For Python and Ruby plugins, copy the plugin to $XDG_DATA/profanity/plugins/, (~/.local/share/profanity/plugins/ on most systems).

For C plugins, build the plugin using the supplied Makefile, and then copy the .so file to the same location.

  1. Add to profrc

For all types of plugins, the list of plugins to acutally load when starting Profanity is defined in $XDG_CONFIG/profanity/profrc (~/.config/profanity/profrc on most systems).

For example:

[plugins]
load=browser.py;connect.py;ChatStart.rb;cricket-score.py;platform-info.py;whoami.py;ascii.py                   

Run the /plugins command to see a list of installed plugins.

Example plugin code

Whilst the API is being developed, the following test plugins are a good reference of possible hooks and API calls available:

python-test.py
RubyTest.rb
test-c-plugin/*
Description
Python and C plugins collection for the CProof XMPP client
Readme 387 KiB
Languages
Python 75.7%
C 20.5%
Makefile 1.8%
Awk 1.4%
Shell 0.6%