forked from rust-lang/goals
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.rs
More file actions
42 lines (38 loc) · 882 Bytes
/
Copy pathmain.rs
File metadata and controls
42 lines (38 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Code to invoke a LLM to summarize content and generate blog posts.
//! Currently based on AWS bedrock.
use clap::Parser;
use rust_project_goals::gh::issue_id::Repository;
use rust_project_goals_llm::UpdateArgs;
mod llm;
mod templates;
mod updates;
#[derive(clap::Parser, Debug)]
#[structopt(about = "Project goal preprocessor")]
struct Opt {
repository: Repository,
updates_json: String,
}
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let Opt {
repository,
updates_json,
} = Opt::parse();
let UpdateArgs {
milestone,
vscode,
output_file,
start_date,
end_date,
} = &serde_json::from_str(&updates_json)?;
updates::updates(
&repository,
milestone,
output_file.as_deref(),
start_date,
end_date,
*vscode,
)
.await?;
Ok(())
}