-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlinux_report_settings.py
More file actions
65 lines (62 loc) · 3.42 KB
/
linux_report_settings.py
File metadata and controls
65 lines (62 loc) · 3.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
from dataclasses import dataclass
from models import RssInfo, SiteConfig
from app_config import RedditFetchConfig, FetchConfig
@dataclass(frozen=True)
class BreitbartTechFetchConfig(FetchConfig):
"""
Breitbart tech-specific fetch configuration.
Inherits from FetchConfig with Breitbart tech-specific settings.
"""
needs_selenium: bool = False
needs_tor: bool = False
post_container: str = "article"
title_selector: str = "h2 a"
link_selector: str = "h2 a"
link_attr: str = "href"
filter_pattern: str = "/tech/" # Only tech articles
use_random_user_agent: bool = False
published_selector: str = ".header_byline time"
CONFIG = SiteConfig(
ALL_URLS={
"http://lxer.com/module/newswire/headlines.rss": RssInfo("lxer.webp", "Lxer news", "http://lxer.com/"),
"https://www.reddit.com/r/linux/.rss": RssInfo("redditlogosmall.webp", "Reddit Linux sub", "https://www.reddit.com/r/linux"),
"http://rss.slashdot.org/Slashdot/slashdotMain": RssInfo("slashdotlogo.webp", "Slashdot", "https://slashdot.org/"),
"https://lwn.net/headlines/newrss": RssInfo("barepenguin-70.webp", "LWN.net news", "https://lwn.net/"),
"https://news.ycombinator.com/rss": RssInfo("hackernews.webp", "Ycombinator news", "http://news.ycombinator.com/"),
"https://www.osnews.com/feed/": RssInfo("osnews-logo.webp", "OS News.com", "http://www.osnews.com/"),
"https://www.geekwire.com/feed/": RssInfo("GeekWire.png", "GeekWire", "http://www.geekwire.com/"),
"http://feeds.feedburner.com/linuxtoday/linux": RssInfo("linuxtd_logo.webp", "Linux Today", "http://www.linuxtoday.com/"),
"https://planet.debian.org/rss20.xml": RssInfo("Debian-OpenLogo.svg", "Planet Debian", "http://planet.debian.org/"),
"https://breitbart.com/fakefeed": RssInfo("breitbart.webp", "Breitbart Tech feed", "https://breitbart.com/tech/"),
},
USER_AGENT="Linux Report -- https://linuxreport.net/",
SITE_URLS=[
"https://news.ycombinator.com/rss",
"http://rss.slashdot.org/Slashdot/slashdotMain",
"https://www.reddit.com/r/linux/.rss",
"http://lxer.com/module/newswire/headlines.rss",
"https://lwn.net/headlines/newrss",
"https://www.geekwire.com/feed/",
"http://feeds.feedburner.com/linuxtoday/linux",
"https://planet.debian.org/rss20.xml",
"https://breitbart.com/fakefeed",
"https://www.osnews.com/feed/",
],
URL_IMAGES="https://linuxreport.net/static/images/",
FAVICON="linuxreport192.ico",
LOGO_URL="LinuxReportNearspringwithafewsnowflakess.webp",
WEB_DESCRIPTION="Top Linux news: updates, distros, and open-source tech. Hourly briefs for geeks, no fluff.",
WEB_TITLE="Linux Report | Latest Linux News",
REPORT_PROMPT="""Arch and Debian Linux developers and experienced users.
Prefer major, high-impact Linux news, especially about important codebases, kernels, tools, and distributions.
Avoid all tutorials, error explanations, troubleshooting guides, or cheat sheets.
Exclude Ubuntu-specific content and avoid coverage centered on the following products:
tmux, Redox, Java, Rust, PHP, JavaScript, MySQL (MariaDB is fine).""",
PATH="/srv/http/LinuxReport2",
SCHEDULE=[0, 8, 12, 17], # Update schedule for Linux Report
DEFAULT_THEME="dark",
CUSTOM_FETCH_CONFIG={
"reddit.com": RedditFetchConfig(),
"breitbart.com": BreitbartTechFetchConfig()
}
)