Display a table with list of tasks and their associated commands.
()
| 4 | |
| 5 | |
| 6 | def print_menu(): |
| 7 | """Display a table with list of tasks and their associated commands.""" |
| 8 | speak("I can do the following") |
| 9 | table = Table(title="\nI can do the following :- ", show_lines=True) |
| 10 | |
| 11 | table.add_column("Sr. No.", style="cyan", no_wrap=True) |
| 12 | table.add_column("Task", style="yellow") |
| 13 | table.add_column("Command", justify="left", style="green") |
| 14 | |
| 15 | table.add_row("1", "Speak Text entered by User", "text to speech") |
| 16 | table.add_row("2", "Search anything on Google", "Search on Google") |
| 17 | table.add_row("3", "Search anything on Wikipedia", "Search on Wikipedia") |
| 18 | table.add_row("4", "Read a MS Word(docx) document", "Read MS Word document") |
| 19 | table.add_row("5", "Convert speech to text", "Convert speech to text") |
| 20 | table.add_row("6", "Read a book(PDF)", "Read a book ") |
| 21 | table.add_row("7", "Quit the program", "Python close") |
| 22 | |
| 23 | console = Console() |
| 24 | console.print(table) |
| 25 | |
| 26 | |
| 27 | # print_menu() |