mirror of
https://github.com/nubenetes/awesome-kubernetes.git
synced 2026-09-01 08:07:19 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e85ec6bdd | ||
|
|
dc0e090318 | ||
|
|
6f34ac8569 | ||
|
|
5d7f58c7fa | ||
|
|
52e2560fa0 | ||
|
|
41207ca0f0 | ||
|
|
b5b3dc3ce2 | ||
|
|
f221647646 | ||
|
|
099a40d6b1 | ||
|
|
74cbc47e2e | ||
|
|
f90d66478f | ||
|
|
d846c6f336 |
@@ -351,6 +351,7 @@ MigrationBackup/
|
||||
# Automatización Nubenetes
|
||||
src/__pycache__/
|
||||
*.json
|
||||
!data/news_digest.json
|
||||
.env
|
||||
nubenetes_agent_env/
|
||||
.venv/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+26
-17
@@ -145,6 +145,12 @@ class NewsDigestEngine:
|
||||
"12_months": 365,
|
||||
}
|
||||
|
||||
ITEMS_PER_PERIOD: Dict[str, int] = {
|
||||
"3_months": 10,
|
||||
"6_months": 15,
|
||||
"12_months": 20,
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------ #
|
||||
|
||||
def __init__(self) -> None:
|
||||
@@ -185,17 +191,20 @@ class NewsDigestEngine:
|
||||
|
||||
@staticmethod
|
||||
def _is_within_period(entry: dict, cutoff_iso: str) -> bool:
|
||||
"""Return *True* when the entry's ``discovered_at`` is on or after
|
||||
the ISO-formatted *cutoff_iso* string. ISO 8601 strings sort
|
||||
lexicographically so a simple ``>=`` comparison is sufficient.
|
||||
"""
|
||||
"""Check if entry falls within the time period using discovered_at,
|
||||
with year field as fallback for backfilled entries."""
|
||||
discovered = entry.get("discovered_at", "")
|
||||
if not discovered:
|
||||
return False
|
||||
try:
|
||||
return discovered >= cutoff_iso
|
||||
except Exception:
|
||||
return False
|
||||
if discovered:
|
||||
try:
|
||||
if discovered >= cutoff_iso:
|
||||
return True
|
||||
except Exception:
|
||||
pass
|
||||
year = entry.get("year", "")
|
||||
if year and isinstance(year, str) and year.isdigit():
|
||||
cutoff_year = cutoff_iso[:4] if len(cutoff_iso) >= 4 else "2020"
|
||||
return year >= cutoff_year
|
||||
return False
|
||||
|
||||
# ------------------------------------------------------------------ #
|
||||
# Prompt builder #
|
||||
@@ -253,8 +262,8 @@ class NewsDigestEngine:
|
||||
"url": e["url"],
|
||||
"title": e.get("title", "Unknown"),
|
||||
"date": e.get("discovered_at", "")[:10],
|
||||
"stars": e.get("stars", 0),
|
||||
"impact": "high" if e.get("stars", 0) >= 4 else "medium",
|
||||
"stars": e.get("stars") or 0,
|
||||
"impact": "high" if (e.get("stars") or 0) >= 4 else "medium",
|
||||
"why": (e.get("ai_summary", "") or "")[:200],
|
||||
"category": cat_name,
|
||||
}
|
||||
@@ -316,14 +325,14 @@ class NewsDigestEngine:
|
||||
reverse=True,
|
||||
)
|
||||
|
||||
max_items = self.ITEMS_PER_PERIOD.get(period_name, 10)
|
||||
|
||||
if len(entries) < 3:
|
||||
# Too few entries – include all without AI ranking
|
||||
digest[period_name][cat_name] = self._fallback_items(
|
||||
entries, cat_name
|
||||
entries, cat_name, limit=max_items
|
||||
)
|
||||
continue
|
||||
|
||||
# Ask Gemini to rank
|
||||
try:
|
||||
prompt = self._build_ranking_prompt(
|
||||
cat_name, entries, period_name
|
||||
@@ -351,7 +360,7 @@ class NewsDigestEngine:
|
||||
}
|
||||
)
|
||||
|
||||
digest[period_name][cat_name] = ranked[:10]
|
||||
digest[period_name][cat_name] = ranked[:max_items]
|
||||
log_event(
|
||||
f" [Digest] {period_name}/{cat_name}: "
|
||||
f"{len(ranked)} items ranked"
|
||||
@@ -364,7 +373,7 @@ class NewsDigestEngine:
|
||||
"using star-based fallback"
|
||||
)
|
||||
digest[period_name][cat_name] = self._fallback_items(
|
||||
entries, cat_name
|
||||
entries, cat_name, limit=max_items
|
||||
)
|
||||
|
||||
# Respect Gemini rate limits
|
||||
|
||||
+3
-2
@@ -964,13 +964,14 @@ class V2VisionEngine:
|
||||
items = period_data.get(cat, [])
|
||||
if not items:
|
||||
continue
|
||||
md += f" ## {cat}\n\n"
|
||||
md += f" **{cat}**\n\n"
|
||||
md += " | Date | Resource | Impact | Why It Matters |\n"
|
||||
md += " | :--- | :--- | :---: | :--- |\n"
|
||||
for item in items:
|
||||
impact_badge = {"critical": "🔴", "high": "🟡", "medium": "🔵"}.get(item.get("impact", "medium"), "🔵")
|
||||
t = nuclear_strip(item.get("title", "Unknown"))
|
||||
md += f' | {item.get("date", "")} | [{t}]({item.get("url", "#")}) | {impact_badge} {item.get("impact", "medium")} | {item.get("why", "")} |\n'
|
||||
why = (item.get("why", "") or "").replace("|", "-").replace("\n", " ")
|
||||
md += f' | {item.get("date", "")} | [{t}]({item.get("url", "#")}) | {impact_badge} {item.get("impact", "medium")} | {why} |\n'
|
||||
md += "\n"
|
||||
md += "\n"
|
||||
return md
|
||||
|
||||
@@ -3,7 +3,12 @@
|
||||
!!! tip "Nubenetes Intelligence Digest"
|
||||
AI-curated ranking of the most impactful resources, updated monthly.
|
||||
|
||||
!!! info "Coming Soon"
|
||||
The Industry & Geo Digest will be populated automatically when the monthly pipeline runs with Gemini AI ranking. Check back after the next curation cycle.
|
||||
=== "Last 3 Months"
|
||||
|
||||
|
||||
=== "Last 6 Months"
|
||||
|
||||
|
||||
=== "Last 12 Months"
|
||||
|
||||
|
||||
**4 geographic categories** (Americas, Europe, Spain, Asia-Pacific) will surface industry-relevant resources classified by company and region.
|
||||
|
||||
+1328
-3
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user