Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Documentation updates

  • Loading branch information...
commit e80ad73e9f1031408bbe697cf412c314d82d1d11 1 parent 32f4179
Paul Traylor authored
Showing with 43 additions and 11 deletions.
  1. +33 −7 docs/index.rst
  2. +6 −4 gntp/config.py
  3. +4 −0 gntp/notifier.py
40 docs/index.rst
View
@@ -12,14 +12,36 @@ Python bindings for the
Bugs can be reported at the `GitHub issue tracker <https://github.com/kfdm/gntp/issues>`_
-Sending a message
------------------
+Simple Message Sending
+----------------------
-.. automodule:: gntp.notifier
- :members:
+::
+
+ from gntp.notifier import mini
+ # Send a simple growl message with mostly default values
+ mini("Here's a quick message", callback="http://github.com/")
+
+.. autofunction:: gntp.notifier.mini
+
+
+Detailed Message Sending
+------------------------
+
+.. autoclass:: gntp.notifier.GrowlNotifier
+
+The GrowlNotifier class is intended to mostly mirror the older python bindings
+for growl
-Example Usage
--------------
+.. automethod:: gntp.notifier.GrowlNotifier.register
+
+.. automethod:: gntp.notifier.GrowlNotifier.notify
+
+.. automethod:: gntp.notifier.GrowlNotifier.subscribe
+
+
+
+Complete Example
+----------------
::
import gntp.notifier
@@ -57,4 +79,8 @@ Example Usage
icon = "http://example.com/icon.png",
sticky = False,
priority = -1,
- )
+ )
+
+GNTP Configfile Example
+-----------------------
+.. autoclass:: gntp.config.GrowlNotifier
10 gntp/config.py
View
@@ -61,10 +61,12 @@ class GrowlNotifier(gntp.notifier.GrowlNotifier):
For right now, we are only interested in letting users overide certain
values from ~/.gntp
- [gntp]
- hostname = ?
- password = ?
- port = ?
+ ::
+
+ [gntp]
+ hostname = ?
+ password = ?
+ port = ?
"""
def __init__(self, applicationName='Python GNTP', notifications=[],
defaultNotifications=None, applicationIcon=None, hostname='localhost',
4 gntp/notifier.py
View
@@ -31,6 +31,10 @@ def mini(description, applicationName='PythonMini', noteType="Message",
Simple notification function in one line. Has only one required parameter
and attempts to use reasonable defaults for everything else
:param string description: Notification message
+
+ .. warning::
+ For now, only URL callbacks are supported. In the future, the
+ callback argument will also support a function
"""
growl = GrowlNotifier(
applicationName=applicationName,
Please sign in to comment.
Something went wrong with that request. Please try again.