Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The RSS feed for websites missing it

License

NotificationsYou must be signed in to change notification settings

RSS-Bridge/rss-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RSS-Bridge

RSS-Bridge is a PHP web application.

It generates web feeds for websites that don't have one.

Officially hosted instance:https://rss-bridge.org/bridge01/

IRC channel #rssbridge athttps://libera.chat/

Full documentation

Alternatively find anotherpublic instance.

Requires minimum PHP 7.4.

LICENSEGitHub releaseirc.libera.chatActions Status

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

A subset of bridges (15/447)

Tutorial

How to install on traditional shared web hosting

RSS-Bridge can basically be unzipped into a web folder. Should be working instantly.

Latest zip:https://github.com/RSS-Bridge/rss-bridge/archive/refs/heads/master.zip (2MB)

How to install on Debian 12 (nginx + php-fpm)

These instructions have been tested on a fresh Debian 12 VM from Digital Ocean (1vcpu-512mb-10gb, 5 USD/month).

timedatectl set-timezone Europe/Osloapt install git nginx php8.2-fpm php-mbstring php-simplexml php-curl php-intl# Create a user accountuseradd --shell /bin/bash --create-home rss-bridgecd /var/www# Create folder and change its ownership to rss-bridgemkdir rss-bridge&& chown rss-bridge:rss-bridge rss-bridge/# Become rss-bridgesu rss-bridge# Clone master branch into existing foldergit clone https://github.com/RSS-Bridge/rss-bridge.git rss-bridge/cd rss-bridge# Copy over the default config (OPTIONAL)cp -v config.default.ini.php config.ini.php# Recursively give full permissions to user/ownerchmod 700 --recursive ./# Give read and execute to others on folder ./staticchmod o+rx ./ ./static# Recursively give give read to others on folder ./staticchmod o+r --recursive ./static

Nginx config:

# /etc/nginx/sites-enabled/rss-bridge.confserver{listen80;    # TODO: change to your own server nameserver_name example.com;access_log /var/log/nginx/rss-bridge.access.log;error_log /var/log/nginx/rss-bridge.error.log;log_not_found off;    # Intentionally not setting a root folder    # Static content only served herelocation /static/{alias /var/www/rss-bridge/static/;}    # Pass off to php-fpm only when location is EXACTLY == /location = /{root /var/www/rss-bridge/;include snippets/fastcgi-php.conf;fastcgi_read_timeout45s;fastcgi_pass unix:/run/php/rss-bridge.sock;}    # Reduce log noiselocation = /favicon.ico{access_log off;}    # Reduce log noiselocation = /robots.txt{access_log off;}}

PHP FPM pool config:

; /etc/php/8.2/fpm/pool.d/rss-bridge.conf[rss-bridge]user = rss-bridgegroup = rss-bridgelisten = /run/php/rss-bridge.socklisten.owner = www-datalisten.group = www-data; Create 10 workers standing by to serve requestspm = staticpm.max_children = 10; Respawn worker after 500 requests (workaround for memory leaks etc.)pm.max_requests = 500

PHP ini config:

; /etc/php/8.2/fpm/conf.d/30-rss-bridge.inimax_execution_time = 15memory_limit = 64M

Restart fpm and nginx:

# Lint and restart php-fpmphp-fpm8.2 -t&& systemctl restart php8.2-fpm# Lint and restart nginxnginx -t&& systemctl restart nginx

How to install from Composer

Install the latest release.

cd /var/wwwcomposer create-project -v --no-dev --no-scripts rss-bridge/rss-bridge

How to install with Caddy

TODO. See#3785

Install from Docker Hub:

Install by downloading the docker image from Docker Hub:

# Create containerdocker create --name=rss-bridge --publish 3000:80 --volume$(pwd)/config:/config rssbridge/rss-bridge

You can put customconfig.ini.php and bridges into./config.

You must restart container for custom changes to take effect.

Seedocker-entrypoint.sh for details.

# Start containerdocker start rss-bridge

Browsehttp://localhost:3000/

Install by locally building from Dockerfile

# Build image from Dockerfiledocker build -t rss-bridge.# Create containerdocker create --name rss-bridge --publish 3000:80 --volume$(pwd)/config:/config rss-bridge

You can put customconfig.ini.php and bridges into./config.

You must restart container for custom changes to take effect.

Seedocker-entrypoint.sh for details.

# Start containerdocker start rss-bridge

Browsehttp://localhost:3000/

Install with docker-compose (using Docker Hub)

You can put customconfig.ini.php and bridges into./config.

