-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconstants.py
More file actions
111 lines (106 loc) · 5.23 KB
/
constants.py
File metadata and controls
111 lines (106 loc) · 5.23 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
TITLE = f"\t\t\tPersonal Assistant\t\033[33mteam K-9 project"
FILENAME = "addressbook.bin"
NOTE_FILENAME = "notes.bin"
BLACK = "\033[30m"
RED = "\033[31m"
GREEN = "\033[32m"
BLUE = "\033[34m"
YELLOW = "\033[33m"
MAGENTA = "\033[35m"
CYAN = "\033[36m"
WHITE = "\033[37m"
GRAY = "\033[90m"
RESET = "\033[0m"
LEN_OF_NAME_FIELD = 12 # довжина поля для виводу імені
HELP_LIST = [
# 0
f"\t{YELLOW}add_contact {CYAN}<name> <phone>{GRAY}*n {CYAN}<birthday> {RESET} - add a new contact with a phone number(s) and birthday(optional)",
f"\t{GRAY} (you can enter several phone numbers for a contact){RESET}",
f"\t{YELLOW}add_phone {CYAN}<name> <new_phone>{GRAY}*n {RESET} - add the new phone number for an existing contact",
f"\t{GRAY} (you can enter several phone numbers for a contact){RESET}",
f'\t{YELLOW}add_bd {CYAN}<name> <birthday> {RESET} - add the birthday data ("dd-mm-yyyy") for an existing contact',
f"\t{YELLOW}add_address {CYAN}<name> <address> {RESET} - add the address for an existing contact",
f"\t{YELLOW}add_email {CYAN}<name> <e-mail> {RESET} - add the e-mail for an existing contact",
f"\t{YELLOW}add_note {CYAN}<title> <content> <#tag> {RESET} - add the new note. The title cannot contain spaces.",
f"\t{GRAY} (if you need several words in the title, use `_` or `-` between words)",
f"\t{YELLOW}add_tag {CYAN}<title> <#tag> {RESET} - add the #tag for an existing note",
# 10
f"\t{YELLOW}change_name {CYAN}<name> <new_name> {RESET} - change the name for an existing contact",
f"\t{YELLOW}change_phone {CYAN}<name> <phone> <new_phone> {RESET} - change the phone number for an existing contact",
f"\t{YELLOW}change_bd {CYAN}<name> <new_birthday> {RESET} - change the birthday data for an existing contact",
f"\t{YELLOW}change_address {CYAN}<name> <new_address> {RESET} - change the phone number for an existing contact",
f"\t{YELLOW}change_email {CYAN}<name> <email> <new_email> {RESET} - change the phone number for an existing contact",
f"\t{YELLOW}change_note {CYAN}<title> <new_content> {RESET} - change the existing note",
f"\t{YELLOW}change_tag {CYAN}<title> <#tag> <#new_tag> {RESET} - change #tag in existing note",
# 17
f"\t{YELLOW}delete_contact {CYAN}<name> {RESET} - remove an existing contact",
f"\t{YELLOW}delete_phone {CYAN}<name> <phone> {RESET} - delete one phone number from an existing contact",
f"\t{YELLOW}delete_address {CYAN}<name> {RESET} - delete address from an existing contact",
f"\t{YELLOW}delete_email {CYAN}<name> <email> {RESET} - delete one e-mail from an existing contact",
f"\t{YELLOW}delete_note {CYAN}<title> {RESET} - delete an existing note",
f"\t{YELLOW}delete_tag {CYAN}<title> <#tag> {RESET} - delete one #tag from an existing note",
# 23
f"\t{YELLOW}search {CYAN}<anything> {RESET} - search for any string (>= 3 characters) in the contact data",
f"\t{YELLOW}name {CYAN}<name> {RESET} - search record by the name",
f"\t{YELLOW}birthdays {CYAN}<days> {RESET} - a list of contacts who have a birthday within {GRAY}<days>{RESET} days",
f"\t{YELLOW}list {GRAY}<pages> {RESET} - show all contacts, {GRAY}<pages>(optional) - lines per page{RESET}",
f"\t{YELLOW}list_notes {GRAY}<pages> {RESET} - show all notes, {GRAY}<pages>(optional) - lines per page{RESET}",
f"\t{YELLOW}sort_path {CYAN}<path> {RESET} - sort files by in the folders",
# 29
f"\t{YELLOW}exit {RESET} - exit from PhoneBook",
f"\t{YELLOW}help {RESET} - this help-page",
# 31
]
HELP_LIST_ADD = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
HELP_LIST_EDIT = [10, 11, 12, 13, 14, 15, 16]
HELP_LIST_DEL = [17, 18, 19, 20, 21, 22]
HELP_LIST_CONTACT = [0, 1, 10, 17]
HELP_LIST_PHONE = [2, 3, 11, 18]
HELP_LIST_NOTE = [7, 8, 9, 15, 16, 21, 22, 27]
HELP_LIST_FIND = [23, 24, 26, 27]
PROMPT_COMMANDS = [
# 'add_record',
"add_contact",
"add_phone",
# "add_phones",
"add_birthday",
"add_address",
"add_email",
"add_note",
"add_tag",
"change_birthday",
"change_address",
"change_name",
# "change_address",
"change_phone",
"change_email",
"change_note",
"change_tag",
"edit_birthday",
"edit_address",
"edit_name",
"edit_phone",
"edit_email",
"edit_note",
"edit_tag",
"delete_contact",
"delete_phone",
# "delete_record",
"delete_address",
"delete_email",
"delete_note",
"delete_tag",
"find_name",
"birthdays",
"search",
"find_any",
"help",
"show",
"list",
"show_notes",
"list_notes",
"search_notes",
"exit",
"close",
"sort_path",
]