Because RR just keeps breaking rss.
- PHP 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| README.md | ||
| RoyalRoadApiBridge.php | ||
see edfig.dev
-
Put the php file in your
$RSSBRIDGE_CONTAINER_DIR/config/folder if you're running in docker or in/app/Bridges/otherwise. -
Restart rss-bridge
-
edit the sqlite db in freshrss to rewrite royalroad URLs to the rss-bridge url. Edit this bash and run it yourself
SRC='https://www.royalroad.com'
BRIDGE='$YOUR_RSS_BRIDGE_URL'
DB='$PATH_TO_SQLITEDB'
# if you're using the official image:
# DB='/config/www/freshrss/data/users/$YOUR_FRESHRSS_USERNAME/db.sqlite'
# RR author note flags: '&nopre=on' hides the note before the chapter, '&nopost=on' hides the note after it.
# Use both ('&nopre=on&nopost=on') or leave empty ('') to keep both notes.
FLAGS='&nopre=on&nopost=off'
SQL="
BEGIN;
-- Old articles: set guid to the chapter link so they match the bridge items and keep read status
UPDATE entry SET guid = link
WHERE id_feed IN (SELECT id FROM feed WHERE website LIKE '$SRC/fiction/syndication/%') AND link LIKE '$SRC/fiction/chapter/%';
-- Feeds: bridge URL, website points at the fiction page, CSS selectors cleared
UPDATE feed SET
url = '$BRIDGE/?action=display&bridge=RoyalRoadApiBridge&id=' || replace(website, '$SRC/fiction/syndication/', '') || '$FLAGS&format=Atom',
website = '$SRC/fiction/' || replace(website, '$SRC/fiction/syndication/', ''),
pathEntries = NULL,
attributes = json_remove(attributes, '\$.path_entries_filter', '\$.content_action', '\$.SimplePieHash')
WHERE website LIKE '$SRC/fiction/syndication/%';
COMMIT;
SELECT id, name, url, website FROM feed WHERE url LIKE '%RoyalRoadApiBridge%';
"
-
You should probably back up your original..
docker exec freshrss cp "$DB" "$DB.original" -
Then run the command
docker exec freshrss sqlite3 "$DB" "$SQL"