Reddit: posted by hand, with the rules pasted

Reddit's API isn't open to apps like this one, so Supermarket no longer
signs in to Reddit, publishes or schedules there, or reads subreddits and
the account's posts. The internal/api/reddit client, Reddit's OAuth, its
keys and its Social accounts card are gone.

Supermarket still writes the post. Each Reddit draft in Posts has a box
for its subreddit's rules, with a link to them on Reddit: pasted once,
they're kept (subreddits.data, as pasted_rules) and given to the model
for later drafts. Open in Reddit saves the edits and opens the submit
page filled in; Copy title and Copy text (with the tagged source link)
cover a box that comes up empty; Mark as posted records it. Warnings come
from the pasted rules and the posts marked as posted. Fill's subreddit
suggestions are kept unchecked, and say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-30 11:48:54 -07:00
co-authored by Claude Opus 5.5
parent bae468e01c
commit 5451fe6d63
33 changed files with 382 additions and 1107 deletions
+1 -4
View File
@@ -25,7 +25,6 @@ var services = []service{
{"x", "X", "Posting, and reading partners' posts", "/settings/accounts#network-X", []string{secrets.XBearerToken}},
{"linkedin", "LinkedIn", "Posting as a person", "/settings/accounts#network-LinkedIn", nil},
{"linkedin_page", "LinkedIn page", "Posting as the company's page", "/settings/accounts", nil},
{"reddit", "Reddit", "Posting to subreddits", "/settings/accounts#network-Reddit", nil},
{"youtube", "YouTube", "Reading partners' videos", "/settings/accounts", []string{secrets.YouTubeAPIKey}},
{"google", "Google Search Console", "SEO: what ranks, the morning check", "/settings/search", []string{secrets.GoogleRefreshToken}},
{"bing", "Bing Webmaster", "SEO: links to the sites", "/settings/search", []string{secrets.BingAPIKey}},
@@ -195,7 +194,7 @@ func (s *Server) connectionsPage(w http.ResponseWriter, r *http.Request) {
_, _ = s.DB.GetJSON(connChecksKey, &checks)
signins := s.connections()
// The posting networks count their accounts.
postingCount := map[string]int{"x": 0, "linkedin": 0, "linkedin_page": 0, "reddit": 0}
postingCount := map[string]int{"x": 0, "linkedin": 0, "linkedin_page": 0}
postingNames := map[string]string{}
for _, a := range s.postingAccounts() {
if s.working(a) {
@@ -283,8 +282,6 @@ func connectionName(id string) string {
return "linkedin"
case "linkedin_page":
return liPageProvider
case "reddit":
return "reddit"
case "google":
return "google"
}