myl 0.4__tar.gz → 0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {myl-0.4 → myl-0.6}/PKG-INFO +1 -1
- {myl-0.4 → myl-0.6}/myl.egg-info/PKG-INFO +1 -1
- {myl-0.4 → myl-0.6}/myl.py +11 -5
- {myl-0.4 → myl-0.6}/pyproject.toml +1 -1
- {myl-0.4 → myl-0.6}/.github/dependabot.yml +0 -0
- {myl-0.4 → myl-0.6}/.github/workflows/lint.yaml +0 -0
- {myl-0.4 → myl-0.6}/.github/workflows/release.yaml +0 -0
- {myl-0.4 → myl-0.6}/.gitignore +0 -0
- {myl-0.4 → myl-0.6}/LICENSE +0 -0
- {myl-0.4 → myl-0.6}/README.md +0 -0
- {myl-0.4 → myl-0.6}/myl.egg-info/SOURCES.txt +0 -0
- {myl-0.4 → myl-0.6}/myl.egg-info/dependency_links.txt +0 -0
- {myl-0.4 → myl-0.6}/myl.egg-info/entry_points.txt +0 -0
- {myl-0.4 → myl-0.6}/myl.egg-info/requires.txt +0 -0
- {myl-0.4 → myl-0.6}/myl.egg-info/top_level.txt +0 -0
- {myl-0.4 → myl-0.6}/setup.cfg +0 -0
{myl-0.4 → myl-0.6}/PKG-INFO
RENAMED
{myl-0.4 → myl-0.6}/myl.py
RENAMED
@@ -17,7 +17,11 @@ def parse_args():
|
|
17
17
|
parser.add_argument("-P", "--port", help="IMAP server port", default=143)
|
18
18
|
parser.add_argument("--starttls", help="Start TLS", action="store_true")
|
19
19
|
parser.add_argument(
|
20
|
-
"-c",
|
20
|
+
"-c",
|
21
|
+
"--count",
|
22
|
+
help="Number of messages to fetch",
|
23
|
+
default=10,
|
24
|
+
type=int,
|
21
25
|
)
|
22
26
|
parser.add_argument(
|
23
27
|
"-m", "--mark-seen", help="Mark seen", action="store_true"
|
@@ -32,6 +36,7 @@ def parse_args():
|
|
32
36
|
"-t", "--no-title", help="Do not show title", action="store_true"
|
33
37
|
)
|
34
38
|
parser.add_argument("-f", "--folder", help="IMAP folder", default="INBOX")
|
39
|
+
parser.add_argument("-S", "--search", help="Search string", default="ALL")
|
35
40
|
parser.add_argument("-w", "--wrap", help="Wrap text", action="store_true")
|
36
41
|
parser.add_argument("-H", "--html", help="Show HTML", action="store_true")
|
37
42
|
parser.add_argument("MAILID", help="Mail ID to fetch", nargs="?")
|
@@ -62,20 +67,21 @@ def main():
|
|
62
67
|
args.username, args.password, args.folder
|
63
68
|
) as mailbox:
|
64
69
|
if args.MAILID:
|
65
|
-
msg =
|
66
|
-
|
67
|
-
for x in mailbox.fetch(
|
70
|
+
msg = next(
|
71
|
+
mailbox.fetch(
|
68
72
|
f"UID {args.MAILID}", mark_seen=args.mark_seen
|
69
73
|
)
|
70
|
-
|
74
|
+
)
|
71
75
|
print(msg.text if not args.html else msg.html)
|
72
76
|
return 0
|
73
77
|
|
74
78
|
for msg in mailbox.fetch(
|
79
|
+
criteria=args.search,
|
75
80
|
reverse=True,
|
76
81
|
bulk=True,
|
77
82
|
limit=args.count,
|
78
83
|
mark_seen=args.mark_seen,
|
84
|
+
headers_only=True,
|
79
85
|
):
|
80
86
|
table.add_row(
|
81
87
|
msg.uid if msg.uid else "???",
|
File without changes
|
File without changes
|
File without changes
|
{myl-0.4 → myl-0.6}/.gitignore
RENAMED
File without changes
|
{myl-0.4 → myl-0.6}/LICENSE
RENAMED
File without changes
|
{myl-0.4 → myl-0.6}/README.md
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{myl-0.4 → myl-0.6}/setup.cfg
RENAMED
File without changes
|