{ "info": { "author": "Julian Andrews", "author_email": "jandrews271@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "License :: OSI Approved :: MIT License", "Topic :: Communications :: Email", "Topic :: Utilities" ], "description": "gmailcount\n==========\n\ngmailcount is a simple script to count the number of emails in your gmail\ninbox. It's primary purpose is to allow status-bar programs like xmobar or\ni3bar to poll your inbox without the need to store your password in plaintext.\n\nInstallation\n------------\n\ngmailcount is tested on python 3.5. It may work on older versions of python 3.\n\nInstallation is simple:\n\n pip3 install gmailcount\n\nwith Secret Service support (gnome-keyring):\n\n pip3 install gmailcount[secretservice]\n\ngnome-keyring support also requires the `dbus-python` package which can't be\ninstalled via pip. It can be installed via system package manager (python3-dbus\non Debian) or from source.\n\nIf your system keyring isn't working you can install alternative keyring support:\n\n pip3 install gmailcount[altkeyrings]\n\nAlternative keyring support includes keyring backends that should work on\nalmost any system, but may not be as secure. For more information on keyring\nconfiguration check out the python keyring\n[documentation](https://pypi.python.org/pypi/keyring#configure-your-keyring-lib).\n\nUsage\n-----\n\n usage: gmailcount [-h] [-s | -d | -p] [-t TIMEOUT] [--debug] email_address\n\n Check gmail message count.\n\n positional arguments:\n email_address email address to use\n\n optional arguments:\n -h, --help show this help message and exit\n -s, --set-password set the password for email_address\n -d, --delete-password\n delete the password for email_address\n -p, --prompt have gmail-count prompt you for your password\n -t TIMEOUT, --timeout TIMEOUT\n request timeout\n --debug print any exception traceback\n\nBefore you can use gmailcount in your status bar, you'll need to run it with\nthe `-s` flag to set the password for your email address. Once you've set your\npassword it will be stored in your system keyring. Any program using your\ngmailcount will need to have access to your keyring. \n\nWhen used with no flags, gmailcount will print the number of emails in your\ninbox to stdout or nothing in case of failure.\n\nSecurity concerns\n-----------------\n\nOne of the main goals of gmailcount is to provide a minimum level of\nsecurity. To that end, all requests are sent via SSL, passwords are stored in\nyour system keyring (and are presumably encrypted if your system keyring is\nworth anything), and the recommended use pattern is with app passwords on\naccounts with two-factor authentication enabled. This allows you to keep your\npassword out of your dotfiles and encrypted, and to revoke your password in\ncase your system is compromised.\n\nObviously though any system that allows your computer to poll your email\nwithout any human interaction isn't going to be ideal from a security\nstandpoint. gmailcount is only as secure as your system keyring, which\ndepending on how you use it and your configuration may not be very secure at\nall. Certainly if you're using gmailcount in a status bar, any one who\nmanages to get access to your logged in user account will have access to your\nemail, and if your keyring is secured by an insufficently strong password,\nsomeone with access to your harddrive may be able to crack your keyring\npassword and access your gmail password. \n\nUse gmailcount at your own risk! Still, it should be a lot more secure than a\nsystem that just stores your password as plain text at least.\n\nSample xmobar script\n--------------------\n\nHere's an example of a script suitable for use with xmobar:\n\n #!/usr/bin/env sh\n\n url='https://mail.google.com'\n email='example@gmail.com'\n\n full_text=$(/path/to/gmailcount -t 0.3 \"$email\")\n full_text=${full_text:-?}\n\n case $full_text in\n ''|*[!0-9]*) color=\\#FF0000 ;;\n 0) color=\\#888888 ;;\n *) color=\\#00FF00 ;;\n esac\n\n echo \"\u2709 $full_text\"\n\nSample i3blocks script\n----------------------\n\nHere's one suitable for use with i3blocks:\n\n\n #!/usr/bin/env sh\n\n url='https://mail.google.com'\n email='example@gmail.com'\n\n [ \"$BLOCK_BUTTON\" = 1 ] && xdg-open \"$url\"\n\n full_text=$(/path/to/gmailcount -t 0.3 \"$email\")\n full_text=${full_text:-?}\n\n case $full_text in\n ''|*[!0-9]*) color=\\#FF0000 ;;\n 0) color=\\#888888 ;;\n *) color=\\#00FF00 ;; \n esac\n\n echo \"$full_text\"\n echo \"$short_text\"\n echo \"$color\"\n\nSample Asynchrnous xmobar script\n--------------------------------\n\nHere's a somewhat more sophisticated script for xmobar which never blocks\nwaiting for the google servers. It works by writing the data asynchronously to\na temp file. The first argument to the script will set a timeout for writing\nthe data so that you can check gmail just before your status bar updates.\nSomething similar should work for i3blocks.\n\n #!/usr/bin/env sh\n\n STATUSFILE=/tmp/.gmail-status\n GMAILCOUNT=/path/to/gmailcount\n SLEEPTIME=${1:-0}\n EMAIL='example@gmail.com'\n URL='https://mail.google.com'\n\n echo_status() {\n echo \"\uf003 $1\"\n }\n\n write_data() {\n sleep \"$SLEEPTIME\"\n full_text=$(\"$GMAILCOUNT\" \"$EMAIL\")\n full_text=${full_text:-?}\n\n case $full_text in\n ''|*[!0-9]*) color=\\#FF0000 ;;\n 0) color=\\#888888 ;;\n *) color=\\#00FF00 ;;\n esac\n\n echo_status \"$full_text\" \"$color\" > \"$STATUSFILE\"\n }\n\n touch \"$STATUSFILE\"\n output=$(cat \"$STATUSFILE\")\n [ ! -z \"$output\" ] && echo \"$output\" || echo_status \"?\" \\#880088\n > \"$STATUSFILE\"\n write_data &", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://packages.python.org/gmailcount", "keywords": "email gmail script", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "gmailcount", "package_url": "https://pypi.org/project/gmailcount/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/gmailcount/", "project_urls": { "Homepage": "http://packages.python.org/gmailcount" }, "release_url": "https://pypi.org/project/gmailcount/0.1.5/", "requires_dist": null, "requires_python": "", "summary": "Script to count the number of emails in your gmail inbox", "version": "0.1.5" }, "last_serial": 2309835, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "d29b9da6a89bb5420feda1858b74f535", "sha256": "f791cbdd6cf4dceea09863051af9073fe0a104a30c5ccfa74c38558ece90f7f1" }, "downloads": -1, "filename": "gmailcount-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d29b9da6a89bb5420feda1858b74f535", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5080, "upload_time": "2016-03-06T00:24:45", "url": "https://files.pythonhosted.org/packages/c1/9d/a553b21c5dc465d568a364b5b9d2421514fc7907cc9b1f3f451c0181cc65/gmailcount-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "bef9318d03ed33f18f97f97171b4272d", "sha256": "cec4005da8e442ec7629c20398fa3c4ca4cc62c6fdb5b62f9ccef7441692b490" }, "downloads": -1, "filename": "gmailcount-0.1.2.tar.gz", "has_sig": false, "md5_digest": "bef9318d03ed33f18f97f97171b4272d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5054, "upload_time": "2016-03-06T00:51:56", "url": "https://files.pythonhosted.org/packages/47/09/9105879556614beadf39a99cd182a11bb84c64d1ae7a4fe8652036a8005e/gmailcount-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "3a4b4d151deb9c5d41d5cdb359014350", "sha256": "231a16bb17e933b443292d3706a2987d85fd2a960ea84b3e4379a971269e255b" }, "downloads": -1, "filename": "gmailcount-0.1.3.tar.gz", "has_sig": false, "md5_digest": "3a4b4d151deb9c5d41d5cdb359014350", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5128, "upload_time": "2016-08-20T15:02:28", "url": "https://files.pythonhosted.org/packages/6e/6c/37591709c014bad27518d15593f0a1e0c8e840831f8e85e86387cbc3f195/gmailcount-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "59ac5761ede6294691150553bf9019fd", "sha256": "657b19ed26051ce9737b98bbc9cfa61d0315452a8ea9df56f493de1bf285531f" }, "downloads": -1, "filename": "gmailcount-0.1.4.tar.gz", "has_sig": false, "md5_digest": "59ac5761ede6294691150553bf9019fd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5144, "upload_time": "2016-08-21T16:09:54", "url": "https://files.pythonhosted.org/packages/8b/61/1a3162025bd6b307f15a5be8a7ded59533e0302c56aa0c03f928a6322cd9/gmailcount-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "28cb2f91ab60352a9f1edfa70c928b43", "sha256": "ce12a8bfe0a4b303c0d1a398f4ad34caf7c66b7d39927f9df8b819bc34329cee" }, "downloads": -1, "filename": "gmailcount-0.1.5.tar.gz", "has_sig": false, "md5_digest": "28cb2f91ab60352a9f1edfa70c928b43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5649, "upload_time": "2016-08-28T19:49:13", "url": "https://files.pythonhosted.org/packages/9a/b6/2db300e74273b22b423b4f40e7350d5515d3bfcbd2e7058636fb2877ff0c/gmailcount-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "28cb2f91ab60352a9f1edfa70c928b43", "sha256": "ce12a8bfe0a4b303c0d1a398f4ad34caf7c66b7d39927f9df8b819bc34329cee" }, "downloads": -1, "filename": "gmailcount-0.1.5.tar.gz", "has_sig": false, "md5_digest": "28cb2f91ab60352a9f1edfa70c928b43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5649, "upload_time": "2016-08-28T19:49:13", "url": "https://files.pythonhosted.org/packages/9a/b6/2db300e74273b22b423b4f40e7350d5515d3bfcbd2e7058636fb2877ff0c/gmailcount-0.1.5.tar.gz" } ] }