Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
98e3c05ef7
28
src/lib.rs
28
src/lib.rs
@ -187,20 +187,22 @@ async fn generate_and_update_entry(
|
|||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
let updated_content = format!(
|
if !summary.trim().is_empty() {
|
||||||
"<pre style=\"white-space: pre-wrap;\"><code>\n💡AI 摘要:\n{}</code></pre><hr><br />{}",
|
let updated_content = format!(
|
||||||
summary, content
|
"<pre style=\"white-space: pre-wrap;\"><code>\n💡AI 摘要:\n{}</code></pre><hr><br />{}",
|
||||||
);
|
summary, content
|
||||||
|
);
|
||||||
|
|
||||||
// Update the entry
|
// Update the entry
|
||||||
update_entry(
|
update_entry(
|
||||||
&config.miniflux.url,
|
&config.miniflux.url,
|
||||||
&config.miniflux.username,
|
&config.miniflux.username,
|
||||||
&config.miniflux.password,
|
&config.miniflux.password,
|
||||||
entry.id,
|
entry.id,
|
||||||
&updated_content,
|
&updated_content,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
Reference in New Issue
Block a user