This repository was archived by the owner on Aug 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathprompt.py
65 lines (43 loc) · 1.84 KB
/
prompt.py
1
2
3
4
5
6
7
8
9
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
from rich import print as rich_print
from src.console import console
def on_watch_start(exercise_path):
rich_print("[bold]:robot::robot::robot: Watch mode started.[/bold]")
rich_print(f"You can start to work on exercise {exercise_path}.\n")
def on_single_exercise_success(exercise_path):
console.clear()
rich_print(
f"[bold green]:partying_face::partying_face::partying_face: Exercise {exercise_path} completed![/bold green]"
)
def on_watch_exercise_success():
rich_print("You can keep working on this exercise,")
rich_print("or move on to the next one by removing the `I AM NOT DONE` comment.\n")
def on_watch_no_next_exercise():
rich_print("Congratulations! You have completed all the exercises!")
def on_exercise_failure(exercise_path, error_message):
console.clear()
rich_print(
f"[red]:construction: Exercise {exercise_path} failed. Please try again.[/red]"
)
rich_print(error_message)
def on_exercise_check(exercise_path):
console.clear()
rich_print(f"[gray]:eyes: Checking exercise {exercise_path}...[/gray]")
def on_file_not_found():
console.clear()
rich_print(
"[red]:face_with_monocle: Creepy crap it looks that you are not running this script from the root directory of the repository.[/red]"
)
rich_print(
"[red]Please make sure you are running the CLI from the cloned Starklings repository.[/red]"
)
def on_user_verification(verification_uri: str, verification_code: str):
console.clear()
rich_print(
f"Please visit {verification_uri} to login and enter the following code: [bold]{verification_code}[/bold]"
)
def on_nft_mint():
rich_print("Your NFT is being minted")
def on_nft_mint_failed():
rich_print("Failed to mint your NFT")
def waiting_for_user_login():
return console.status("Waiting for user login...")