diff --git a/beem/account.py b/beem/account.py index d1de3e8ba6a85602a118f046f7961cb5e0b549dc..2d469a905349b82674a4d9eaa7d973394be237f5 100644 --- a/beem/account.py +++ b/beem/account.py @@ -100,6 +100,8 @@ class Account(BlockchainObject): return self.reputation() def print_info(self, force_refresh=False, return_str=False): + """ Prints import information about the account + """ if force_refresh: self.refresh() self.steem.refresh_data(True) @@ -120,7 +122,7 @@ class Account(BlockchainObject): rep = int(self['reputation']) if rep == 0: return 25 - score = (math.log10(abs(rep)) - 9) * 9 + 25 + score = max([math.log10(abs(rep)) - 9, 0]) * 9 + 25 if rep < 0: score = 50 - score if precision is not None: @@ -173,7 +175,7 @@ class Account(BlockchainObject): if missing_vp < 0: return 0 recharge_seconds = missing_vp * 100 * 5 * 86400 / 10000 - return round(missing_vp * recharge_seconds / 60 / 60, precision) + return round(recharge_seconds / 60 / 60, precision) def get_recharge_reminder_minutes(self, voting_power_goal=100, precision=0): hours = self.get_recharge_hours(voting_power_goal=voting_power_goal, precision=5) diff --git a/beem/discussions.py b/beem/discussions.py index 47b4fd9cb3befa8762d80cac301a90dacbfe2d95..300c1d45681c6457e8f928ff2a39586d672616b1 100644 --- a/beem/discussions.py +++ b/beem/discussions.py @@ -7,9 +7,10 @@ log = logging.getLogger(__name__) class Query(dict): - def __init__(self, limit=0, truncate_body=0): + def __init__(self, limit=0, tag="", truncate_body=0): self["limit"] = limit self["truncate_body"] = truncate_body + self["tag"] = tag class Discussions_by_trending(list): @@ -185,7 +186,7 @@ class Discussions_by_hot(list): class Discussions_by_feed(list): """ get_discussions_by_feed - :param str discussion_query + :param str discussion_query, tag musst be set to a username :param steem steem_instance: Steem() instance to use when accesing a RPC """ def __init__(self, discussion_query, steem_instance=None): @@ -202,7 +203,7 @@ class Discussions_by_feed(list): class Discussions_by_blog(list): """ get_discussions_by_blog - :param str discussion_query + :param str discussion_query, tag musst be set to a username :param steem steem_instance: Steem() instance to use when accesing a RPC """ def __init__(self, discussion_query, steem_instance=None): diff --git a/beem/version.py b/beem/version.py index 831a9fbad673c30f9751ede24e138e91c7cf0e36..08c9290b22fe123c401be77c7ac188e139f76b9b 100644 --- a/beem/version.py +++ b/beem/version.py @@ -1,3 +1,3 @@ # THIS FILE IS GENERATED FROM beem SETUP.PY -version = '0.19.5' +version = '0.19.6' diff --git a/beemapi/version.py b/beemapi/version.py index 831a9fbad673c30f9751ede24e138e91c7cf0e36..08c9290b22fe123c401be77c7ac188e139f76b9b 100644 --- a/beemapi/version.py +++ b/beemapi/version.py @@ -1,3 +1,3 @@ # THIS FILE IS GENERATED FROM beem SETUP.PY -version = '0.19.5' +version = '0.19.6' diff --git a/beembase/version.py b/beembase/version.py index 831a9fbad673c30f9751ede24e138e91c7cf0e36..08c9290b22fe123c401be77c7ac188e139f76b9b 100644 --- a/beembase/version.py +++ b/beembase/version.py @@ -1,3 +1,3 @@ # THIS FILE IS GENERATED FROM beem SETUP.PY -version = '0.19.5' +version = '0.19.6' diff --git a/setup.py b/setup.py index 3624536bd332928d1357a36823028786da3a10cd..1d0178abc5561f6bdbdbbc9ab75e65266273848c 100755 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ except LookupError: ascii = codecs.lookup('ascii') codecs.register(lambda name, enc=ascii: {True: enc}.get(name == 'mbcs')) -VERSION = '0.19.5' +VERSION = '0.19.6' def write_version_py(filename):