Skip to content

Commit 82ae5de

Browse files
authored
Merge pull request #10 from hako/python3
add python 3 support
2 parents 061f638 + 40ee136 commit 82ae5de

5 files changed

Lines changed: 13 additions & 7 deletions

File tree

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015 Wesley Hill
3+
Copyright (c) 2018 Wesley Hill
44
Copyright (c) 2013 Dan Claudiu Pop
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy of

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ instalation and usage:
1010

1111
``pip install bbcli``
1212

13+
or
14+
15+
``pip3 install bbcli``
16+
1317
and then in terminal:
1418

1519
``bbcli``

bbcli/bbcapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from defusedxml import minidom
88

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

bbcli/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def make_screen(self):
172172
self.loop.screen.set_terminal_properties(colors=256)
173173
self.update_ticker()
174174
self.loop.set_alarm_in(200, self._wrapped_refresh)
175-
self.loop.set_alarm_in(5, self.next)
175+
self.loop.set_alarm_in(5, self.next_item)
176176

177177
def set_keys(self):
178178
global _config
@@ -303,7 +303,7 @@ def get_tickers(self):
303303
def set_latest_links(self, link):
304304
self.link = link
305305

306-
def next(self, loop, *args):
306+
def next_item(self, loop, *args):
307307
text = self.tickers
308308
if(not text):
309309
self.link = ''
@@ -327,7 +327,7 @@ def next(self, loop, *args):
327327
else:
328328
self.set_status_bar("[" + text[self.ticker_count].prompt +"] " + text[self.ticker_count].headline.encode('ascii', 'ignore'))
329329
self.set_latest_links(text[self.ticker_count].url)
330-
self.loop.set_alarm_in(10, self.next)
330+
self.loop.set_alarm_in(10, self.next_item)
331331

332332
def _wrapped_refresh(self, loop, *args):
333333
online = self.isOnline()

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
setup(
55
name='bbcli',
6-
version='0.2.3',
6+
version='0.2.4',
77
description='Browse BBC News like a hacker. (based on pyhackernews)',
88
long_description=open('README.rst').read(),
99
license=open('LICENSE').read(),
@@ -18,9 +18,11 @@
1818
'License :: OSI Approved :: MIT License',
1919
'Natural Language :: English',
2020
'Operating System :: Unix',
21-
'Programming Language :: Python :: 2.7',
21+
'Programming Language :: Python :: 2',
22+
'Programming Language :: Python :: 3',
2223
'Topic :: Terminals',
2324
],
25+
use_2to3=True,
2426
entry_points={
2527
'console_scripts': ['bbcli = bbcli.core:live']
2628
})

0 commit comments

Comments
 (0)