Skip to content

Commit 4d09210

Browse files
authored
Merge pull request #879 from Brist0l/eterm
eterm
2 parents fbcd181 + e513000 commit 4d09210

File tree

10 files changed

+1080
-0
lines changed

10 files changed

+1080
-0
lines changed

eterm/LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

eterm/README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Eterm
2+
3+
Send or view emails through the terminal with style.
4+
5+
## Installation
6+
7+
Use git to install it
8+
9+
```bash
10+
git clone https://github.com/Brist0l/Eterm.git
11+
```
12+
13+
![eterm](https://github.com/mrHola21/Eterm/blob/main/imgs/eterm.png?raw=true)
14+
## Usage
15+
16+
```bash
17+
cd eterm/src
18+
```
19+
20+
This example over here sends an email with a body , subject and a file:
21+
22+
```bash
23+
python3 main.py {from_email} --to {to_email} --body --subject --file {files}
24+
```
25+
26+
Note : You can send multiple files too just by specifying the files after the file.
27+
28+
For help:
29+
30+
```bash
31+
python3 main.py -h
32+
```
33+
34+
## Autocompletion
35+
36+
To add autocompletion add the phrases and Locations in Autocompletions/files.txt and greeting. eg. in the files.txt you
37+
can add a folder name in which you have kept all the documents you want to email someone, you can specify the folder .
38+
39+
```text
40+
/home/foo/Documents/stuff
41+
```
42+
43+
## Using Autocompletion
44+
45+
To use autocompletion just press the `tab` key
46+
47+
## 10 reasons to use it
48+
49+
1) Easy To Use
50+
2) Fast
51+
3) Secure
52+
4) Supports Autocompletion
53+
5) Stores Autocompletion History For Speed
54+
6) Lightweight
55+
7) Recursive email searching
56+
8) Compact Email viewing options
57+
9) Be a terminal geek
58+
10) Configurable SMTP
59+
60+
## Contributing
61+
62+
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
63+
64+
Please make sure to update tests as appropriate.
65+
66+
## License
67+
68+
[GNU GPL v3](https://choosealicense.com/licenses/gpl-3.0/)

eterm/imgs/eterm.png

164 KB
Loading

eterm/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
colorama==0.4.4
2+
readline==6.2.4.1

eterm/src/AutoCompleter.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
class MyCompleter:
2+
3+
def __init__(self, options):
4+
self.options = sorted(options)
5+
self.matches = None
6+
7+
def complete(self, text, state):
8+
if state == 0:
9+
if text:
10+
self.matches = [s for s in self.options
11+
if text in s]
12+
else:
13+
self.matches = self.options[:]
14+
15+
try:
16+
return self.matches[state]
17+
except IndexError:
18+
return None

eterm/src/Autocompletions/files.txt

Whitespace-only changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Hello
2+
Hi
3+
Hey
4+
How are you?
5+
How is it going?
6+
How are you doing?
7+
Nice to see you!
8+
Long time no see
9+
What’s going on?
10+
What’s happening?
11+
What’s the story?
12+
Story?
13+
Whatsup?
14+
Sup?
15+
Yo
16+
What’s the craic?
17+
You alright fella?
18+
Hiya!
19+
Howya?
20+
G'day Mate
21+
Aur Sunna

eterm/src/credsChecker.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import sys
2+
from smtplib import SMTP_SSL, SMTPAuthenticationError
3+
from colorama import Fore
4+
5+
6+
def check(email, password):
7+
with SMTP_SSL('smtp.gmail.com', 465) as session:
8+
try:
9+
session.login(email, password)
10+
except SMTPAuthenticationError:
11+
print("Allow less secure apps is in the OFF "
12+
"state by going to "
13+
"https://myaccount.google.com/lesssecureapps . "
14+
"Turn it on and try again. "
15+
"make sure the Sender"
16+
" email & password are correct.")
17+
sys.exit(f'{Fore.RED}[-] Wrong credentials{Fore.RESET}')

0 commit comments

Comments
 (0)