myl 0.8.11__tar.gz → 0.8.12__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.8.11 → myl-0.8.12}/PKG-INFO +1 -1
- {myl-0.8.11 → myl-0.8.12}/myl.egg-info/PKG-INFO +1 -1
- {myl-0.8.11 → myl-0.8.12}/myl.py +15 -5
- {myl-0.8.11 → myl-0.8.12}/pyproject.toml +1 -1
- {myl-0.8.11 → myl-0.8.12}/.github/dependabot.yml +0 -0
- {myl-0.8.11 → myl-0.8.12}/.github/workflows/lint.yaml +0 -0
- {myl-0.8.11 → myl-0.8.12}/.github/workflows/pypi.yaml +0 -0
- {myl-0.8.11 → myl-0.8.12}/.github/workflows/release.yaml +0 -0
- {myl-0.8.11 → myl-0.8.12}/.gitignore +0 -0
- {myl-0.8.11 → myl-0.8.12}/LICENSE +0 -0
- {myl-0.8.11 → myl-0.8.12}/README.md +0 -0
- {myl-0.8.11 → myl-0.8.12}/myl.egg-info/SOURCES.txt +0 -0
- {myl-0.8.11 → myl-0.8.12}/myl.egg-info/dependency_links.txt +0 -0
- {myl-0.8.11 → myl-0.8.12}/myl.egg-info/entry_points.txt +0 -0
- {myl-0.8.11 → myl-0.8.12}/myl.egg-info/requires.txt +0 -0
- {myl-0.8.11 → myl-0.8.12}/myl.egg-info/top_level.txt +0 -0
- {myl-0.8.11 → myl-0.8.12}/setup.cfg +0 -0
{myl-0.8.11 → myl-0.8.12}/myl.py
RENAMED
@@ -73,8 +73,12 @@ def parse_args():
|
|
73
73
|
parser.add_argument(
|
74
74
|
"-u", "--username", help="IMAP username", required=True
|
75
75
|
)
|
76
|
-
parser.
|
77
|
-
|
76
|
+
password_group = parser.add_mutually_exclusive_group(required=True)
|
77
|
+
password_group.add_argument("-p", "--password", help="IMAP password")
|
78
|
+
password_group.add_argument(
|
79
|
+
"--password-file",
|
80
|
+
help="IMAP password (file path)",
|
81
|
+
type=argparse.FileType("r"),
|
78
82
|
)
|
79
83
|
parser.add_argument(
|
80
84
|
"-t", "--no-title", help="Do not show title", action="store_true"
|
@@ -119,6 +123,10 @@ def main():
|
|
119
123
|
)
|
120
124
|
LOGGER.debug(args)
|
121
125
|
|
126
|
+
imap_password = args.password or (
|
127
|
+
args.password_file and args.password_file.read()
|
128
|
+
)
|
129
|
+
|
122
130
|
if args.google:
|
123
131
|
args.server = GMAIL_IMAP_SERVER
|
124
132
|
args.port = GMAIL_IMAP_PORT
|
@@ -132,7 +140,7 @@ def main():
|
|
132
140
|
if args.auto:
|
133
141
|
try:
|
134
142
|
settings = autodiscover(
|
135
|
-
args.username, password=
|
143
|
+
args.username, password=imap_password
|
136
144
|
).get("imap")
|
137
145
|
except Exception:
|
138
146
|
error_msg("Failed to autodiscover IMAP settings")
|
@@ -191,7 +199,7 @@ def main():
|
|
191
199
|
|
192
200
|
try:
|
193
201
|
with mb(**mb_kwargs).login(
|
194
|
-
args.username,
|
202
|
+
args.username, imap_password, args.folder
|
195
203
|
) as mailbox:
|
196
204
|
if args.MAILID:
|
197
205
|
msg = next(
|
@@ -293,13 +301,15 @@ def main():
|
|
293
301
|
else "???"
|
294
302
|
),
|
295
303
|
)
|
296
|
-
if
|
304
|
+
if table.row_count >= args.count:
|
297
305
|
break
|
298
306
|
|
299
307
|
if args.json:
|
300
308
|
print_json(json.dumps(json_data))
|
301
309
|
else:
|
302
310
|
console.print(table)
|
311
|
+
if table.row_count == 0:
|
312
|
+
print("[yellow italic]No messages[/yellow italic]", file=sys.stderr)
|
303
313
|
return 0
|
304
314
|
except Exception:
|
305
315
|
console.print_exception(show_locals=True)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|