Metadata-Version: 1.0
Name: gntplib
Version: 0.1
Summary: Pure python implementation of Growl Notification Transport Protocol client
Home-page: http://github.com/papaeye/gntplib
Author: papaeye
Author-email: papaeye@gmail.com
License: BSD License
Description: gntplib
        =======
        
        gntplib is a pure python implementation of Growl Notification Transport
        Protocol client.
        
        Growl Notification Transport Protocol (GNTP) is specified:
        http://www.growlforwindows.com/gfw/help/gntp.aspx
        
        Usage
        -----
        
        Simple usage::
        
            >>> import gntplib
            >>> gntplib.notify('Simple', 'Simple Event', 'Simple Title', 'Simple Text')
        
        Basic usage::
        
            >>> notifier = gntplib.Notifier('Basic', ['Basic Event'])
            >>> notifier.register()
            >>> notifier.notify('Basic Event', 'Basic Title', 'Basic Text')
        
        ``gntplib.Event`` class has a bit more attributes::
        
            >>> events = [gntplib.Event('foo', display_name='This is Displayed',
            ...                         enabled=False)]
            >>> notifier = gntplib.Notifier('Event Sample 1', events)
            >>> notifier.register()
        
        And here is a convenient way::
        
            >>> notifier = gntplib.Notifier('Event Sample 2',
            ...                             ['Event A', ('Event B', False)])
            >>> notifier.register()
        
        Then enabled event ``Event A`` and disabled event ``Event B`` are registered.
        
        You can use icon of <uniqueid> data type::
        
            >>> notifier = gntplib.Notifier('Icon', ['Icon Event'],
            ...                             icon=gntplib.Icon(open('app.png').read()))
            >>> notifier.register()
            >>> notifier.notify('Icon Event', 'Icon Title', 'Icon Title',
            ...                 icon=gntplib.Icon(open('notification.png').read()))
        
        You can use socket callback::
        
            >>> import webbrowser
            >>> class BrowseCallback(gntplib.SocketCallback):
            ...     def if_clicked(self, response):
            ...         webbrowser.open_new_tab(self.context)
            >>> notifier = gntplib.Notifier('Callback', ['Callback Event'])
            >>> notifier.register()
            >>> notifier.notify('Callback Event', 'Click me!', 'Click me!',
            ...                 callback=BrowseCallback('http://google.com'))
        
        Note
        ----
        
        * Because ``Application-Icon: <url>`` is not implemented in Growl 1.3.3,
          Passing string value as ``icon`` parameter of ``Notifier`` constructor
          does not work.  Use ``Icon`` instance as above.
        
        * Because ``Notification-Icon`` at REGISTER request is not implemented in
          Growl 1.3.3, ``Event`` constructor's ``icon`` parameter does not work.
        
        * Because ``Notification-Icon: <url>`` at NOTIFY request is not implemented in
          Growl 1.3.3, Passing string value as ``icon`` parameter of
          ``Notify.nofity()`` method does not work.  Use ``Icon`` instance as above.
        
        * Because ``Notification-Callback-Target`` is not implemented in Growl 1.3.3,
          Passing string value as ``callback`` parameter of ``Notify.notify()`` method
          does not work.  Use ``SocketCallback`` instance as above.
        
Platform: any
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Software Development :: Libraries :: Python Modules
