{"id":22111589,"url":"https://github.com/takk8is/uniqueemailextractorfromsql","last_synced_at":"2025-03-24T04:33:39.332Z","repository":{"id":233099424,"uuid":"785625150","full_name":"Takk8IS/UniqueEmailExtractorFromSQL","owner":"Takk8IS","description":"Python Unique Email Extractor from SQL","archived":false,"fork":false,"pushed_at":"2024-07-26T22:54:04.000Z","size":683,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T10:33:21.248Z","etag":null,"topics":["database","david-c-cavalcante","email","email-extractor","email-marketing","extractor","free","macos","marketing","marketing-tools","mysql","mysql-database","python","python3","sql","takk-ag","takk-design","takk8is"],"latest_commit_sha":null,"homepage":"https://takk.ag","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Takk8IS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null},"funding":"If you have any questions or need support, please open an issue."},"created_at":"2024-04-12T09:16:41.000Z","updated_at":"2024-07-26T22:54:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"5ea1415b-57be-4214-96bd-ad423dcfa673","html_url":"https://github.com/Takk8IS/UniqueEmailExtractorFromSQL","commit_stats":null,"previous_names":["takk8is/python-unique-email-extractor-from-sql","takk8is/uniqueemailextractorfromsql"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Takk8IS%2FUniqueEmailExtractorFromSQL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Takk8IS%2FUniqueEmailExtractorFromSQL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Takk8IS%2FUniqueEmailExtractorFromSQL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Takk8IS%2FUniqueEmailExtractorFromSQL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Takk8IS","download_url":"https://codeload.github.com/Takk8IS/UniqueEmailExtractorFromSQL/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245211737,"owners_count":20578436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","david-c-cavalcante","email","email-extractor","email-marketing","extractor","free","macos","marketing","marketing-tools","mysql","mysql-database","python","python3","sql","takk-ag","takk-design","takk8is"],"created_at":"2024-12-01T10:49:23.648Z","updated_at":"2025-03-24T04:33:39.311Z","avatar_url":"https://github.com/Takk8IS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unique Email Extractor from SQL\n\n![Python](https://img.shields.io/badge/Python-3.x-blue.svg)\n![License](https://img.shields.io/badge/license-MIT-green.svg)\n![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)\n![Sponsors](https://img.shields.io/badge/sponsors-Takk8IS-orange.svg)\n\nThis Python script is designed to process a file, such as a SQL file, and extract all unique email addresses found within it. It uses a sophisticated regular expression to identify email addresses and adds each unique email to a set to ensure there are no duplicates.\n\n![Unique Email Extractor from SQL](https://github.com/Takk8IS/UniqueEmailExtractorFromSQL/blob/main/assets/screenshot-01.png?raw=true)\n\n## Functionality\n\nThe code consists of a single function called `find_unique_emails` that takes a file path as an argument. Here's a step-by-step breakdown of how the function works:\n\n1. The function defines a regular expression pattern `email_pattern` that matches email addresses in the format `name@domain.tld`.\n2. It initialises a set called `unique_emails` to store the unique email addresses.\n3. The function attempts to open the file specified by the `file_path` argument in read mode.\n4. If the file is successfully opened, the function prints a message indicating that it is searching for email addresses.\n5. It then reads the file line by line and uses the `re.findall` function to extract all email addresses found in each line.\n6. For each email address found, the function checks if it is already in the `unique_emails` set. If not, it prints the email address and adds it to the set.\n7. After processing the entire file, the function prints the total number of unique email addresses found.\n8. If the file is not found, the function prints an error message indicating that the file was not found.\n9. If any other exception occurs, the function prints a generic error message.\n\n## Usage\n\nTo use the script, follow these steps:\n\n1. Ensure you have Python installed on your system.\n2. Save the Python script in a directory that contains the file you want to process.\n3. Open a terminal or command prompt and navigate to the directory where the script is located.\n4. Modify the `file_path` variable in the script to point to the file you want to process (e.g., `file_path = 'database.sql'`).\n5. Run the script by typing `python UniqueEmailExtractorFromSQL.py` in the terminal.\n6. The script will process the file and print each unique email address found, followed by the total count of unique email addresses.\n\n## Example Output\n\n```\nSearching for email addresses in the file...\nFound email: example1@example.com\nFound email: example2@example.org\nFound email: example3@example.net\nTotal unique email addresses found: 3\n```\n\n## Contributing\n\nWe welcome contributions from the community! If you'd like to contribute, please fork the repository, create a new branch, and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.\n\n1. Fork the repository.\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`).\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`).\n4. Push to the branch (`git push origin feature/AmazingFeature`).\n5. Open a Pull Request.\n\n## Donations\n\nIf this script has been helpful for you, consider making a donation to support our work:\n\n**USDT (TRC-20)**: `TGpiWetnYK2VQpxNGPR27D9vfM6Mei5vNA`\n\nYour donations help us continue developing useful and innovative tools.\n\n## About Takk™ Innovate Studio\n\nLeading the Digital Revolution as the Pioneering 100% Artificial Intelligence Team.\n\n-   Copyright (c)\n-   Author: [David C Cavalcante](mailto:say@takk.ag)\n-   LinkedIn: [linkedin.com/in/hellodav](https://www.linkedin.com/in/hellodav/)\n-   X: [@Takk8IS](https://twitter.com/takk8is/)\n-   Medium: [takk8is.medium.com](https://takk8is.medium.com/)\n-   Website: [takk.ag](https://takk.ag/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakk8is%2Funiqueemailextractorfromsql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakk8is%2Funiqueemailextractorfromsql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakk8is%2Funiqueemailextractorfromsql/lists"}