aboutsummaryrefslogtreecommitdiff
path: root/cmd/mobius-hotline-server
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2026-08-23 12:44:53 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2026-08-23 12:44:53 -0700
commit68f615cc6e6ac177109db5b3be4f9767c9cfd1a8 (patch)
tree37380267c1356e67783e9273495bfa099048486c /cmd/mobius-hotline-server
parent4df6b97311e321c1ef178efce905307b10ce6fa7 (diff)
Add feed-backed threaded news imports
Diffstat (limited to 'cmd/mobius-hotline-server')
-rw-r--r--cmd/mobius-hotline-server/main.go17
-rw-r--r--cmd/mobius-hotline-server/mobius/config/config.yaml21
2 files changed, 33 insertions, 5 deletions
diff --git a/cmd/mobius-hotline-server/main.go b/cmd/mobius-hotline-server/main.go
index 45b9a08..2511227 100644
--- a/cmd/mobius-hotline-server/main.go
+++ b/cmd/mobius-hotline-server/main.go
@@ -205,9 +205,24 @@ func main() {
slogger.Error("Error loading news", "err", err)
os.Exit(1)
}
- srv.ThreadedNewsMgr = threadedNews
reloaders = append(reloaders, namedReloader{"threaded news", threadedNews})
+ srv.ThreadedNewsMgr = threadedNews
+ if len(config.NewsFeeds) > 0 {
+ feedNews, err := mobius.NewFeedNewsManager(
+ threadedNews,
+ config.NewsFeeds,
+ slogger,
+ "mobius-hotline-server/"+version,
+ config.Encoding,
+ )
+ if err != nil {
+ slogger.Error("Error configuring feed-backed news", "err", err)
+ os.Exit(1)
+ }
+ srv.ThreadedNewsMgr = feedNews
+ }
+
srv.AccountManager, err = mobius.NewYAMLAccountManager(path.Join(*configDir, "Users/"))
if err != nil {
slogger.Error("Error loading accounts", "err", err)
diff --git a/cmd/mobius-hotline-server/mobius/config/config.yaml b/cmd/mobius-hotline-server/mobius/config/config.yaml
index d7ded22..2fda24c 100644
--- a/cmd/mobius-hotline-server/mobius/config/config.yaml
+++ b/cmd/mobius-hotline-server/mobius/config/config.yaml
@@ -25,10 +25,11 @@ Trackers:
- hotline.kicks-ass.net:5499
# - example-tracker-with-password.com:5499:mypassword
-# Text encoding used for file and folder names sent to and from clients.
+# Text encoding used for file and folder names and server-generated feed news.
+# User-authored chat, news, replies, and usernames remain raw protocol bytes.
# Supported values:
-# "macintosh" - Translates between Mac Roman and UTF-8 (default, compatible with classic Hotline clients)
-# "utf8" - No conversion; passes file names through as-is (for servers with only modern UTF-8 clients)
+# "macintosh" - Converts filesystem names and feed news for classic Hotline clients (default)
+# "utf8" - Leaves UTF-8 filesystem names and feed news unchanged (modern clients only)
# If omitted, defaults to "macintosh".
Encoding: macintosh
@@ -52,6 +53,18 @@ NewsDateFormat: ""
# Optional custom delimiter between flat news postings
NewsDelimiter: ""
+# Optional mappings from existing ordinary news categories to public RSS or
+# Atom feeds. Opening a mapped category checks its source and imports unseen
+# entries as ordinary root articles in ThreadedNews.yaml. The complete category
+# path must already exist. Feed formats are detected automatically.
+#
+# NewsFeeds:
+# - CategoryPath: ["Software Updates", "Afterglow"]
+# URL: "https://morphing.cloud/afterglow/appcast.xml"
+# - CategoryPath: ["Software Updates", "Mobius"]
+# URL: "https://github.com/jhalter/mobius/releases.atom"
+NewsFeeds: []
+
# Maximum simultaneous downloads; currently unimplemented
MaxDownloads: 0
@@ -67,4 +80,4 @@ IgnoreFiles:
- '^@' # Ignore all files starting with "@"
# Enable service announcement on local network with Bonjour
-EnableBonjour: false \ No newline at end of file
+EnableBonjour: false