From 97baeb2dec6b2594ea1a3ea4caa27ff4cb68b4ce Mon Sep 17 00:00:00 2001 From: Nicholas de Paola Date: Sun, 18 Feb 2024 22:20:31 +1000 Subject: [PATCH] a polite request and some minor tweaks --- desktop-tool/autofill.py | 9 +++++++-- desktop-tool/src/driver.py | 7 +++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/desktop-tool/autofill.py b/desktop-tool/autofill.py index e41c2d2e2..e6c5b71f7 100644 --- a/desktop-tool/autofill.py +++ b/desktop-tool/autofill.py @@ -10,7 +10,7 @@ from src.driver import AutofillDriver from src.pdf_maker import PdfExporter from src.processing import ImagePostProcessingConfig -from src.utils import TEXT_BOLD, TEXT_END +from src.utils import bold # https://stackoverflow.com/questions/12492810/python-how-can-i-make-the-ansi-escape-codes-to-work-also-in-windows os.system("") # enables ansi escape characters in terminal @@ -156,8 +156,13 @@ def main( auto_save_threshold=auto_save_threshold if auto_save else None, post_processing_config=post_processing_config, ) + input( + f"If this software has brought you joy and you'd like to throw a few bucks my way,\n" + f"you can find my tip jar here: {bold('https://www.buymeacoffee.com/chilli.axe')}\n\n" + f"Press Enter to close this window - your browser window will remain open.\n" + ) except Exception as e: - print(f"An uncaught exception occurred:\n{TEXT_BOLD}{e}{TEXT_END}\n") + print(f"An uncaught exception occurred:\n{bold(e)}\n") input("Press Enter to exit.") diff --git a/desktop-tool/src/driver.py b/desktop-tool/src/driver.py index 63b751a58..b7902a4e7 100644 --- a/desktop-tool/src/driver.py +++ b/desktop-tool/src/driver.py @@ -440,7 +440,7 @@ def set_bracket(self, dropdown_id: str) -> None: ) bracket = bracket_options[0] print( - f"Configuring your project of {bold(self.order.details.quantity)} " + f"Configuring your project of {bold(self.order.details.quantity)} cards " f"in the bracket of up to {bold(bracket)} cards." ) qty_dropdown.select_by_value(str(bracket)) @@ -668,14 +668,13 @@ def execute( self.insert_backs(auto_save_threshold) self.page_to_review() log_hours_minutes_seconds_elapsed(t) - input( + print( textwrap.dedent( f""" Please review your order and ensure everything has been uploaded correctly before finalising with {self.target_site.name}. If any images failed to download, links to download them will have been printed above. If you need to make any changes to your order, you can do so by adding it to your Saved Projects - and editing in your normal browser. Press Enter to close this window - your browser window will remain - open. + and editing in your normal browser. """ ) )