From 4ac2feb392132aa89079aa9750aa047f99d8d832 Mon Sep 17 00:00:00 2001 From: Dag Date: Thu, 17 Nov 2022 18:51:37 +0100 Subject: [PATCH] docs: improve docs (#3152) --- README.md | 101 ++++++++++++++++++++++++++---------------------------- 1 file changed, 49 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index 34df1b85..437c6909 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,20 @@ RSS-Bridge is a PHP project capable of generating RSS and Atom feeds for website |![Screenshot #5](/static/screenshot-5.png?raw=true)|![Screenshot #6](/static/screenshot-6.png?raw=true)| |![Screenshot #7](/static/twitter-form.png?raw=true)|![Screenshot #8](/static/twitter-rasmus.png?raw=true)| +## A subset of bridges + +* `YouTube` : YouTube user channel, playlist or search +* `Twitter` : Return keyword/hashtag search or user timeline +* `Telegram` : Return the latest posts from a public group +* `Reddit` : Return the latest posts from a subreddit or user +* `Filter` : Filter an existing feed url +* `Vk` : Latest posts from a user or group +* `FeedMerge` : Merge two or more existing feeds into one +* `Twitch` : Fetch the latest videos from a channel +* `ThePirateBay` : Returns the newest indexed torrents from [The Pirate Bay](https://thepiratebay.se/) with keywords + +And [many more](bridges/), thanks to the community! + [Full documentation](https://rss-bridge.github.io/rss-bridge/index.html) Check out RSS-Bridge right now on https://rss-bridge.org/bridge01 or find another @@ -101,7 +115,9 @@ modify the `repository` in `scalingo.json`. See https://github.com/RSS-Bridge/rs Learn more in [Installation](https://rss-bridge.github.io/rss-bridge/For_Hosts/Installation.html). -### Create a new bridge from scratch +## How-to + +### How to create a new bridge from scratch Create the new bridge in e.g. `bridges/BearBlogBridge.php`: @@ -114,40 +130,13 @@ class BearBlogBridge extends BridgeAbstract public function collectData() { - // We can perform css selectors on $dom $dom = getSimpleHTMLDOM('https://herman.bearblog.dev/blog/'); - - // An array of dom nodes - $blogPosts = $dom->find('.blog-posts li'); - - foreach ($blogPosts as $blogPost) { - // Select the anchor at index 0 (the first anchor found) - $a = $blogPost->find('a', 0); - - // Select the inner text of the anchor - $title = $a->innertext; - - // Select the href attribute of the anchor - $url = $a->href; - - // Select the