Skip to content

Commit ca99e81

Browse files
authored
Create daily-news-briefing
1 parent 9da3edd commit ca99e81

File tree

1 file changed

+149
-0
lines changed

1 file changed

+149
-0
lines changed

docs/showcase/daily-news-briefing

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
---
2+
title: Daily News Briefing
3+
description: Get AI-powered daily news summaries directly in your Obsidian vault
4+
sidebar_position: 5
5+
keywords: [obsidain-plugin, AI, Perplexity, news]
6+
---
7+
8+
import { CheckIcon } from '@heroicons/react/24/solid'
9+
import { Callout } from 'nextra/components'
10+
11+
# Daily News Briefing
12+
13+
<div className="flex flex-col sm:flex-row items-start gap-4">
14+
<div className="flex-1">
15+
<p className="text-lg">
16+
Daily News Briefing is an Obsidian plugin that delivers AI-powered news summaries directly to your vault. Stay informed about your topics of interest with smart, automated news collection and summarization.
17+
</p>
18+
<div className="mt-4 flex flex-wrap gap-2">
19+
<a href="https://github.com/ChenziqiAdam/Daily-News-Briefing" target="_blank" rel="noopener noreferrer" className="flex items-center gap-1 text-xs font-medium text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 transition-colors">
20+
<svg className="h-4 w-4" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
21+
<path fillRule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clipRule="evenodd" />
22+
</svg>
23+
GitHub
24+
</a>
25+
</div>
26+
</div>
27+
</div>
28+
29+
## Features
30+
31+
<ul className="mt-8 space-y-4">
32+
<li className="flex gap-2">
33+
<CheckIcon className="h-6 w-6 flex-none text-green-500" />
34+
<span>Personalized news collection based on your topics of interest</span>
35+
</li>
36+
<li className="flex gap-2">
37+
<CheckIcon className="h-6 w-6 flex-none text-green-500" />
38+
<span>AI-powered summarization of news articles</span>
39+
</li>
40+
<li className="flex gap-2">
41+
<CheckIcon className="h-6 w-6 flex-none text-green-500" />
42+
<span>Automated daily news briefings directly in your Obsidian vault</span>
43+
</li>
44+
<li className="flex gap-2">
45+
<CheckIcon className="h-6 w-6 flex-none text-green-500" />
46+
<span>Customizable delivery schedule and format</span>
47+
</li>
48+
<li className="flex gap-2">
49+
<CheckIcon className="h-6 w-6 flex-none text-green-500" />
50+
<span>Integration with your existing Obsidian workflow</span>
51+
</li>
52+
</ul>
53+
54+
## Prerequisites
55+
56+
- Obsidian desktop app installed
57+
- Perplexity API key
58+
- Internet connection for fetching news articles
59+
60+
## Installation
61+
62+
1. Install the plugin from Obsidian Community Plugins or manually by copying the release files to your Obsidian plugins folder
63+
2. Enable the plugin in Obsidian settings
64+
3. Enter your Perplexity API key in the plugin settings
65+
4. Configure your news topics and delivery preferences
66+
67+
## Built with Perplexity API
68+
69+
<Callout type="info">
70+
Daily News Briefing uses the Perplexity Sonar API to deliver high-quality, personalized news summaries. By leveraging Perplexity's advanced capabilities, the plugin can intelligently gather and summarize news from across the web, ensuring you stay informed on the topics that matter most to you.
71+
</Callout>
72+
73+
## How it works
74+
75+
1. **Configure your interests**: Set up your preferred topics, sources, and delivery schedule in the plugin settings.
76+
77+
2. **Automated collection**: The plugin uses Perplexity Sonar API to search for and gather the latest news articles related to your interests.
78+
79+
3. **AI summarization**: Articles are processed and summarized using Perplexity's advanced natural language capabilities.
80+
81+
4. **Delivery to your vault**: Summaries are formatted and delivered as Markdown notes directly into your Obsidian vault.
82+
83+
5. **Seamless integration**: Link your news briefings with other notes in your knowledge base for a comprehensive information management system.
84+
85+
## Code Explanation
86+
87+
The core functionality of Daily News Briefing relies on the Perplexity Sonar API for gathering and summarizing news. Here's a key code snippet showing how we interact with the API:
88+
89+
```typescript
90+
async function fetchNewsSummaries(topics: string[]): Promise<NewsSummary[]> {
91+
const summaries: NewsSummary[] = [];
92+
93+
for (const topic of topics) {
94+
try {
95+
// Use Perplexity Sonar API to search for recent news
96+
const newsQuery = `latest news about ${topic} in the past 24 hours`;
97+
const searchResponse = await perplexityClient.search({
98+
query: newsQuery,
99+
max_results: 5,
100+
include_domains: userPreferences.trustedSources || []
101+
});
102+
103+
// Extract relevant articles
104+
const articles = searchResponse.results;
105+
106+
// Generate a concise summary using Perplexity
107+
const summaryPrompt = `Summarize these news articles about ${topic}: ${articles.map(a => a.title).join(', ')}`;
108+
const summaryResponse = await perplexityClient.generate({
109+
prompt: summaryPrompt,
110+
model: "sonar-medium-online",
111+
max_tokens: 500
112+
});
113+
114+
summaries.push({
115+
topic,
116+
summary: summaryResponse.text,
117+
sources: articles.map(a => ({ title: a.title, url: a.url })),
118+
timestamp: new Date().toISOString()
119+
});
120+
} catch (error) {
121+
console.error(`Error fetching news for topic ${topic}:`, error);
122+
}
123+
}
124+
125+
return summaries;
126+
}
127+
```
128+
129+
## Technical implementation
130+
131+
Daily News Briefing is built with TypeScript and integrates with Obsidian's plugin API. The application architecture includes:
132+
133+
- TypeScript-based plugin structure
134+
- Custom CSS for styling elements
135+
- JavaScript utilities
136+
- Integration with Perplexity Sonar API for AI-powered news gathering and summarization
137+
138+
The plugin demonstrates how Perplexity API can be leveraged to create intelligent content curation tools that integrate with existing productivity systems.
139+
140+
## Limitations
141+
142+
- The quality of summaries depends on the availability of recent news articles
143+
- API rate limits may affect the number of topics that can be monitored simultaneously
144+
- Internet connection is required for fetching news updates
145+
- Some paywalled content may not be fully accessible for summarization
146+
147+
## Links
148+
149+
- [GitHub Repository](https://github.com/ChenziqiAdam/Daily-News-Briefing)

0 commit comments

Comments
 (0)