TUI

The TUI package implements the necessary functions to display a simple version of the app in the user terminal. This package uses the rich package to print a more prettier prompt than the one you can make manually.

This package access to the database configured in the CORE package. This package also offers a simple login and a menu with different options to perform like add a new password, list all the passwords of the user or modify one of them.

This package is installed as command-line entry on the user terminal- you can check more information in Installation - when installed, the user only has to enter epass and the login will prompt. It also adds another command named epass-help which will prompt a help of how to use the epass command. epass-help prompts the help text like if it was a Markdown file! To exit the app the user just simply needs to enter Ctrl+C

Example of the login prompt:

________         ________
|   ____|        |   __  |
|   |__    ___   |  |__| |  __ _      ____   ____
|   ___|  |___|  |  _____| / _` |    / __/  / __/
|   |___         |  |      |(_| |  __\ \  __\ \
|_______|        |__|      \__,_| |____/ |____/

Welcome to a fast and smart password manager for the linux terminal lovers.




1. Login.
2. Create a new user
3. Remember password [1/2/3]:

UIManager

This module implements the necessary functions to make a functional Terminal User Interface application. This module uses the rich package to make a prettier TUI.

TUI.UIManager.create_main_menu()[source]

This function prints a table with all the options to the user. This function is called by the mainMenu()

Returns

It returns the table with the six options

Return type

rich.table.Table

TUI.UIManager.create_user_data_menu()[source]

This function prints a table with all the data of the user. This function is called by the mainMenu() when the user selects the option: 1. List user data

Returns

It returns a table with all the data

Return type

rich.table.Table

TUI.UIManager.login()[source]

This function is the first one to run. It shows the app logo and three decisions.

  • login

  • register

  • remember password

The user has to select one of them by typing the number given. This function responds if the user types Ctrl+C and leaves the app without throwing an exception. This function implements an infinite loop and asks the user for the three options. If the user fails during the login it asks about the three options again until enters the data successfully. When the user finish to register his account the prompt asks once again to select one of the three options.

1. If the user decides to log in, the prompt ask for the username and the passwords. If they are correct it shows the main menu, if not, it asks once again for the password.

2. If the user decides to register a new one, the prompt ask for the new username, his master password and his email. Before that, the prompt automatically redirects to the log in prompt again.

Note

The remember password function is under development but in resume; this function will email the user with the value of the password.

TUI.UIManager.main_menu()[source]

This function shows a main menu with six different options that the user can select. This function uses an infinite loop and the user selects one of the options given; to exit the loop the user has to enter Crtl+C. The six options for now are this:

  1. Show menu : this option shows again the menu with the different options

  2. List user data : this option shows all the data of the user logged

2. Select a password : this options ask for the ID of the password, and then it copies the password value to the clipboard

3. Add a new entry : this option ask the user to enter all the necessary data for the passwords such as the username, the site name and the password

4. Update password : this option ask the user to enter the ID of the password that wants to update, and then it asks for the new password

5. Update username : this option ask the user the ID of the username that wants to update, then it asks for the new username

  1. Delete an entry : this option ask the user the ID of the password that wants to delete

exit : this option exits the infinite loop and the app

TUI.UIManager.tui_help()[source]

This function just simply shows a simple help for the user. It prints all the data from TUI.TUIHelp and then it exists the app

TUIHelp

This module is used to print a simple help in the TUI.