From a57a2a77dc5101ca3c62700e7bca4eaf4e25fd5c Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Wed, 2 Jul 2014 22:43:46 +0200 Subject: Docs and comments impoved --- README | 37 ++++++++++++++++++++++++++++++++----- beinc_weechat.py | 10 ++++++++-- 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/README b/README index f5735c7..026c70d 100644 --- a/README +++ b/README @@ -1,11 +1,34 @@ Copyright (C) 2014 - Simeon Simeonov See the end of the file for license conditions. -The file INSTALL in this directory describes how to setup and use BEINC +The file INSTALL in this very same directory describes how to setup & use BEINC + + +What is BEINC? +-------------- + +Blackmore's Enchanced IRC Notification Collection (BEINC) is a free set of +components that aim to provide a complete system for different on-screen-display +notification scenarios. + +The current version of BEINC contains the following components: +beinc_server.py - server used for queueing or providing on-screen-display (OSD) +beinc_poller.py - client used to fetch enqueued messages from beinc_server.py + and provide OSD +beinc_weechat.py - a complete script / client for the Weechat IRC client >=0.4.0 + used to push notification messages to beinc_server.py +beinc_generic_client.py - a simple client used to push notification messages + to beinc_server.py + Its main purpose is to provide a convenient way to + test beinc_server.py (and beinc_poller.py) as well as + to serve as an example on how to develop BEINC-clients + + +Why should I use BEINC and what has it done for me lately? +---------------------------------------------------------- + -Introduction ------------- Supported systems & requirements @@ -13,13 +36,17 @@ Supported systems & requirements Any system running Postfix and Spamassassin. -Requirements: Python 2.7.* +Requirements: +All components: Python 2.7.* +beinc_server.py: cherrypy >= 3.2.0, pyopenssl >= 0.13.0 +beinc_weechat.py: +beinc_poller.py: License ------- -This file is part of Blackmore's SpamAssassinWrapper. +This file is part of BEINC. BEINC is free software: you can redistribute it and/or modify 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): def beinc_init(): + """ + Ran every time the script is (re)loaded + It loads the config (.json) file and (re)loads its contents into memory + beinc_init() will disable all notifications on failure + """ global enabled global target_list @@ -543,8 +548,9 @@ def beinc_init(): beinc_prnt('BEINC target "{0}" added'.format(new_target.name)) beinc_prnt('Done!') except Exception as e: - beinc_prnt('ERROR: unable to parse {0}: {1} - {2}'.format( - beinc_config_file_str, custom_error, e)) + beinc_prnt('ERROR: unable to parse {0}: {1} - {2}\n' + 'BEINC is now disabled'.format( + beinc_config_file_str, custom_error, e)) enabled = False # do not return error / exit the script # in order to give a smoother opportunity to fix a 'broken' config -- cgit v1.3