Compare commits

..
8 Commits
Author SHA1 Message Date
retoor aa071db7ae chore: move hidden sentiment div below article excerpt in newspaper template
The diff relocates the hidden sentiment display element from above the article-meta section to a position after the excerpt text within the article-content div, preserving its hidden state while adjusting DOM order for cleaner template structure.
2025-10-06 07:38:43 +00:00
retoor 719b31c465 chore: replace hidden input with hidden div for sentiment display in newspaper template 2025-10-06 07:37:27 +00:00
retoor 4efb11dc6a feat: add sentiment analysis module using VADER with classify and score functions
Implement a new sentiment.py module that provides VADER-based sentiment analysis. The module includes an `analyze_sentiment_vader` function that classifies text as Positive, Negative, or Neutral based on compound score thresholds (>=0.05, <=-0.05), and a convenience `analyze` function wrapping the analyzer instance. Returns compound score and detailed polarity scores alongside classification.
2025-10-06 07:35:13 +00:00
retoor 422e4bf0c9 feat: integrate vaderSentiment analysis into article ingestion and search endpoints 2025-10-06 07:35:02 +00:00
retoor 6416b18ca6 fix: assign first_newspaper variable before loop to fix newspaper context in newspaper_latest endpoint 2025-10-06 06:05:47 +00:00
retoor 367b5043cb feat: aggregate articles across newspapers and limit to 30 with whitespace cleanup 2025-10-06 06:04:14 +00:00
retoor 3e804dcea9 feat: integrate ChromaDB for persistent article indexing and deduplication in sync tasks 2025-10-06 05:48:53 +00:00
retoor 93e1c282aa chore: scaffold initial project structure with FastAPI app, SQLite DB, and Jinja2 templates 2025-10-02 19:17:36 +00:00
+3 -1
View File
@@ -164,7 +164,7 @@
<h2 class="article-title">
<a href="{{ article.link }}" target="_blank">{{ article.title }}</a>
</h2>
<input type="hidden" name="sentiment" value="{{ article.sentiment }}">
<div class="article-meta">
<span class="article-source">{{ article.feed_name }}</span>
{% if article.author %}
@@ -179,6 +179,8 @@
{% set clean_text = full_content|striptags %}
{% set display_text = clean_text[:500] if article.content else clean_text[:300] %}
{{ display_text }}{% if clean_text|length > (500 if article.content else 300) %}...{% endif %}
<div class="article-sentiment" style="display: none">Sentiment: {{ article.sentiment }}</div>
</div>
{% set words = full_content.split() %}