app/home_page.py
def update_fighters_btn_command(self):
        """Ask user a question if he wants to update fighter stats.
        If yes - show update process elements & run update_fighters method """

        # ask user a question
        mbox = messagebox.askquestion(
            title="Update Fighters",
            message="Are You sure You want to update fighter stats?\n"
                    "It will take at most 2 minutes.\n"
                    "Of course You will be informed about all the process :).")

        if mbox == 'yes':

            # run time counter
            # self.counter = time.perf_counter()

            # show update bar
            self.update_process_bar.place(x=63, y=770)

            # show update text
            self.canvas_background.itemconfigure(
                tagOrId=self.update_process_text,
                text=f"0/{self.amount_of_fighters}")

            # change last update info
            self.canvas_background.itemconfigure(
                tagOrId=self.last_update_date,
                text=self.todays_date
            )

            # save the new date of an update
            with open(file="app/static/last_update.txt", mode='w+') as f:
                f.write(self.todays_date)
                f.close()

            # run updating method
            # self.update_fighters(fighter_url_list=self.fighter_url_list)

            #-------------------------------------------------------------
            # created in case of github
            messagebox.showinfo(
                title='Info',
                message="Due to the site's rights, I cannot share the "
                        "full searching algorithm. Instead, I encourage "
                        "You guys to have a look on a video & photos to "
                        "see how it is working in a real time (presentation dir).")
            self.canvas_background.itemconfigure(
                tagOrId=self.update_process_text,
                text=f"{self.amount_of_fighters}/{self.amount_of_fighters}")
            self.update_process_bar.configure(value=self.amount_of_fighters)
Ask user a question if he wants to update fighter stats.
        If yes - show update process elements & run update_fighters method 
Ask user a question if he wants to update fighter stats.
If yes - show update process elements & run update_fighters method
Ask user a question if he wants to update fighter stats . If yes - show update process elements & run update_fighters method
def update_fighters_btn_command(self):
        mbox = messagebox.askquestion(
            title="Update Fighters",
            message="Are You sure You want to update fighter stats?\n"
                    "It will take at most 2 minutes.\n"
                    "Of course You will be informed about all the process :).")
        if mbox == 'yes':
            self.update_process_bar.place(x=63, y=770)
            self.canvas_background.itemconfigure(
                tagOrId=self.update_process_text,
                text=f"0/{self.amount_of_fighters}")
            self.canvas_background.itemconfigure(
                tagOrId=self.last_update_date,
                text=self.todays_date
            )
            with open(file="app/static/last_update.txt", mode='w+') as f:
                f.write(self.todays_date)
                f.close()
            messagebox.showinfo(
                title='Info',
                message="Due to the site's rights, I cannot share the "
                        "full searching algorithm. Instead, I encourage "
                        "You guys to have a look on a video & photos to "
                        "see how it is working in a real time (presentation dir).")
            self.canvas_background.itemconfigure(
                tagOrId=self.update_process_text,
                text=f"{self.amount_of_fighters}/{self.amount_of_fighters}")
            self.update_process_bar.configure(value=self.amount_of_fighters)
def update_fighters_btn_command ( self ) : mbox = messagebox . askquestion ( title = "Update Fighters" , message = "Are You sure You want to update fighter stats?\n" "It will take at most 2 minutes.\n" "Of course You will be informed about all the process :)." ) if mbox == 'yes' : self . update_process_bar . place ( x = 63 , y = 770 ) self . canvas_background . itemconfigure ( tagOrId = self . update_process_text , text = f"0/{self.amount_of_fighters}" ) self . canvas_background . itemconfigure ( tagOrId = self . last_update_date , text = self . todays_date ) with open ( file = "app/static/last_update.txt" , mode = 'w+' ) as f : f . write ( self . todays_date ) f . close ( ) messagebox . showinfo ( title = 'Info' , message = "Due to the site's rights, I cannot share the " "full searching algorithm. Instead, I encourage " "You guys to have a look on a video & photos to " "see how it is working in a real time (presentation dir)." ) self . canvas_background . itemconfigure ( tagOrId = self . update_process_text , text = f"{self.amount_of_fighters}/{self.amount_of_fighters}" ) self . update_process_bar . configure ( value = self . amount_of_fighters )
Ask user a question if he wants to update fighter stats.
Ask user a question if he wants to update fighter stats .
"""Ask user a question if he wants to update fighter stats.
        If yes - show update process elements & run update_fighters method """ # ask user a question # run time counter # self.counter = time.perf_counter() # show update bar # show update text # change last update info # save the new date of an update # run updating method # self.update_fighters(fighter_url_list=self.fighter_url_list) #------------------------------------------------------------- # created in case of github
self