diff options
| author | Simeon Simeonov | 2014-07-02 22:43:46 +0200 |
|---|---|---|
| committer | Simeon Simeonov | 2014-07-02 22:43:46 +0200 |
| commit | a57a2a77dc5101ca3c62700e7bca4eaf4e25fd5c (patch) | |
| tree | e9c997be8064a7eaf19b213a6208dc252e557f61 | |
| parent | 60facea6194cf2c93c55580e9e9e60c304c9c6a8 (diff) | |
Docs and comments impoved
| -rw-r--r-- | README | 37 | ||||
| -rw-r--r-- | beinc_weechat.py | 10 |
2 files changed, 40 insertions, 7 deletions
| @@ -1,11 +1,34 @@ | |||
| 1 | Copyright (C) 2014 - Simeon Simeonov | 1 | Copyright (C) 2014 - Simeon Simeonov |
| 2 | See the end of the file for license conditions. | 2 | See the end of the file for license conditions. |
| 3 | 3 | ||
| 4 | The file INSTALL in this directory describes how to setup and use BEINC | 4 | The file INSTALL in this very same directory describes how to setup & use BEINC |
| 5 | |||
| 6 | |||
| 7 | What is BEINC? | ||
| 8 | -------------- | ||
| 9 | |||
| 10 | Blackmore's Enchanced IRC Notification Collection (BEINC) is a free set of | ||
| 11 | components that aim to provide a complete system for different on-screen-display | ||
| 12 | notification scenarios. | ||
| 13 | |||
| 14 | The current version of BEINC contains the following components: | ||
| 15 | beinc_server.py - server used for queueing or providing on-screen-display (OSD) | ||
| 16 | beinc_poller.py - client used to fetch enqueued messages from beinc_server.py | ||
| 17 | and provide OSD | ||
| 18 | beinc_weechat.py - a complete script / client for the Weechat IRC client >=0.4.0 | ||
| 19 | used to push notification messages to beinc_server.py | ||
| 20 | beinc_generic_client.py - a simple client used to push notification messages | ||
| 21 | to beinc_server.py | ||
| 22 | Its main purpose is to provide a convenient way to | ||
| 23 | test beinc_server.py (and beinc_poller.py) as well as | ||
| 24 | to serve as an example on how to develop BEINC-clients | ||
| 25 | |||
| 26 | |||
| 27 | Why should I use BEINC and what has it done for me lately? | ||
| 28 | ---------------------------------------------------------- | ||
| 29 | |||
| 5 | 30 | ||
| 6 | 31 | ||
| 7 | Introduction | ||
| 8 | ------------ | ||
| 9 | 32 | ||
| 10 | 33 | ||
| 11 | Supported systems & requirements | 34 | Supported systems & requirements |
| @@ -13,13 +36,17 @@ Supported systems & requirements | |||
| 13 | Any system running Postfix and Spamassassin. | 36 | Any system running Postfix and Spamassassin. |
| 14 | 37 | ||
| 15 | 38 | ||
| 16 | Requirements: Python 2.7.* | 39 | Requirements: |
| 40 | All components: Python 2.7.* | ||
| 41 | beinc_server.py: cherrypy >= 3.2.0, pyopenssl >= 0.13.0 | ||
| 42 | beinc_weechat.py: | ||
| 43 | beinc_poller.py: | ||
| 17 | 44 | ||
| 18 | 45 | ||
| 19 | License | 46 | License |
| 20 | ------- | 47 | ------- |
| 21 | 48 | ||
| 22 | This file is part of Blackmore's SpamAssassinWrapper. | 49 | This file is part of BEINC. |
| 23 | 50 | ||
| 24 | BEINC is free software: you can redistribute it and/or modify | 51 | BEINC is free software: you can redistribute it and/or modify |
| 25 | it under the terms of the GNU General Public License as published by | 52 | it under the terms of the GNU General Public License as published by |
diff --git a/beinc_weechat.py b/beinc_weechat.py index 71d4b10..14e6eac 100644 --- a/beinc_weechat.py +++ b/beinc_weechat.py | |||
| @@ -488,6 +488,11 @@ def beinc_privmsg_handler(data, signal, signal_data): | |||
| 488 | 488 | ||
| 489 | 489 | ||
| 490 | def beinc_init(): | 490 | def beinc_init(): |
| 491 | """ | ||
| 492 | Ran every time the script is (re)loaded | ||
| 493 | It loads the config (.json) file and (re)loads its contents into memory | ||
| 494 | beinc_init() will disable all notifications on failure | ||
| 495 | """ | ||
| 491 | 496 | ||
| 492 | global enabled | 497 | global enabled |
| 493 | global target_list | 498 | global target_list |
| @@ -543,8 +548,9 @@ def beinc_init(): | |||
| 543 | beinc_prnt('BEINC target "{0}" added'.format(new_target.name)) | 548 | beinc_prnt('BEINC target "{0}" added'.format(new_target.name)) |
| 544 | beinc_prnt('Done!') | 549 | beinc_prnt('Done!') |
| 545 | except Exception as e: | 550 | except Exception as e: |
| 546 | beinc_prnt('ERROR: unable to parse {0}: {1} - {2}'.format( | 551 | beinc_prnt('ERROR: unable to parse {0}: {1} - {2}\n' |
| 547 | beinc_config_file_str, custom_error, e)) | 552 | 'BEINC is now disabled'.format( |
| 553 | beinc_config_file_str, custom_error, e)) | ||
| 548 | enabled = False | 554 | enabled = False |
| 549 | # do not return error / exit the script | 555 | # do not return error / exit the script |
| 550 | # in order to give a smoother opportunity to fix a 'broken' config | 556 | # in order to give a smoother opportunity to fix a 'broken' config |
