diff --git a/bump/bump.py b/bump/bump.py index ea298fe..460c1d5 100644 --- a/bump/bump.py +++ b/bump/bump.py @@ -249,9 +249,9 @@ class Bump: while True: time.sleep(sleep_time) messages = self.list() - for message in messages: + for message in messages['messages']: if self._to_log_line(message) not in log and message != {}: - print(message['data']) + print({'title': message['title'], 'data': message['data']}) self._save_log(message) - log = self.load_log() + log = self._load_log() diff --git a/bump/cli.py b/bump/cli.py index dd33099..be7d8e4 100644 --- a/bump/cli.py +++ b/bump/cli.py @@ -6,8 +6,8 @@ import typer def default( message_arg:Optional[str] = typer.Argument(None, help="The message to be bumped"), message:Optional[str] = typer.Option(None, help="The message to be bumped"), - reset:bool = typer.Option(False, help="remove all senders"), - alert:Optional[str] = typer.Option(None, help="check continuously for new messages"), + reset:Optional[bool] = typer.Option(False, help="remove all senders"), + alert:Optional[bool] = typer.Option(False, help="check continuously for new messages"), secret:Optional[str] = typer.Option(None, help="change the sender and e2e keys")): bp = bump.Bump() if message_arg is not None: @@ -19,7 +19,7 @@ def default( elif reset: delete_senders() elif alert is not None: - alert() + alert_process() else: info() @@ -27,7 +27,7 @@ def delete_senders(): bp = bump.Bump() bp.delete_senders() -def alert(): +def alert_process(): bp = bump.Bump() bp.alert() diff --git a/setup.py b/setup.py index 5719074..720ccf0 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='bump_python', packages=['bump'], description='Notify your Phone from Python', - version='0.1.3', + version='0.1.4', url='https://git.maenle.tech/raphael/bump_python', author='Raphael Maenle', author_email='raphael@maenle.net',