You must restart container for custom changes to take effect.

Seedocker-entrypoint.sh for details.

docker-compose up

Browsehttp://localhost:3000/

Other installation methods

Deploy on ScalingoDeploy to HerokuDeploy to CloudronRun on PikaPods

The Heroku quick deploy currently does not work. It might work if you fork this repo andmodify therepository inscalingo.json. See#2688

Learn more inInstallation.

How-to

How to fix "Access denied."

Output is from php-fpm. It is unable to read index.php.

chown rss-bridge:rss-bridge /var/www/rss-bridge/index.php

How to password-protect the instance (token)

Modifyconfig.ini.php:

[authentication]token = "hunter2"

How to remove all cache items

As current user:

bin/cache-clear

As user rss-bridge:

sudo -u rss-bridge bin/cache-clear

As root:

sudo bin/cache-clear

How to remove all expired cache items

bin/cache-prune

How to fix "PHP Fatal error: Uncaught Exception: The FileCache path is not writable"

# Give rss-bridge ownershipchown rss-bridge:rss-bridge -R /var/www/rss-bridge/cache# Or, give www-data ownershipchown www-data:www-data -R /var/www/rss-bridge/cache# Or, give everyone write permissionchmod 777 -R /var/www/rss-bridge/cache# Or last ditch effort (CAREFUL)rm -rf /var/www/rss-bridge/cache/&& mkdir /var/www/rss-bridge/cache/

How to fix "attempt to write a readonly database"

The sqlite files (db, wal and shm) are not writeable.

chown -v rss-bridge:rss-bridge cache/*

How to fix "Unable to prepare statement: 1, no such table: storage"

rm cache/*

How to create a completely new bridge

New code files MUST havedeclare(strict_types=1); at the top of file:

<?phpdeclare(strict_types=1);

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

<?phpdeclare(strict_types=1);class BearBlogBridgeextends BridgeAbstract{constNAME ='BearBlog (bearblog.dev)';publicfunctioncollectData()    {$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 inbridge api.

How to enable all bridges

enabled_bridges[] = *

How to enable some bridges

enabled_bridges[] = TwitchBridgeenabled_bridges[] = GettrBridge

How to switch to memcached as cache backend

[cache]; Cache backend: file (default), sqlite, memcached, nulltype = "memcached"

How to switch to sqlite3 as cache backend

type = "sqlite"

How to disable bridge errors (as feed items)

When a bridge fails, RSS-Bridge will produce a feed with a single item describing the error.

This way, feed readers pick it up and you are notified.

If you don't want this behaviour, switch the error output tohttp:

[error]; Defines how error messages are returned by RSS-Bridge;; "feed" = As part of the feed (default); "http" = As HTTP error message; "none" = No errors are reportedoutput = "http"

How to accumulate errors before finally reporting it

Modifyreport_limit so that an error must occur 3 times before it is reported.

; Defines how often an error must occur before it is reported to the userreport_limit = 3

The report count is reset to 0 each day.

How to password-protect the instance (HTTP Basic Auth)

[authentication]enable = trueusername = "alice"password = "cat"

Will typically require feed readers to be configured with the credentials.

It may also be possible to manually include the credentials in the URL:

https://alice:cat@rss-bridge.org/bridge01/?action=display&bridge=FabriceBellardBridge&format=Html

How to create a new output format

Seeformats/PlaintextFormat.php for an example.

How to run unit tests and linter

These commands require that you have installed the dev dependencies incomposer.json.

Run all tests:

./vendor/bin/phpunit

Run a single test class:

./vendor/bin/phpunit --filter UrlTest

Run linter:

./vendor/bin/phpcs --standard=phpcs.xml --warning-severity=0 --extensions=php -p ./

https://github.com/squizlabs/PHP_CodeSniffer/wiki

How to spawn a minimal development environment

php -S 127.0.0.1:9001

http://127.0.0.1:9001/

Explanation

We are RSS-Bridge community, a group of developers continuing the project initiated by sebsauvage,webmaster ofsebsauvage.net, author ofShaarli andZeroBin.

SeeCONTRIBUTORS.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.

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!

Current maintainers (as of 2024): @dvikan and @Mynacol #2519

Reference

Feed item structure

This is the feed item structure that bridges are expected to produce.

$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
  • Sfeed: Text, TAB separated

Cache backends

  • File
  • SQLite
  • Memcached
  • Array
  • Null

Licenses

The source code for RSS-Bridge isPublic 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 haveyour service withyour applications usingyour 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.


[8]ページ先頭

©2009-2025 Movatter.jp