diff --git a/README.md b/README.md index 95d6390..3390f6d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ HackerTray ========== -[![HackerTray on crate.io](https://pypip.in/v/hackertray/badge.png)](https://crate.io/packages/hackertray/) +[![HackerTray on PyPi](https://pypip.in/v/hackertray/badge.png)](https://pypi.python.org/pypi/hackertray/) [![HackerTray on PyPi](https://pypip.in/d/hackertray/badge.png)](https://pypi.python.org/pypi/hackertray/) [![Build Status](https://travis-ci.org/captn3m0/hackertray.png?branch=master)](https://travis-ci.org/captn3m0/hackertray) @@ -57,10 +57,6 @@ need to clear the pip cache before upgrading: 3. Remembers which links you opened 4. Shows Points/Comment count in a simple format -##To-Do -- Auto Start -- Try to convert right click to comments link - ##Author Information - Abhay Rana () diff --git a/hackertray/__init__.py b/hackertray/__init__.py index a164313..e29496a 100644 --- a/hackertray/__init__.py +++ b/hackertray/__init__.py @@ -32,7 +32,7 @@ from hackernews import HackerNews class HackerNewsApp: HN_URL_PREFIX = "https://news.ycombinator.com/item?id=" - def __init__(self): + def __init__(self, comments): #Load the database home = expanduser("~") with open(home + '/.hackertray.json', 'a+') as content_file: @@ -52,7 +52,7 @@ class HackerNewsApp: self.menu = gtk.Menu() #The default state is false, and it toggles when you click on it - self.commentState = False + self.commentState = comments # create items for the menu - refresh, quit and a separator menuSeparator = gtk.SeparatorMenuItem() @@ -61,6 +61,7 @@ class HackerNewsApp: btnComments = gtk.CheckMenuItem("Show Comments") btnComments.show() + btnComments.set_active(comments) btnComments.connect("activate", self.toggleComments) self.menu.append(btnComments) @@ -162,7 +163,9 @@ class HackerNewsApp: def main(): parser = argparse.ArgumentParser(description='Hacker News in your System Tray') - parser.add_argument('--version', action='version', version=__version) - parser.parse_args() - indicator = HackerNewsApp() + parser.add_argument('-v','--version', action='version', version=__version) + parser.add_argument('-c','--comments', dest='comments',action='store_true', help="Load the HN comments link for the article as well") + parser.set_defaults(comments=False) + args = parser.parse_args() + indicator = HackerNewsApp(args.comments) indicator.run() diff --git a/setup.py b/setup.py index 86d94ec..3c2274d 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ if sys.version_info < (2, 7): requirements.append('argparse') setup(name='hackertray', - version='1.9.5', + version='2.0.0', description='Hacker News app that sits in your System Tray', long_description='HackerTray is a simple Hacker News Linux application that lets you view top HN stories in your System Tray. It relies on appindicator, so it is not guaranteed to work on all systems. It also provides a Gtk StatusIcon fallback in case AppIndicator is not available.', keywords='hacker news hn tray system tray icon hackertray',