Compare commits

..

3 Commits

Author SHA1 Message Date
17bd4702b2 fix(connectors): connector detectors returning name of ID alongside connector obj 2026-03-10 18:36:40 +00:00
53cb5c2ea5 feat(topics): add generalised topic list
This is easier and quicker compared to deriving a topics list based on the dataset that has been scraped.

While using LLMs to create a personalised topic list based on the query, category or dataset itself would yield better results for most, it is beyond the scope of this project.
2026-03-10 18:36:08 +00:00
0866dda8b3 chore: add util to always split evenly 2026-03-10 18:25:05 +00:00
3 changed files with 75 additions and 4 deletions

View File

@@ -15,11 +15,11 @@ def _discover_connectors() -> list[type[BaseConnector]]:
if cls.source_name # guard against abstract intermediaries if cls.source_name # guard against abstract intermediaries
] ]
def get_available_connectors() -> list[type[BaseConnector]]: def get_available_connectors() -> dict[str, type[BaseConnector]]:
return [c for c in _discover_connectors() if c.is_available()] return {c.source_name: c for c in _discover_connectors() if c.is_available()}
def get_connector_metadata() -> list[dict]: def get_connector_metadata() -> list[dict]:
return [ return [
{"id": c.source_name, "label": c.display_name} {"id": id, "label": obj.display_name}
for c in get_available_connectors() for id, obj in get_available_connectors().items()
] ]

67
server/topics.json Normal file
View File

@@ -0,0 +1,67 @@
{
"Personal Life": "daily life, life updates, what happened today, personal stories, life events, reflections",
"Relationships": "dating, relationships, breakups, friendships, family relationships, marriage, relationship advice",
"Family & Parenting": "parents, parenting, children, raising kids, family dynamics, family stories",
"Work & Careers": "jobs, workplaces, office life, promotions, quitting jobs, career advice, workplace drama",
"Education": "school, studying, exams, university, homework, academic pressure, learning experiences",
"Money & Finance": "saving money, debt, budgeting, cost of living, financial advice, personal finance",
"Health & Fitness": "exercise, gym, workouts, running, diet, fitness routines, weight loss",
"Mental Health": "stress, anxiety, depression, burnout, therapy, emotional wellbeing",
"Food & Cooking": "meals, cooking, recipes, restaurants, snacks, food opinions",
"Travel": "holidays, trips, tourism, travel experiences, airports, flights, travel tips",
"Entertainment": "movies, TV shows, streaming services, celebrities, pop culture",
"Music": "songs, albums, artists, concerts, music opinions",
"Gaming": "video games, gaming culture, consoles, PC gaming, esports",
"Sports": "sports matches, teams, players, competitions, sports opinions",
"Technology": "phones, gadgets, apps, AI, software, tech trends",
"Internet Culture": "memes, viral trends, online jokes, internet drama, trending topics",
"Social Media": "platforms, influencers, content creators, algorithms, online communities",
"News & Current Events": "breaking news, world events, major incidents, public discussions",
"Politics": "political debates, elections, government policies, ideology",
"Culture & Society": "social issues, cultural trends, generational debates, societal changes",
"Identity & Lifestyle": "personal identity, lifestyle choices, values, self-expression",
"Hobbies & Interests": "art, photography, crafts, collecting, hobbies",
"Fashion & Beauty": "clothing, style, makeup, skincare, fashion trends",
"Animals & Pets": "pets, animal videos, pet care, wildlife",
"Humour": "jokes, funny stories, sarcasm, memes",
"Opinions & Debates": "hot takes, controversial opinions, arguments, discussions",
"Advice & Tips": "life advice, tutorials, how-to tips, recommendations",
"Product Reviews": "reviews, recommendations, experiences with products",
"Complaints & Rants": "frustrations, complaining, venting about things",
"Motivation & Inspiration": "motivational quotes, success stories, encouragement",
"Questions & Curiosity": "asking questions, seeking opinions, curiosity posts",
"Celebrations & Achievements": "birthdays, milestones, achievements, good news",
"Random Thoughts": "shower thoughts, observations, random ideas"
}

View File

@@ -48,3 +48,7 @@ def get_request_filters() -> dict:
filters["data_sources"] = data_sources filters["data_sources"] = data_sources
return filters return filters
def split_limit(limit: int, n: int) -> list[int]:
base, remainder = divmod(limit, n)
return [base + (1 if i < remainder else 0) for i in range(n)]