Go to file
Dag 0b95dc2d4f
chore: synchronize composer.lock (#3513)
$ composer update
Loading composer repositories with package information
Updating dependencies
Info from https://repo.packagist.org: #StandWithUkraine
Lock file operations: 0 installs, 12 updates, 6 removals
  - Removing phpdocumentor/reflection-common (2.2.0)
  - Removing phpdocumentor/reflection-docblock (5.3.0)
  - Removing phpdocumentor/type-resolver (1.6.1)
  - Removing phpspec/prophecy (v1.15.0)
  - Removing symfony/polyfill-ctype (v1.25.0)
  - Removing webmozart/assert (1.10.0)
  - Upgrading doctrine/instantiator (1.4.1 => 1.5.0)
  - Upgrading myclabs/deep-copy (1.11.0 => 1.11.1)
  - Upgrading nikic/php-parser (v4.13.2 => v4.16.0)
  - Upgrading phpunit/php-code-coverage (9.2.15 => 9.2.26)
  - Upgrading phpunit/phpunit (9.5.20 => 9.6.9)
  - Upgrading sebastian/comparator (4.0.6 => 4.0.8)
  - Upgrading sebastian/diff (4.0.4 => 4.0.5)
  - Upgrading sebastian/environment (5.1.4 => 5.1.5)
  - Upgrading sebastian/exporter (4.0.4 => 4.0.5)
  - Upgrading sebastian/recursion-context (4.0.4 => 4.0.5)
  - Upgrading sebastian/type (3.0.0 => 3.2.1)
  - Upgrading squizlabs/php_codesniffer (3.6.2 => 3.7.2)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 29 installs, 0 updates, 0 removals
  - Installing sebastian/version (3.0.2): Extracting archive
  - Installing sebastian/type (3.2.1): Extracting archive
  - Installing sebastian/resource-operations (3.0.3): Extracting archive
  - Installing sebastian/recursion-context (4.0.5): Extracting archive
  - Installing sebastian/object-reflector (2.0.4): Extracting archive
  - Installing sebastian/object-enumerator (4.0.4): Extracting archive
  - Installing sebastian/global-state (5.0.5): Extracting archive
  - Installing sebastian/exporter (4.0.5): Extracting archive
  - Installing sebastian/environment (5.1.5): Extracting archive
  - Installing sebastian/diff (4.0.5): Extracting archive
  - Installing sebastian/comparator (4.0.8): Extracting archive
  - Installing sebastian/code-unit (1.0.8): Extracting archive
  - Installing sebastian/cli-parser (1.0.1): Extracting archive
  - Installing phpunit/php-timer (5.0.3): Extracting archive
  - Installing phpunit/php-text-template (2.0.4): Extracting archive
  - Installing phpunit/php-invoker (3.1.1): Extracting archive
  - Installing phpunit/php-file-iterator (3.0.6): Extracting archive
  - Installing theseer/tokenizer (1.2.1): Extracting archive
  - Installing nikic/php-parser (v4.16.0): Extracting archive
  - Installing sebastian/lines-of-code (1.0.3): Extracting archive
  - Installing sebastian/complexity (2.0.2): Extracting archive
  - Installing sebastian/code-unit-reverse-lookup (2.0.3): Extracting archive
  - Installing phpunit/php-code-coverage (9.2.26): Extracting archive
  - Installing phar-io/version (3.2.1): Extracting archive
  - Installing phar-io/manifest (2.0.3): Extracting archive
  - Installing myclabs/deep-copy (1.11.1): Extracting archive
  - Installing doctrine/instantiator (1.5.0): Extracting archive
  - Installing phpunit/phpunit (9.6.9): Extracting archive
  - Installing squizlabs/php_codesniffer (3.7.2): Extracting archive
Generating autoload files
25 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
2023-07-08 17:07:35 +02:00
.devcontainer [Core] Activate live linting in codespaces (#3293) 2023-03-08 18:39:50 +01:00
.github [core] Fix prtester for optgroups (#3467) 2023-06-30 15:41:00 +02:00
actions refactor: display action (#3508) 2023-07-08 17:06:33 +02:00
bridges fix(tiktok): feed item link (#3511) 2023-07-08 17:07:20 +02:00
cache [TwitterBridge] Fix the bridge using a brand new API 2020-06-05 10:17:53 +02:00
caches fix(file cache): acquire lock before writing (#3509) 2023-07-08 17:06:49 +02:00
config Use standard Docker logs (#3333) 2023-05-11 01:44:11 +02:00
contrib refactor: rename rssbridge.php to bootstrap.php (#2987) 2022-08-27 23:01:06 +02:00
docs refacor: improve cache interface (#3492) 2023-07-06 15:10:30 +02:00
formats fix(html_format): add spacing below date if author is missing (#3425) 2023-06-08 23:04:16 +02:00
lib fix(file cache): acquire lock before writing (#3509) 2023-07-08 17:06:49 +02:00
static fix: move debug mode to config (#3324) 2023-06-02 20:22:09 +02:00
templates fix(html_format): add spacing below date if author is missing (#3425) 2023-06-08 23:04:16 +02:00
tests fix(CacheInterface): logic bug in getTime (#3491) 2023-07-05 17:37:21 +02:00
vendor fix: patch simple_html_dom, #3309 (#3310) 2023-03-20 19:12:13 +01:00
.dockerignore [Docker file] Fix wrong version string in docker images (#2497) 2022-03-14 05:48:40 +05:00
.git-blame-ignore-revs Add .git-blame-ignore-revs file (#2903) 2022-07-08 17:00:34 +02:00
.gitattributes [Docker] force unix line ending on bash files to prevent docker run failing on windows (#2629) 2022-04-10 18:05:43 +02:00
.gitignore docker: Switch to nginx in docker image (#2721) 2022-05-11 20:19:25 -04:00
CONTRIBUTORS.md chore: introduce CONTRIBUTORS.md (#2839) 2022-07-04 07:33:23 +02:00
Dockerfile chore: upgrade to php 8 in the Dockerfile, fix #3191 (#3256) 2023-02-13 22:21:07 +01:00
README.md feat: enable bridges using env var (#3428) 2023-06-11 03:16:03 +02:00
UNLICENSE let's unlicense ! 2014-05-21 20:11:01 +02:00
app.json Update app.json 2022-04-26 22:43:13 +02:00
composer.json [OLXBridge] new bridge (#2944) 2022-11-17 17:57:05 +01:00
composer.lock chore: synchronize composer.lock (#3513) 2023-07-08 17:07:35 +02:00
config.default.ini.php fix: tweak the defaultly enabled bridges (#3510) 2023-07-08 17:07:08 +02:00
docker-bake.hcl New docker build mechanism (#2268) 2021-10-03 16:06:30 +02:00
docker-entrypoint.sh [docker-entrypoint.sh] Add custom formats (#3179) 2022-12-10 21:25:25 +01:00
index.php refactor: rename rssbridge.php to bootstrap.php (#2987) 2022-08-27 23:01:06 +02:00
phpcompatibility.xml refactor: general code base refactor (#2950) 2022-08-06 22:46:28 +02:00
phpcs.xml docs (#3217) 2023-01-17 21:21:32 +01:00
phpunit.xml refactor: rename rssbridge.php to bootstrap.php (#2987) 2022-08-27 23:01:06 +02:00
scalingo.json Typo 2016-08-02 23:37:01 +02:00

README.md

RSS-Bridge

RSS-Bridge

RSS-Bridge is a PHP project capable of generating RSS and Atom feeds for websites that don't have one.

LICENSE GitHub release irc.libera.chat Chat on Matrix Actions Status

Screenshot #1 Screenshot #2
Screenshot #3 Screenshot #4
Screenshot #5 Screenshot #6
Screenshot #7 Screenshot #8

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 with keywords

And many more, thanks to the community!

Full documentation

Check out RSS-Bridge right now on https://rss-bridge.org/bridge01 or find another public instance.

Tutorial

RSS-Bridge requires php 7.4 (or higher).

Install with git:

cd /var/www
git clone https://github.com/RSS-Bridge/rss-bridge.git

# Give the http user write permission to the cache folder
chown www-data:www-data /var/www/rss-bridge/cache

# Optionally copy over the default config file
cp config.default.ini.php config.ini.php

Example config for nginx:

# /etc/nginx/sites-enabled/rssbridge
server {
    listen 80;
    server_name example.com;
    root /var/www/rss-bridge;
    index index.php;

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_read_timeout 60s;
        fastcgi_pass unix:/run/php/php-fpm.sock;
    }
}

Install with Docker:

Install by using docker image from Docker Hub:

# Create container
docker create --name=rss-bridge --publish 3000:80 rssbridge/rss-bridge

# Start container
docker start rss-bridge

Browse http://localhost:3000/

Install by locally building the image:

# Build image from Dockerfile
docker build -t rss-bridge .

# Create container
docker create --name rss-bridge --publish 3000:80 rss-bridge

# Start the container
docker start rss-bridge

Browse http://localhost:3000/

Install with docker-compose

Create a docker-compose.yml file locally with with the following content:

version: '2'
services:
  rss-bridge:
    image: rssbridge/rss-bridge:latest
    volumes:
      - </local/custom/path>:/config
    ports:
      - 3000:80
    restart: unless-stopped

Then launch with docker-compose:

docker-compose up

Browse http://localhost:3000/

Alternative installation methods

Deploy on Scalingo Deploy to Heroku Deploy to Cloudron

The Heroku quick deploy currently does not work. It might possibly work if you fork this repo and modify the repository in scalingo.json. See https://github.com/RSS-Bridge/rss-bridge/issues/2688

Learn more in Installation.

How-to

How to create a new bridge from scratch

Create the new bridge in e.g. bridges/BearBlogBridge.php:

<?php

class BearBlogBridge extends BridgeAbstract
{
    const NAME = 'BearBlog (bearblog.dev)';

    public function collectData()
    {
        $dom = getSimpleHTMLDOM('https://herman.bearblog.dev/blog/');
        foreach ($dom->find('.blog-posts li') as $li) {
            $a = $li->find('a', 0);
            $this->items[] = [
                'title' => $a->plaintext,
                'uri' => 'https://herman.bearblog.dev' . $a->href,
            ];
        }
    }
}

Learn more in bridge api.

How to enable all bridges

enabled_bridges[] = *

How to enable some bridges

enabled_bridges[] = TwitchBridge
enabled_bridges[] = GettrBridge

How to enable debug mode

enable_debug_mode = true

Learn more in debug mode.

How to create a new output format

Create a new format.

Explanation

We are RSS-Bridge community, a group of developers continuing the project initiated by sebsauvage, webmaster of sebsauvage.net, author of Shaarli and ZeroBin.

See CONTRIBUTORS.md

RSS-Bridge uses caching to prevent services from banning your server for repeatedly updating feeds. The specific cache duration can be different between bridges. Cached files are deleted automatically after 24 hours.

RSS-Bridge allows you to take full control over which bridges are displayed to the user. That way you can host your own RSS-Bridge service with your favorite collection of bridges!

Reference

FeedItem properties

    $item = [
        'uri' => 'https://example.com/blog/hello',
        'title' => 'Hello world',
        // Publication date in unix timestamp
        'timestamp' => 1668706254,
        'author' => 'Alice',
        'content' => 'Here be item content',
        'enclosures' => [
            'https://example.com/foo.png',
            'https://example.com/bar.png'
        ],
        'categories' => [
            'news',
            'tech',
        ],
        // Globally unique id
        'uid' => 'e7147580c8747aad',
    ]

Output formats:

  • Atom : Atom feed, for use in feed readers
  • Html : Simple HTML page
  • Json : JSON, for consumption by other applications
  • Mrss : MRSS feed, for use in feed readers
  • Plaintext : Raw text, for consumption by other applications

Licenses

The source code for RSS-Bridge is Public Domain.

RSS-Bridge uses third party libraries with their own license:

Rant

Dear so-called "social" websites.

Your catchword is "share", but you don't want us to share. You want to keep us within your walled gardens. That's why you've been removing RSS links from webpages, hiding them deep on your website, or removed feeds entirely, replacing it with crippled or demented proprietary API. FUCK YOU.

You're not social when you hamper sharing by removing feeds. You're happy to have customers creating content for your ecosystem, but you don't want this content out - a content you do not even own. Google Takeout is just a gimmick. We want our data to flow, we want RSS or Atom feeds.

We want to share with friends, using open protocols: RSS, Atom, XMPP, whatever. Because no one wants to have your service with your applications using your API force-feeding them. Friends must be free to choose whatever software and service they want.

We are rebuilding bridges you have willfully destroyed.

Get your shit together: Put RSS/Atom back in.