From 69fa4a3b5e9247ade92e14e840e8de84f1408816 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Sep 2013 17:14:21 +0100 Subject: [PATCH 1/3] Create README.md --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..33e988e --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +profanity-plugins +================= + +Plugin support for Profanity is currently in development at the `plugins` branch. + +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. If you don't want to run any C plugins, you can omit the last step. + +You will need python-dev, ruby-dev and libtool packages installed on your system. + +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. + +2) 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 +``` + From 33fe71c44ea953c0a6e61d31c2c04dbc0a73d975 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Sep 2013 17:19:03 +0100 Subject: [PATCH 2/3] Update README.md --- README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 33e988e..dcf52ee 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,12 @@ 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. If you don't want to run any C plugins, you can omit the last step. @@ -20,13 +22,13 @@ You will need python-dev, ruby-dev and libtool packages installed on your system Loading plugins --------------- -1) Copy the plugin +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. -2) Add to profrc +2. 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). @@ -37,3 +39,14 @@ For example: load=browser.py;connect.py;ChatStart.rb;cricket-score.py;platform-info.py;whoami.py;ascii.py ``` +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/* +``` + From 95715ea6b7c79157b4c590b550743257fd65c93f Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 1 Sep 2013 17:20:29 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index dcf52ee..3929fde 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ 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 --------------------------------------