NOTE: This is an experimental project not intended to be used on a public accessible host.
Transmission-RSS is a tool to fetch and parse RSS feeds, extract episode data and add them to transmission client through it's RPC interface.
- Web interface to display downloaded episodes and trigger actions (download, cleanup)
- Currently includes a ShowRSS parser, but parsers can be added by implementing
FeedParserInterface
. - Boxcar and Pushbullet push notification integration. Other push service providers can be added by implementing
NotificationProviderInterface
. - Commands for download and cleanup to be run by
cron
- SQLite DB to store downloaded episodes
- Download or clone the repo.
- Copy
config.php.example
toconfig.php
- Set up your feed at ShowRSS and get feed URL.
- Enter your feed in
config.php
- If you want to use trss from a server subdirectory and it to the
baseURI
ex.<?php return [ // ... "baseURI" => "/your-directory", ]
- Configure your transmission client's RPC access
<?php return [ // ... "transmission" => [ "active" => true, "host" =>"https://example.com:9091", "endpoint" => "/transmission/rpc", "username" =>"username", "password" =>"password", "shows_dir" => "/path/to/tv-shows/folder" ], ]
- If you want to use Boxcar or Pushbullet, set up your account, get a token and save it in
config.php
<?php return [ // ... "notification" => [ "active" => true, "service" => "pushbullet" ], "boxcar" => [ "provider" => \App\Notification\Boxcar::class, "token" => "your-boxcar-token" ], "pushbullet" => [ "provider" => \App\Notification\Pushbullet::class, "token" => "your-pushbullet-token" ] ]
- Copy the
trrss_db.sqlite.empty
file totrrss_db.sqlite
- Basically you are ready to go.
The project is a proof-of-concept. The aim was to make the service without any framework, but with OOP.
Pulling in an ORM appears to be overkill for the current use (storing episodes), but other crud
features were planned.
The project consists of a minimal router
implementation, an api
class, XML parser, transmission RPC (vohof/transmission) and Boxcar client.
The frontend of the web interface was created with Vue.js and compiled with Webpack. To watch and compile assets on change, run webpack
.
New parsers can be added through the FeedParserInterface
. Make a class in src/Parsers
that extends the BaseParser
class. This implements the FeedParserInteface
and already has implementation for XML parsing (parse()
).
You should only write the parseFeed()
method based on the actual feed like the ShowRSS parser:
<?php
namespace App\Parsers;
use App\Models\Episode;
class ShowRSSParser extends BaseParser implements FeedParserInterface
{
public function parseFeed($feedItems)
{
$episodes = [];
foreach($feedItems as $item) {
$episode = new Episode();
$episode->show_title = $item->getElementsByTagNameNS('https://showrss.info','show_name')->item(0)->nodeValue;
$episode->link = $item->getElementsByTagName('link')->item(0)->nodeValue;
$episode->show_id = $item->getElementsByTagNameNS('https://showrss.info','show_id')->item(0)->nodeValue;
$episode->episode_id = $item->getElementsByTagNameNS('https://showrss.info','episode_id')->item(0)->nodeValue;
$episode->title = $item->getElementsByTagNameNS('https://showrss.info','raw_title')->item(0)->nodeValue;
$episodes[] = $episode;
}
return $episodes;
}
}
- Create interface for notifications for implementations other than Boxcar
- ...