stock-weekly-report 0.1.1 → 0.1.2
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.
- package/cli.py +21 -11
- package/package.json +1 -1
- package/pyproject.toml +1 -1
package/cli.py
CHANGED
|
@@ -163,22 +163,32 @@ def init(ctx):
|
|
|
163
163
|
else:
|
|
164
164
|
click.echo(f" ! nlm not found at {nlm_path_expanded} — fix this later if needed")
|
|
165
165
|
|
|
166
|
-
# 3. SMTP password → ~/.zprofile
|
|
166
|
+
# 3. SMTP password → ~/.zprofile (optional)
|
|
167
167
|
existing_password = os.environ.get("EMAIL_SMTP_PASSWORD", "")
|
|
168
168
|
if existing_password:
|
|
169
169
|
click.echo(" EMAIL_SMTP_PASSWORD is already set in environment.")
|
|
170
170
|
change_pw = click.confirm(" Update it?", default=False)
|
|
171
|
+
if change_pw:
|
|
172
|
+
smtp_password = click.prompt(
|
|
173
|
+
"Gmail App Password (saved to ~/.zprofile)", hide_input=True
|
|
174
|
+
)
|
|
175
|
+
_write_zprofile_var("EMAIL_SMTP_PASSWORD", smtp_password)
|
|
176
|
+
click.echo(" ✓ Saved to ~/.zprofile")
|
|
177
|
+
else:
|
|
178
|
+
smtp_password = existing_password
|
|
171
179
|
else:
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
click.echo(" Gmail App Password is optional — skip to set it later via")
|
|
181
|
+
click.echo(" export EMAIL_SMTP_PASSWORD=<your-app-password> in ~/.zprofile")
|
|
182
|
+
set_pw = click.confirm(" Set it now?", default=False)
|
|
183
|
+
if set_pw:
|
|
184
|
+
smtp_password = click.prompt(
|
|
185
|
+
"Gmail App Password (saved to ~/.zprofile)", hide_input=True
|
|
186
|
+
)
|
|
187
|
+
_write_zprofile_var("EMAIL_SMTP_PASSWORD", smtp_password)
|
|
188
|
+
click.echo(" ✓ Saved to ~/.zprofile")
|
|
189
|
+
else:
|
|
190
|
+
smtp_password = ""
|
|
191
|
+
click.echo(" Skipped — remember to set EMAIL_SMTP_PASSWORD before running the pipeline.")
|
|
182
192
|
|
|
183
193
|
# 4. Sender email
|
|
184
194
|
default_from = cfg.get("email", {}).get("from", "")
|
package/package.json
CHANGED
package/pyproject.toml
CHANGED