Skip to content

Commit 0ed8bc1

Browse files
committed
Better help
1 parent 3d24207 commit 0ed8bc1

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

README.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,16 @@ You can have additional sections and specify a device as well:
8585
8686
``python-pushover`` will attempt to read the configuration from
8787
``~/.pushoverrc`` by default. The section to read can be specified by using the
88-
``profile`` argument.
88+
``profile`` argument. With the configuration file above, you can send a message
89+
by simply doing:
90+
91+
.. code-block:: python
92+
93+
from pushover import Client
94+
95+
client = Client().send_message("Hello!", title="Hello")
96+
97+
or ``pushover --title "Hello" "Hello!"`` from the command line.
8998

9099
API
91100
---

pushover.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ class InitError(Exception):
4949
"""
5050

5151
def __str__(self):
52-
return "No api_token provided. Init the pushover module by\
53-
calling the init function"
52+
return ("No api_token provided. Init the pushover module by "
53+
"calling the init function")
5454

5555

5656
class UserError(Exception):
@@ -59,7 +59,7 @@ class UserError(Exception):
5959
"""
6060

6161
def __str__(self):
62-
return "No :attr:`user_key` attribute provided."
62+
return "No user_key attribute provided."
6363

6464

6565
class RequestError(Exception):
@@ -257,8 +257,8 @@ def main():
257257
parser.add_argument("--priority", "-p", help="message priority")
258258
parser.add_argument("--url", help="additional url")
259259
parser.add_argument("--url-title", help="additional url title")
260-
parser.add_argument("-c", "--config", help="configuration file",
261-
default="~/.pushoverrc")
260+
parser.add_argument("-c", "--config", help="configuration file\
261+
(default: ~/.pushoverrc)", default="~/.pushoverrc")
262262
parser.add_argument("--profile", help="profile to read in the\
263263
configuration file (default: Default)",
264264
default="Default")

0 commit comments

Comments
 (0)