diff --git a/src/catchup.py b/src/catchup.py index 601af04..f037f8e 100644 --- a/src/catchup.py +++ b/src/catchup.py @@ -161,4 +161,4 @@ async def run(program_args): return False if errored: - return False \ No newline at end of file + return False diff --git a/src/main.py b/src/main.py index 2ed953c..ede699f 100644 --- a/src/main.py +++ b/src/main.py @@ -45,23 +45,39 @@ async def async_main(): global PROGRAM_ARGS ## Determine running mode - match PROGRAM_ARGS.mode.lower(): - case 'l' | 'listen': - print('RUNNING IN LISTEN MODE\n') + # match PROGRAM_ARGS.mode.lower(): + # case 'l' | 'listen': + # print('RUNNING IN LISTEN MODE\n') + # await listen.run() + # case 'c' | 'catchup': + # print('RUNNING IN CATCH-UP MODE\n') + # if await catchup.run(PROGRAM_ARGS) and PROGRAM_ARGS.auto_listen: + # print('CATCH-UP MODE DONE, GOING INTO LISTEN MODE') + # await listen.run() + # case 'd' | 'delete-all': + # print('WARNING: SELF-DESTRUCT MODE') + # await self_destruct() + # case 'cmd': + # command_line() + # case _: + # print('\ninvalid mode. run with no arguments or "-h" for help page, including mode list.') + # return + mode = PROGRAM_ARGS.mode.lower() + if mode in ['l', 'listen']: + print('RUNNING IN LISTEN MODE') + await listen.run() + elif mode in ['c', 'catchup']: + print('RUNNING IN CATCH UP MODE') + if await catchup.run(PROGRAM_ARGS) and PROGRAM_ARGS.auto_listen: + print('CATCH UP MODE DONE, GOING INTO LISTEN MODE') await listen.run() - case 'c' | 'catchup': - print('RUNNING IN CATCH-UP MODE\n') - if await catchup.run(PROGRAM_ARGS) and PROGRAM_ARGS.auto_listen: - print('CATCH-UP MODE DONE, GOING INTO LISTEN MODE') - await listen.run() - case 'd' | 'delete-all': - print('WARNING: SELF-DESTRUCT MODE') - await self_destruct() - case 'cmd': - command_line() - case _: - print('\ninvalid mode. run with no arguments or "-h" for help page, including mode list.') - return + elif mode in ['d', 'delete-all']: + print('WARNING: SELF-DESTRUCT MODE') + await self_destruct() + elif mode == 'cmd': + command_line() + else: + print('\ninvalid mode. run with no arguments or -h for help and modes') def main(): global PROGRAM_ARGS @@ -92,4 +108,4 @@ def main(): if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/src/twapi.py b/src/twapi.py index 8d07315..43b5a6b 100644 --- a/src/twapi.py +++ b/src/twapi.py @@ -220,6 +220,8 @@ class TwAPI: text = create_text() try: + # print('creating reply img') + # media_ids = [await self.get_ttweet_image_media_id(ttweet)] print('posting main tweet') twt_resp = await self.post_tweet(text) twt_id = twt_resp.data['id'] @@ -242,4 +244,4 @@ class TwAPI: - \ No newline at end of file +