Skip to content

The PhoneBook CLI Application is a powerful and user-friendly command-line tool designed to manage your contacts efficiently.

License

Notifications You must be signed in to change notification settings

davidtkeane/PhoneBook-CLI

Repository files navigation

PhoneBook CLI Application

Github

PhoneBook CLI Python License Version

📊 Github Stats

Github Commits

GitHub last commit GitHub commit activity GitHub issues GitHub Sponsors

Time @ Work!

CodeTime Badge

My Other Cool Scripts.

Gmail Multi-Account CLI Sleep CLI PhoneBook CLI Kermit ScreenSaver

Socials

Github X LinkedIn

Badges

Windows-Badge AppleMac-Badge Linux-Badge

Buy me a coffee

Description

This is a simple phonebook application that allows you to add, search, view, edit, and delete contacts. It uses SQLite to store the contacts and a password file to store the password. The password is hashed using SHA-256 before storing it in the file. The application also uses sudo to run commands that require elevated privileges. The application is designed to run on Unix-based systems.

Features

  • Add a new contact with name, phone number, email, and address.
  • Search for a contact by name or phone number.
  • View all contacts in the phonebook.
  • Edit a contact's details.
  • Delete a contact from the phonebook.
  • Set a new password for the phonebook.
  • Uses colorama to add color to the output.
  • Uses subprocess to run system commands.
  • Uses getpass to get the password from the user without echoing it.
  • Uses hashlib to hash the password before storing it.
  • Displays nice exit messages.

Prerequisites

  • Python 3.x
  • Unix-based system (Linux, macOS)
  • sudo privileges

Installation

Instructions for running the application:

Phone.py

  1. Run the application using the following command:
python phone.py

Phone

Installation to be able to run in the terminal.

  1. Download the file:

A:

git clone https://github.com/yourusername/phonebook-cli/phone

B:

pip install requirements.txt
  1. After downloading the file, run the following command to make it executable:
chmod +x phone
  1. Copy or move the file to a directory in your PATH to run it from anywhere:
sudo cp phone /usr/local/bin/phone
  1. Run the application using the following command if not in the PATH:
./phone
  1. Run the application using the following command if in the PATH:
phone

Why sudo is needed:

The application requires sudo to run commands that need elevated privileges, such as creating directories and files in system-protected locations (e.g., bin). It also ensures that the password file and database file have the correct permissions to prevent unauthorized access.


Screenshots:

PhoneBook CLI


License:

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgment:

Created by Ranger (Dec 2024) Version 1.0.0
Modified by David Keane (Dec 31st 2024) Version 2.0.1

Feel free to customize the content as needed.

About

The PhoneBook CLI Application is a powerful and user-friendly command-line tool designed to manage your contacts efficiently.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages