Skip to content

Commit

Permalink
python3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
hako committed Mar 3, 2018
1 parent 061f638 commit 40ee136
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Wesley Hill
Copyright (c) 2018 Wesley Hill
Copyright (c) 2013 Dan Claudiu Pop

Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ instalation and usage:

``pip install bbcli``

or

``pip3 install bbcli``

and then in terminal:

``bbcli``
Expand Down
2 changes: 1 addition & 1 deletion bbcli/bbcapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from defusedxml import minidom

API_BASE_URL = "http://trevor-producer-cdn.api.bbci.co.uk"
API_BASE_URL = "https://trevor-producer-cdn.api.bbci.co.uk"
BBC_URL = "https://www.bbc.co.uk"
BBC_POLLING_URL = "https://polling.bbc.co.uk"

Expand Down
6 changes: 3 additions & 3 deletions bbcli/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def make_screen(self):
self.loop.screen.set_terminal_properties(colors=256)
self.update_ticker()
self.loop.set_alarm_in(200, self._wrapped_refresh)
self.loop.set_alarm_in(5, self.next)
self.loop.set_alarm_in(5, self.next_item)

def set_keys(self):
global _config
Expand Down Expand Up @@ -303,7 +303,7 @@ def get_tickers(self):
def set_latest_links(self, link):
self.link = link

def next(self, loop, *args):
def next_item(self, loop, *args):
text = self.tickers
if(not text):
self.link = ''
Expand All @@ -327,7 +327,7 @@ def next(self, loop, *args):
else:
self.set_status_bar("[" + text[self.ticker_count].prompt +"] " + text[self.ticker_count].headline.encode('ascii', 'ignore'))
self.set_latest_links(text[self.ticker_count].url)
self.loop.set_alarm_in(10, self.next)
self.loop.set_alarm_in(10, self.next_item)

def _wrapped_refresh(self, loop, *args):
online = self.isOnline()
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name='bbcli',
version='0.2.3',
version='0.2.4',
description='Browse BBC News like a hacker. (based on pyhackernews)',
long_description=open('README.rst').read(),
license=open('LICENSE').read(),
Expand All @@ -18,9 +18,11 @@
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: Unix',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Terminals',
],
use_2to3=True,
entry_points={
'console_scripts': ['bbcli = bbcli.core:live']
})

0 comments on commit 40ee136

Please sign in to comment.