{"id":13304151,"url":"https://github.com/balaji-dr/G-Terminail","last_synced_at":"2025-03-10T13:31:17.664Z","repository":{"id":45442196,"uuid":"186019681","full_name":"balaji-dr/G-Terminail","owner":"balaji-dr","description":"Terminal Gmail is gmail client that can be used in a terminal with basic rules and actions","archived":false,"fork":false,"pushed_at":"2022-12-08T05:06:27.000Z","size":37,"stargazers_count":5,"open_issues_count":5,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-07-29T18:29:16.945Z","etag":null,"topics":["api","email","email-parsing","g-terminail","gmail","gmailapi","gmailclient","python","terminal-gmail"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/balaji-dr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-10T16:22:40.000Z","updated_at":"2024-07-29T18:29:16.945Z","dependencies_parsed_at":"2023-01-24T16:01:00.581Z","dependency_job_id":null,"html_url":"https://github.com/balaji-dr/G-Terminail","commit_stats":null,"previous_names":["balaji-dr/g-terminail"],"tags_count":null,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balaji-dr%2FG-Terminail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balaji-dr%2FG-Terminail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balaji-dr%2FG-Terminail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balaji-dr%2FG-Terminail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/balaji-dr","download_url":"https://codeload.github.com/balaji-dr/G-Terminail/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242859548,"owners_count":20196961,"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":["api","email","email-parsing","g-terminail","gmail","gmailapi","gmailclient","python","terminal-gmail"],"created_at":"2024-07-29T17:51:37.741Z","updated_at":"2025-03-10T13:31:17.404Z","avatar_url":"https://github.com/balaji-dr.png","language":"Python","funding_links":[],"categories":["api"],"sub_categories":[],"readme":"# G-Terminail\n\nA simple Gmail client that runs in your Terminal.\n\n## Description\n\nThis is a standalone python script that connects with Gmail API to filter and perform actions on \nthe emails based on certain rules. The user can fetch all the emails from their gmail account and store it in the local\ndatabase. Filters can be applied on the stored emails and the actions like marking them as READ/UNREAD, Archiving, Adding new labels can be done through the terminal. Basically its a terminal version of Gmail.\n\n### Pre-requisites\n\n```\nPython 3.6 above\nSQLite\nVirtualenv\n```\n\n### Installing\n\nOpen the terminal.\n\nClone the repository\n```\ngit clone https://github.com/deeaarbee/G-Terminail\ncd G-Terminail\n```\n\nCreate virtual environment and activate\n\n```\nvirtualenv -p python3 happyenv\nsource happyenv/bin/activate\n```\n\nInstall requirements\n\n```\npip3 install -r requirements.txt\n```\n\nPlace the client.json file in the gmail directory.\n\n```\ncd gmail\n# paste the client.json file\n```\n\nIn the settings.py in the config directory:\n - TOTAL_PAGES_TO_READ - Total pages to read from gmail.\n - MAX_RESULTS_PER_PAGE - Total email per page.\n - TESTING - True to run tests, else False.\n\n```\n# set value for \nMAX_RESULTS_PER_PAGE = 10\nTOTAL_PAGES_TO_READ = 3\nTESTING = False\n```\n\n\nRun main.py\n\n```\npython3 main.py\n```\n\nThe web browser will open for OAuth for Gmail. Accepting it will show the menu in the terminal.\n\n##### Sample terminal output menu:\n```\nSuccessfully dumped email to database!\n+--------+------------------------+\n| CHOICE |        ACTIONS         |\n+--------+------------------------+\n|   1    | FILTER/PERFORM ACTIONS |\n|   2    |    VIEW SINGLE MAIL    |\n|   3    |    SYNC WITH GMAIL     |\n|   4    |    VIEW ALL EMAILS     |\n|   5    |     EXIT (LOGOUT)      |\n+--------+------------------------+\n\n```\n\n## Running the tests\n\nTo run the test:\n\nGo to settings.py in config directory:\n```\n# SET\nTESTING = True\n```\n\nNow in the project root directory:\n```\npython3 test.py\n```\n\nA new test database will be created to perform the tests.\n\n##### NOTE : Never run test with main database. Set TESTING=True.\n\n##### Sample Test output:\n\n```\n(happyenv) bash-3.2$ python3 test.py\n.....\n----------------------------------------------------------------------\nRan 5 tests in 0.038s\n\nOK\n```\n\n## Further improvements (Not required for the given tasks.)\n\n* Database schema can be improved to make it scalable and store all fields of an email.\n* Dynamic pagination can be added to reduce load time.\n* Mock tests for api requests can be written.\n\n\n## License\n\nNone\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalaji-dr%2FG-Terminail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbalaji-dr%2FG-Terminail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalaji-dr%2FG-Terminail/lists"}