Skip to content

Main

Main module for the hash checker program.

main()

Main function to handle user input for file or path configuration.

Prompts the user to input either 'Name' for file configuration, 'Path' for path configuration, or 'Exit' to exit the program. Based on the input, it calls the appropriate function or exits the program.

Raises:

Type Description
SystemExit

If the user chooses to exit the program.

Source code in verdict_hasher/main.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def main():
    """
    Main function to handle user input for file or path configuration.

    Prompts the user to input either 'Name' for file configuration, 'Path'
    for path configuration,
    or 'Exit' to exit the program. Based on the input,
    it calls the appropriate function
    or exits the program.

    Raises:
        SystemExit: If the user chooses to exit the program.
    """
    user_config = qy.select(
        "File name or path? (or exit program)",
        choices=[
            "Name",
            "Path",
            "Exit"
        ]
    ).ask()
    if user_config == "Name":
        file_config()
    elif user_config == "Path":
        path_config()
    elif user_config == "Exit":
        print("Exiting Program...")
        sys.exit(0)
    else:
        print("Input not accepted")

Main entry point for verdict_hasher.