|
1 | 1 | # Email Slicer - Python Project |
2 | 2 | ## Overview |
3 | | -A **simple Python** script that slices an email address into its username and domain components, with optional basic analysis of the domain type. |
| 3 | +An **advanced Python email analyzer** that slices email addresses and provides detailed domain classification using an external database. The program now offers more comprehensive analysis with configurable domain categories. |
4 | 4 |
|
5 | | -## Features |
| 5 | +## Key Features |
| 6 | +- **Database-driven analysis** using ***database.csv*** for easy customization |
6 | 7 |
|
7 | | - Extracts username and domain from any valid email address |
8 | | - |
9 | | - Basic email format validation |
| 8 | +- **Enhanced domain classification:** |
10 | 9 |
|
11 | | -### Optional domain analysis: |
| 10 | + - Personal email providers (Gmail, Yahoo, Outlook, etc.) |
12 | 11 |
|
13 | | - Identifies common personal email providers (Gmail, Yahoo, Outlook) |
14 | | - |
15 | | - Detects educational institutions (.edu domains) |
16 | | - |
17 | | - Classifies other domains as professional/work emails |
18 | | - |
19 | | - Simple command-line interface |
| 12 | + - Government domains (including international like .gov.hk) |
| 13 | + |
| 14 | + - Educational institutions (.edu) |
| 15 | + |
| 16 | + - Non-profit organizations (.org, .ngo) |
| 17 | + |
| 18 | + - Country-specific domains (50+ countries supported) |
| 19 | + |
| 20 | +**Detailed output** showing: |
| 21 | + |
| 22 | + - Username and domain components |
| 23 | + |
| 24 | + - Email provider (for personal accounts) |
20 | 25 |
|
21 | | - Exit on demand by leaving input blank or typing "exit" |
| 26 | + - Organization type (for institutional emails) |
22 | 27 |
|
23 | | -## How to Use |
| 28 | + - Country of origin (when detectable) |
24 | 29 |
|
25 | | -Run the script in a Python environment |
| 30 | +- **Error handling** for invalid email formats |
26 | 31 |
|
27 | | -Enter an email address when prompted |
| 32 | +- **Simple command-line interface** |
28 | 33 |
|
29 | | -View the extracted username and domain |
| 34 | +## Database Configuration |
| 35 | +The program uses ***database.csv*** containing: |
30 | 36 |
|
31 | | -Choose whether to see additional analysis (y/n) |
| 37 | +- ***DOMAIN_CATEGORY***: TLD classifications and country codes |
| 38 | + |
| 39 | +- ***COMMON_PROVIDER***: Known email service providers |
| 40 | + |
| 41 | +- ***ORG_TYPE***: Organization type mappings |
32 | 42 |
|
33 | | -Leave input blank or type "exit" to quit the program |
| 43 | +## How to Use |
| 44 | +1. Ensure ***database.csv*** is in the same directory as the script |
| 45 | +2. Run the program: python ***main.py*** |
| 46 | +3. Enter an email address when prompted |
| 47 | +4. View the detailed analysis including: |
| 48 | + - Username and domain components |
| 49 | + - Email provider (if personal account) |
| 50 | + - Organization type (if institutional email) |
| 51 | + - Country detection (limited to popular country at the moment) |
| 52 | +5. Press Enter with no input to exit |
34 | 53 |
|
35 | 54 | ## Requirements |
36 | | -Python 3.x (No external dependencies required) |
| 55 | + |
| 56 | +* Python 3.x (csv is build-in module) |
0 commit comments