friendex: Manage Your Social Connections 22 May 2023

image

It’s easy to lose track of the people who matter most to us. Whether it’s friends, family, or colleagues, maintaining meaningful connections requires effort and attention. That’s where the friendex comes in. With this command-line tool, you can effortlessly manage your social connections, keep track of when you last spoke to someone, and even search for friends based on specific criteria. Let’s take a closer look at the code behind this powerful tool.

You can find a link to the GitHub repository for friendex here

Code Overview

The code is written in Python and utilizes several libraries to enhance its functionality. Here’s a breakdown of the different components and their purposes:

Importing Dependencies

The code begins by importing the necessary dependencies:

import argparse
import sqlite3
from datetime import datetime
from fuzzywuzzy import fuzz

Friend Class

Next, there is a Friend class that represents a friend in the Friend Tracker. It has the following attributes and methods:

Attributes:

Methods:

FriendTracker Class

The FriendTracker class is responsible for managing the friend database and providing various functionalities. Its key features include:

Attributes:

Methods:

spoken date and days since then.

Command-Line Interface

The main function sets up the command-line interface using argparse. It defines the available options and their corresponding actions. Depending on the provided arguments, the appropriate methods of the FriendTracker class are called to perform the desired operations.

Getting Started

To start using the friendex CLI, follow these steps:

  1. Make sure you have Python installed on your system.
  2. Download the code and save it in a file, such as friend_tracker.py.
  3. Open a terminal or command prompt and navigate to the directory where you saved the file.
  4. Install the required dependencies by running the following command:
    pip install -r requirements.txt
    
  5. Run the CLI by executing the following command:
    python friend_tracker.py [OPTIONS]
    

Available Options

Here are the available options and their functionalities:

Conclusion

Friendex is a powerful tool for managing your social connections. With its simple command-line interface, you can easily add, update, delete, and search for friends based on different criteria. Whether you want to keep track of when you last spoke to someone or find friends with similar interests, friendex has got you covered. Give it a try and enhance your social connections today!

projects [ ]