Flesh out OPDS generation backend to be more robust and to support generic Atom feeds

This commit is contained in:
Alex Cabal 2022-06-20 21:55:34 -05:00
parent 35188195f1
commit f6df03cfca
23 changed files with 1549 additions and 267 deletions

20
lib/RssFeed.php Normal file
View file

@ -0,0 +1,20 @@
<?
class RssFeed extends Feed{
public $Description;
public function __construct(string $url, string $title, string $path, string $description, array $entries){
parent::__construct($url, $title, $path, $entries);
$this->Description = $description;
$this->Stylesheet = '/rss/style';
}
protected function GetXmlString(): string{
if($this->XmlString === null){
$feed = Template::RssFeed(['url' => $this->Url, 'description' => $this->Description, 'title' => $this->Title, 'entries' => $this->Entries, 'updatedTimestamp' => (new DateTime())->format('r')]);
$this->XmlString = $this->CleanXmlString($feed);
}
return $this->XmlString;
}
}