-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Menu parser #35
base: main
Are you sure you want to change the base?
Menu parser #35
Conversation
case _: | ||
return "ERROR the day selected doesn't exist" | ||
|
||
return menu_of_the_day |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this entire function is not necessary
module/menuparser/menu.py
Outdated
i_str = str(i) | ||
current_course = w_s[table_char + i_str].value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i_str = str(i) | |
current_course = w_s[table_char + i_str].value | |
current_course = w_s[table_char + str(i)].value |
module/menuparser/menu.py
Outdated
for i in range (4, 15): | ||
i_str = str(i) | ||
current_course = w_s[table_char + i_str].value | ||
menu_of_the_day.append(current_course) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or, if you want:
for i in range (4, 15): | |
i_str = str(i) | |
current_course = w_s[table_char + i_str].value | |
menu_of_the_day.append(current_course) | |
menu_of_the_day = [w_s[table_char + str(i)].value for i in range (4, 15)] | |
return menu_of_the_day |
removing the menu_of_the_day = []
at the top of the function
module/menuparser/menu.py
Outdated
for i in range(len(menu_list)): | ||
print(menu_list[i]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for i in range(len(menu_list)): | |
print(menu_list[i]) | |
for menu_item in menu_list: | |
print(menu_item) |
module/menuparser/menu.py
Outdated
#Calls to the functions for testing | ||
table = open_menu(MENU_PATH) | ||
menu = scroll_table(table, 1) | ||
|
||
print_function(menu) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could wrap this into a if __name__ == "__main__":
initial set up for the menù