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.
Files changed (3) hide show
  1. package/cli.py +21 -11
  2. package/package.json +1 -1
  3. 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
- change_pw = True
173
-
174
- if change_pw:
175
- smtp_password = click.prompt(
176
- "Gmail App Password (saved to ~/.zprofile)", hide_input=True
177
- )
178
- _write_zprofile_var("EMAIL_SMTP_PASSWORD", smtp_password)
179
- click.echo(" Saved to ~/.zprofile")
180
- else:
181
- smtp_password = existing_password
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stock-weekly-report",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Stock weekly podcast report pipeline — CLI and MCP server",
5
5
  "bin": {
6
6
  "swr": "bin/swr.js",
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "stock-weekly-report"
7
- version = "0.1.1"
7
+ version = "0.1.2"
8
8
  requires-python = ">=3.10"
9
9
  authors = [
10
10
  { name = "Chang Yu Chuan", email = "changyuchuanmicron@gmail.com" },