1919 is_flag = True ,
2020 help = 'This option is under construction.'
2121 )
22- def main (text , text_from_file , file ):
22+ @click .option (
23+ '-a' , '--animation' ,
24+ is_flag = True ,
25+ help = 'Enable custom animation-style print for the output.'
26+ )
27+
28+ def main (text , text_from_file , file , animation ):
2329 if file :
2430 click .echo ("The '--file' option is under construction." )
2531 return
@@ -34,16 +40,28 @@ def main(text, text_from_file, file):
3440 return
3541
3642 padded_input_string = InputPadder (input_string ).pad_input ()
37- custom_printer = CustomPrint (f"\033 [33mPadded Input String: \033 [0m\033 [36m{ padded_input_string } \033 [0m" )
38- custom_printer .custom_print ()
43+
44+ if animation :
45+ custom_printer = CustomPrint (f"\n \033 [33mPadded Input String: \033 [0m\033 [36m{ padded_input_string } \033 [0m" )
46+ custom_printer .custom_print ()
47+ else :
48+ click .echo (f"\n Padded Input String: { padded_input_string } " )
3949
4050 expanded_message_schedule = InputParser (padded_input_string ).process_chunks ()
41- custom_printer .text = f"\033 [33mExpanded Message Schedule: \033 [0m\033 [36m{ expanded_message_schedule } \033 [0m"
42- custom_printer .custom_print ()
51+
52+ if animation :
53+ custom_printer .text = f"\n \033 [33mExpanded Message Schedule: \033 [0m\033 [36m{ expanded_message_schedule } \033 [0m"
54+ custom_printer .custom_print ()
55+ else :
56+ click .echo (f"\n Expanded Message Schedule: { expanded_message_schedule } " )
4357
4458 hash_result = MainClass (expanded_message_schedule ).hash_message ()
45- custom_printer .text = f"\033 [33mThe Hash Result: \033 [0m\033 [36m{ hash_result } \033 [0m"
46- custom_printer .custom_print ()
59+
60+ if animation :
61+ custom_printer .text = f"\n \033 [33mThe Hash Result: \033 [0m\033 [36m{ hash_result } \033 [0m"
62+ custom_printer .custom_print ()
63+ else :
64+ click .echo (f"\n The Hash Result: { hash_result } " )
4765
4866if __name__ == '__main__' :
4967 main ()
0 commit comments