Skip to content

Commit

Permalink
Merge pull request #19 from dabigjoe6/clean-summaries
Browse files Browse the repository at this point in the history
Get new summaries when summary length less than 100 characters
  • Loading branch information
dabigjoe6 authored Aug 3, 2023
2 parents 18c0734 + cd03edf commit a617575
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/send-feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class SendFeed {
const newResources: ResourceI[] = [];
for (const resource of resources) {
resource.readLength = readingTime(resource.content || resource.description || "").text
if (!resource.summary && (resource.content || resource.description)) {
if ((!resource.summary || resource.summary.length < 100) && (resource.content || resource.description)) {
resource.summary = await this.summarizePost(resource.content ?
resource.content :
resource.description ?
Expand Down

0 comments on commit a617575

Please sign in to comment.