cleaned up how main is called
[gmail.py.git] / README
blob6ff33a09bed5d5b413e23119a95c4aaf3c7be025
1 ========
2 gmail.py
3 ========
5 This script uses Google's atom feed to retrieve unread messages in your gmail
6 account. urllib takes care of the username and password handling, since I
7 figure they'd do a better/safer job of it that I could.
9 **NOTE**
10         Taken from the urllib documentation page, regarding urllib.open():
11         Warning: When opening HTTPS URLs, it does not attempt to validate the
12         server certificate. Use at your own risk!
14 The last line in gmail.py:
15         print '%s at %s: %s <%s> wrote "%s"' % (sdate, stime, \
16         k.find(name).text, k.find(email).text, k.find(title).text)
17 is what actually prints the output and can easily be changed with even a
18 rudementary understanding of Python for different formats.
20 If any other information is required from the XML file, the variables defined
21 towards the end with purl.org in their string can be used.
23 Usage
24 =====
26 Usage: gmail.py [options] [username1] [username2] ...
28 Options:
29   -h, --help            show this help message and exit
30   -u USERNAME, --username=USERNAME
31                         your gmail username. use this if you also want to
32                         specify the password on the command line. otherwise
33                         simply pass the usernames as arguments
34   -p PASSWORD, --password=PASSWORD
35                         your gmail password
36   -s, --summary         prints the summary text that is generally visible in
37                         your gmail inbox [default: False]
38   -n PRINTCOUNT         print 'n' messages
39   -a, --all             prints all messages in your inbox