Skip to main content

A ncurses-based Gmail inbox analyzer and manager

Project description

NCeu (NCurses Email Usage)

NCeu is a command-line interface tool for managing and analyzing your Gmail inbox, inspired by the ncdu (NCurses Disk Usage) utility. It provides an interactive, text-based user interface for exploring your emails, grouping them by sender, and performing actions like archiving.

Features

  • Authenticate with Gmail using OAuth2
  • Download and analyze emails from your inbox
  • Group emails by sender
  • Sort emails by count or date
  • View email details
  • Archive emails directly from the interface
  • ncurses-based UI for smooth navigation

Prerequisites

  • Python 3.6+
  • pip (Python package manager)

Installation

  1. Clone this repository:

    git clone https://github.com/ad3002/nceu.git
    cd nceu
    
  2. Install the required packages:

    pip install google-auth-oauthlib google-auth-httplib2 google-api-python-client python-dateutil
    
  3. Set up Google Cloud Project and enable Gmail API:

    • Go to the Google Cloud Console
    • Create a new project
    • Enable the Gmail API for your project
    • Create credentials (OAuth client ID) for a desktop application
    • Download the client configuration and save it as credentials.json in the project directory

Setting Up a Test User

For security reasons, it's recommended to set up a test Gmail account instead of using your primary account during development and testing:

  1. Create a new Gmail account for testing purposes.
  2. In your Google Cloud Console project:
    • Go to the OAuth consent screen settings
    • Add your test Gmail address to the "Test users" section
  3. Use this test account when authorizing the application during development and testing.

This approach allows you to safely test all features without risking your primary email account.

Usage

Run the script:

python nceu.py

On first run, you'll be prompted to authorize the application. Follow the provided URL to grant necessary permissions. Use your test account credentials for this step.

Navigation

  • Use arrow keys to move up and down the list
  • Press 'Enter' to view emails from a sender or email details
  • Press 's' to change sort order (in sender view)
  • Press 'a' to archive an email (in email view)
  • Press 'q' to go back or quit the application

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

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

Acknowledgments

  • Inspired by the ncdu utility
  • Uses Google's Gmail API

Disclaimer

This tool requires access to your Gmail account. Please review the code and use it at your own risk. Always be cautious when granting access to your email account, and preferably use a test account as described in the "Setting Up a Test User" section.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nceu-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file nceu-0.1.0.tar.gz.

File metadata

  • Download URL: nceu-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.19

File hashes

Hashes for nceu-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4b4799ea33929cc513da84a03354f3aa6ca9ee5b24696ee090cbe9f900de06f3
MD5 c81b9c34ea0620907d176f3590ed9a34
BLAKE2b-256 59813e1b51654c049662724ffdc786e343cc59243173a97137ea2e7630f1bd6e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page