MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / daily

Function daily

paperflow/cli.py:155–178  ·  view source on GitHub ↗

Run a single daily-push pipeline pass for one user.

(
    user_id: str = typer.Option(..., "--user-id", "-u", help="Run the daily pipeline for this user."),
    days: int = typer.Option(1, "--days", help="Fetch papers from the last N days."),
    limit_per_source: int = typer.Option(100, "--limit-per-source", help="Max papers to fetch per source."),
    output: Optional[Path] = typer.Option(None, "--output", "-o", help="Write the push card to a text file."),
    send_feishu: bool = typer.Option(False, "--send-feishu", help="Send the push through Feishu/Lark."),
    chat_id: Optional[str] = typer.Option(None, "--chat-id", help="Optional Feishu/Lark chat ID."),
    dry_run: bool = typer.Option(False, "--dry-run", help="Compute recommendations without sending a push."),
)

Source from the content-addressed store, hash-verified

153
154@app.command()
155def daily(
156 user_id: str = typer.Option(..., "--user-id", "-u", help="Run the daily pipeline for this user."),
157 days: int = typer.Option(1, "--days", help="Fetch papers from the last N days."),
158 limit_per_source: int = typer.Option(100, "--limit-per-source", help="Max papers to fetch per source."),
159 output: Optional[Path] = typer.Option(None, "--output", "-o", help="Write the push card to a text file."),
160 send_feishu: bool = typer.Option(False, "--send-feishu", help="Send the push through Feishu/Lark."),
161 chat_id: Optional[str] = typer.Option(None, "--chat-id", help="Optional Feishu/Lark chat ID."),
162 dry_run: bool = typer.Option(False, "--dry-run", help="Compute recommendations without sending a push."),
163) -> None:
164 """Run a single daily-push pipeline pass for one user."""
165 script = PROJECT_ROOT / "deployments" / "feishu" / "daily-push-agent" / "main.py"
166 if not script.exists():
167 script = PROJECT_ROOT / "agents" / "daily-push-agent" / "main.py"
168 if not script.exists():
169 typer.echo(f"[error] daily-push agent not found under deployments/feishu/ or agents/", err=True)
170 raise typer.Exit(code=1)
171 args: list[str] = ["--user-id", user_id, "--days", str(days), "--limit-per-source", str(limit_per_source)]
172 if output:
173 args.extend(["--output", str(output)])
174 if chat_id:
175 args.extend(["--chat-id", chat_id])
176 if send_feishu and not dry_run:
177 args.append("--send-feishu")
178 raise typer.Exit(code=_run_python(script, *args))
179
180
181@app.command()

Callers

nothing calls this directly

Calls 1

_run_pythonFunction · 0.85

Tested by

no test coverage detected