Add deep dive function to get more into each single stock.

This commit is contained in:
2025-07-21 21:33:49 +02:00
parent b82ba39aab
commit 0c90fed0eb
9 changed files with 270 additions and 99 deletions

29
templates/deep_dive.html Normal file
View File

@@ -0,0 +1,29 @@
{% extends "base.html" %}
{% block title %}Deep Dive: {{ symbol }}{% endblock %}
{% block content %}
<h1>Deep Dive Analysis for: <strong>{{ symbol }}</strong></h1>
<p>Showing posts that mention {{ symbol }}, sorted by most recent.</p>
{% for post in posts %}
<div class="post-card">
<h3><a href="{{ post.post_url }}" target="_blank">{{ post.title }}</a></h3>
<div class="post-meta">
<span>r/{{ post.subreddit_name }}</span> |
<span>{{ post.comment_count }} comments analyzed</span> |
<span>Avg. Sentiment:
{% if post.avg_comment_sentiment > 0.1 %}
<span class="sentiment-bullish">{{ "%.2f"|format(post.avg_comment_sentiment) }}</span>
{% elif post.avg_comment_sentiment < -0.1 %}
<span class="sentiment-bearish">{{ "%.2f"|format(post.avg_comment_sentiment) }}</span>
{% else %}
<span class="sentiment-neutral">{{ "%.2f"|format(post.avg_comment_sentiment) }}</span>
{% endif %}
</span>
</div>
</div>
{% else %}
<p>No analyzed posts found for this ticker. Run the 'rstat' scraper to gather data.</p>
{% endfor %}
{% endblock %}