From c109c565cb34eee5ad75711a9dce639259d53206 Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Fri, 24 Jun 2022 12:54:57 -0500 Subject: [PATCH] Move feeds under new /feeds root --- .gitignore | 12 +++---- README.md | 3 -- config/apache/standardebooks.org.conf | 21 +++++++----- config/apache/standardebooks.test.conf | 21 +++++++----- lib/AtomFeed.php | 2 +- lib/OpdsFeed.php | 2 +- lib/RssFeed.php | 2 +- scripts/generate-feeds | 42 ++++++++++++------------ templates/Header.php | 4 ++- templates/OpdsAcquisitionFeed.php | 6 ++-- templates/OpdsNavigationFeed.php | 4 +-- www/ebooks/opensearch.xml | 4 +-- www/{ => feeds}/atom/index.php | 13 ++++---- www/{ => feeds}/atom/style.php | 2 +- www/feeds/atom/subjects/index.php | 18 ++++++++++ www/feeds/index.php | 30 ++++++++--------- www/{ => feeds}/opds/search.php | 10 +++--- www/{ => feeds}/opds/style.php | 6 ++-- www/{ => feeds}/opds/subjects/.gitignore | 0 www/{ => feeds}/rss/index.php | 13 ++++---- www/{ => feeds}/rss/style.php | 2 +- www/feeds/rss/subjects/index.php | 18 ++++++++++ 22 files changed, 136 insertions(+), 99 deletions(-) rename www/{ => feeds}/atom/index.php (70%) rename www/{ => feeds}/atom/style.php (98%) create mode 100644 www/feeds/atom/subjects/index.php rename www/{ => feeds}/opds/search.php (69%) rename www/{ => feeds}/opds/style.php (94%) rename www/{ => feeds}/opds/subjects/.gitignore (100%) rename www/{ => feeds}/rss/index.php (61%) rename www/{ => feeds}/rss/style.php (97%) create mode 100644 www/feeds/rss/subjects/index.php diff --git a/.gitignore b/.gitignore index b3bac6ea..e6c3baaf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,12 @@ ebooks/* www/ebooks/* www/images/covers/* -www/opds/*.xml -www/opds/subjects/*.xml -www/rss/*.xml -www/rss/subjects/*.xml -www/atom/*.xml -www/atom/subjects/*.xml +www/feeds/opds/*.xml +www/feeds/opds/subjects/*.xml +www/feeds/rss/*.xml +www/feeds/rss/subjects/*.xml +www/feeds/atom/*.xml +www/feeds/atom/subjects/*.xml vendor/ composer.lock .vagrant/ diff --git a/README.md b/README.md index 02a98d24..bee7db2c 100644 --- a/README.md +++ b/README.md @@ -38,9 +38,6 @@ sudo ln -s /standardebooks.org/web/config/php/fpm/standardebooks.test.ini /etc/p sudo ln -s /standardebooks.org/web/config/php/fpm/standardebooks.test.ini /etc/php/*/fpm/conf.d/ sudo ln -s /standardebooks.org/web/config/php/fpm/standardebooks.test.conf /etc/php/*/fpm/pool.d/ sudo systemctl restart "php*-fpm.service" - -# Download the OPDS index template -wget -O /standardebooks.org/web/www/opds/index.xml https://standardebooks.org/opds ``` If everything went well you should now be able to open your web browser and visit `https://standardebooks.test/`. However, you won’t see any ebooks if you visit `https://standardebooks.test/ebooks/`. To install some ebooks, first you have to clone their source from GitHub, then deploy them to your local website using the `./scripts/deploy-ebook-to-www` script: diff --git a/config/apache/standardebooks.org.conf b/config/apache/standardebooks.org.conf index 6251d592..770f65d5 100644 --- a/config/apache/standardebooks.org.conf +++ b/config/apache/standardebooks.org.conf @@ -102,22 +102,22 @@ Define webroot /standardebooks.org/web Header set Content-Type "text/plain" - # application/xml allows the page to be displayed in a browser. application/atom+xml will cause it to be downloaded. - + DirectoryIndex index.xml - Header set Content-Type "application/xml" - # application/xml allows the page to be displayed in a browser and the encoding to be + # text/xml allows the page to be displayed in a browser and the encoding to be # determined from the document and not the HTTP headers. application/rss+xml will cause it to be downloaded. - - Header set Content-Type "application/xml" - + + + Header set Content-Type "text/xml; charset=utf-8" + + # Enable HTTP CORS so that browser-based readers like Readium can access opds and ebooks # Allow fonts for newsletter emails # See https://github.com/standardebooks/tools/issues/2 - + Header set Access-Control-Allow-Origin "*" @@ -250,7 +250,10 @@ Define webroot /standardebooks.org/web # If we ask for /opds/all?query=xyz, rewrite that to the search page. RewriteCond %{QUERY_STRING} ^query= - RewriteRule ^/opds/all.xml$ /opds/search.php [QSA] + RewriteRule ^/feeds/opds/all.xml$ /feeds/opds/search.php [QSA] + + # Rewrite old links to feeds + RewriteRule ^/(opds|rss|atom)(.*)$ /feeds/$1$2 [R=301,L] # Newsletter RewriteRule ^/newsletter$ /newsletter/subscribers/new.php diff --git a/config/apache/standardebooks.test.conf b/config/apache/standardebooks.test.conf index 47d9912b..beb58612 100644 --- a/config/apache/standardebooks.test.conf +++ b/config/apache/standardebooks.test.conf @@ -101,22 +101,22 @@ Define webroot /standardebooks.org/web Header set Content-Type "text/plain" - # application/xml allows the page to be displayed in a browser. application/atom+xml will cause it to be downloaded. - + DirectoryIndex index.xml - Header set Content-Type "application/xml" - # application/xml allows the page to be displayed in a browser and the encoding to be + # text/xml allows the page to be displayed in a browser and the encoding to be # determined from the document and not the HTTP headers. application/rss+xml will cause it to be downloaded. - - Header set Content-Type "application/xml" - + + + Header set Content-Type "text/xml; charset=utf-8" + + # Enable HTTP CORS so that browser-based readers like Readium can access opds and ebooks # Allow fonts for newsletter emails # See https://github.com/standardebooks/tools/issues/2 - + Header set Access-Control-Allow-Origin "*" @@ -249,7 +249,10 @@ Define webroot /standardebooks.org/web # If we ask for /opds/all?query=xyz, rewrite that to the search page. RewriteCond %{QUERY_STRING} ^query= - RewriteRule ^/opds/all.xml$ /opds/search.php [QSA] + RewriteRule ^/feeds/opds/all.xml$ /feeds/opds/search.php [QSA] + + # Rewrite old links to feeds + RewriteRule ^/(opds|rss|atom)(.*)$ /feeds/$1$2 [R=301,L] # Newsletter RewriteRule ^/newsletter$ /newsletter/subscribers/new.php diff --git a/lib/AtomFeed.php b/lib/AtomFeed.php index 70fdfca1..7ffa97f6 100644 --- a/lib/AtomFeed.php +++ b/lib/AtomFeed.php @@ -15,7 +15,7 @@ public function __construct(string $title, string $subtitle, string $url, string parent::__construct($title, $url, $path, $entries); $this->Subtitle = $subtitle; $this->Id = $url; - $this->Stylesheet = '/atom/style'; + $this->Stylesheet = '/feeds/atom/style'; } protected function GetXmlString(): string{ diff --git a/lib/OpdsFeed.php b/lib/OpdsFeed.php index 5945914b..8177216c 100644 --- a/lib/OpdsFeed.php +++ b/lib/OpdsFeed.php @@ -7,7 +7,7 @@ class OpdsFeed extends AtomFeed{ public function __construct(string $title, string $subtitle, string $url, string $path, array $entries, ?OpdsNavigationFeed $parent){ parent::__construct($title, $subtitle, $url, $path, $entries); $this->Parent = $parent; - $this->Stylesheet = '/opds/style'; + $this->Stylesheet = '/feeds/opds/style'; } protected function SaveUpdatedTimestamp(string $entryId, DateTime $updatedTimestamp): void{ diff --git a/lib/RssFeed.php b/lib/RssFeed.php index 1b3888df..c84ca049 100644 --- a/lib/RssFeed.php +++ b/lib/RssFeed.php @@ -5,7 +5,7 @@ class RssFeed extends Feed{ public function __construct(string $title, string $description, string $url, string $path, array $entries){ parent::__construct($title, $url, $path, $entries); $this->Description = $description; - $this->Stylesheet = '/rss/style'; + $this->Stylesheet = '/feeds/rss/style'; } protected function GetXmlString(): string{ diff --git a/scripts/generate-feeds b/scripts/generate-feeds index cba824af..68e9fad5 100755 --- a/scripts/generate-feeds +++ b/scripts/generate-feeds @@ -33,16 +33,16 @@ $subjects = []; $ebooksBySubject = []; $ebooksPerNewestEbooksFeed = 30; -if(!is_dir(WEB_ROOT . '/opds/subjects')){ - mkdir(WEB_ROOT . '/opds/subjects'); +if(!is_dir(WEB_ROOT . '/feeds/opds/subjects')){ + mkdir(WEB_ROOT . '/feeds/opds/subjects'); } -if(!is_dir(WEB_ROOT . '/rss/subjects')){ - mkdir(WEB_ROOT . '/rss/subjects'); +if(!is_dir(WEB_ROOT . '/feeds/rss/subjects')){ + mkdir(WEB_ROOT . '/feeds/rss/subjects'); } -if(!is_dir(WEB_ROOT . '/atom/subjects')){ - mkdir(WEB_ROOT . '/atom/subjects'); +if(!is_dir(WEB_ROOT . '/feeds/atom/subjects')){ + mkdir(WEB_ROOT . '/feeds/atom/subjects'); } // Iterate over all ebooks to build the various feeds @@ -86,7 +86,7 @@ $opdsRootEntries = [ new OpdsNavigationEntry( 'Newest ' . number_format($ebooksPerNewestEbooksFeed) . ' Standard Ebooks', 'The ' . number_format($ebooksPerNewestEbooksFeed) . ' latest Standard Ebooks, most-recently-released first.', - '/opds/new-releases', + '/feeds/opds/new-releases', $now, 'http://opds-spec.org/sort/new', 'acquisition' @@ -94,78 +94,78 @@ $opdsRootEntries = [ new OpdsNavigationEntry( 'Standard Ebooks by Subject', 'Browse Standard Ebooks by subject.', - '/opds/subjects', + '/feeds/opds/subjects', $now, 'subsection', 'navigation'), new OpdsNavigationEntry( 'All Standard Ebooks', 'All Standard Ebooks, most-recently-updated first. This is a Complete Acquisition Feed as defined in OPDS 1.2 §2.5.', - '/opds/all', + '/feeds/opds/all', $now, 'http://opds-spec.org/crawlable', 'acquisition') ]; -$opdsRoot = new OpdsNavigationFeed('Standard Ebooks', 'The navigation root for the Standard Ebooks OPDS feed.', '/opds', WEB_ROOT . '/opds/index.xml', $opdsRootEntries, null); +$opdsRoot = new OpdsNavigationFeed('Standard Ebooks', 'The navigation root for the Standard Ebooks OPDS feed.', '/feeds/opds', WEB_ROOT . '/feeds/opds/index.xml', $opdsRootEntries, null); SaveFeed($opdsRoot, $force, $now); // Create the subjects navigation document sort($subjects); $subjectNavigationEntries = []; foreach($subjects as $subject){ - $subjectNavigationEntries[] = new OpdsNavigationEntry($subject, 'Standard Ebooks tagged with “' . strtolower($subject) . ',” most-recently-released first.', '/opds/subjects/' . Formatter::MakeUrlSafe($subject), $now, 'subsection', 'navigation'); + $subjectNavigationEntries[] = new OpdsNavigationEntry($subject, 'Standard Ebooks tagged with “' . strtolower($subject) . ',” most-recently-released first.', '/feeds/opds/subjects/' . Formatter::MakeUrlSafe($subject), $now, 'subsection', 'navigation'); } -$subjectsFeed = new OpdsNavigationFeed('Standard Ebooks by Subject', 'Browse Standard Ebooks by subject.', '/opds/subjects', WEB_ROOT . '/opds/subjects/index.xml', $subjectNavigationEntries, $opdsRoot); +$subjectsFeed = new OpdsNavigationFeed('Standard Ebooks by Subject', 'Browse Standard Ebooks by subject.', '/feeds/opds/subjects', WEB_ROOT . '/feeds/opds/subjects/index.xml', $subjectNavigationEntries, $opdsRoot); $subjectsFeed->Subtitle = 'Browse Standard Ebooks by subject.'; SaveFeed($subjectsFeed, $force, $now); // Now generate each individual subject feed foreach($subjectNavigationEntries as $subjectNavigationEntry){ krsort($ebooksBySubject[$subjectNavigationEntry->Title]); - $subjectFeed = new OpdsAcquisitionFeed($subjectNavigationEntry->Title . ' Ebooks', $subjectNavigationEntry->Description, '/opds/subjects/' . Formatter::MakeUrlSafe($subjectNavigationEntry->Title), WEB_ROOT . '/opds/subjects/' . Formatter::MakeUrlSafe($subjectNavigationEntry->Title) . '.xml', $ebooksBySubject[$subjectNavigationEntry->Title], $subjectsFeed); + $subjectFeed = new OpdsAcquisitionFeed($subjectNavigationEntry->Title . ' Ebooks', $subjectNavigationEntry->Description, '/feeds/opds/subjects/' . Formatter::MakeUrlSafe($subjectNavigationEntry->Title), WEB_ROOT . '/feeds/opds/subjects/' . Formatter::MakeUrlSafe($subjectNavigationEntry->Title) . '.xml', $ebooksBySubject[$subjectNavigationEntry->Title], $subjectsFeed); SaveFeed($subjectFeed, $force, $now); } // Create the 'all' feed krsort($allEbooks); -$allFeed = new OpdsAcquisitionFeed('All Standard Ebooks', 'All Standard Ebooks, most-recently-updated first. This is a Complete Acquisition Feed as defined in OPDS 1.2 §2.5.', '/opds/all', WEB_ROOT . '/opds/all.xml', $allEbooks, $opdsRoot, true); +$allFeed = new OpdsAcquisitionFeed('All Standard Ebooks', 'All Standard Ebooks, most-recently-updated first. This is a Complete Acquisition Feed as defined in OPDS 1.2 §2.5.', '/feeds/opds/all', WEB_ROOT . '/feeds/opds/all.xml', $allEbooks, $opdsRoot, true); SaveFeed($allFeed, $force, $now); // Create the 'newest' feed -$newestFeed = new OpdsAcquisitionFeed('Newest ' . number_format($ebooksPerNewestEbooksFeed) . ' Standard Ebooks', 'The ' . number_format($ebooksPerNewestEbooksFeed) . ' latest Standard Ebooks, most-recently-released first.', '/opds/new-releases', WEB_ROOT . '/opds/new-releases.xml', $newestEbooks, $opdsRoot); +$newestFeed = new OpdsAcquisitionFeed('Newest ' . number_format($ebooksPerNewestEbooksFeed) . ' Standard Ebooks', 'The ' . number_format($ebooksPerNewestEbooksFeed) . ' latest Standard Ebooks, most-recently-released first.', '/feeds/opds/new-releases', WEB_ROOT . '/feeds/opds/new-releases.xml', $newestEbooks, $opdsRoot); SaveFeed($newestFeed, $force, $now); // Now create RSS feeds // Create the 'newest' feed -$newestRssFeed = new RssFeed('Standard Ebooks - Newest Ebooks', 'The ' . number_format($ebooksPerNewestEbooksFeed) . ' latest Standard Ebooks, most-recently-released first.', '/rss/new-releases', WEB_ROOT . '/rss/new-releases.xml', $newestEbooks); +$newestRssFeed = new RssFeed('Standard Ebooks - Newest Ebooks', 'The ' . number_format($ebooksPerNewestEbooksFeed) . ' latest Standard Ebooks, most-recently-released first.', '/feeds/rss/new-releases', WEB_ROOT . '/feeds/rss/new-releases.xml', $newestEbooks); SaveFeed($newestRssFeed, $force); // Create the 'all' feed -$allRssFeed = new RssFeed('Standard Ebooks - All Ebooks', 'All Standard Ebooks, most-recently-released first.', '/rss/all', WEB_ROOT . '/rss/all.xml', $allEbooks); +$allRssFeed = new RssFeed('Standard Ebooks - All Ebooks', 'All Standard Ebooks, most-recently-released first.', '/feeds/rss/all', WEB_ROOT . '/feeds/rss/all.xml', $allEbooks); SaveFeed($allRssFeed, $force); // Generate each individual subject feed foreach($ebooksBySubject as $subject => $ebooks){ krsort($ebooks); - $subjectRssFeed = new RssFeed('Standard Ebooks - ' . (string)$subject . ' Ebooks', 'Standard Ebooks tagged with “' . strtolower($subject) . ',” most-recently-released first.', '/rss/subjects/' . Formatter::MakeUrlSafe((string)$subject), WEB_ROOT . '/rss/subjects/' . Formatter::MakeUrlSafe((string)$subject) . '.xml', $ebooks); + $subjectRssFeed = new RssFeed('Standard Ebooks - ' . (string)$subject . ' Ebooks', 'Standard Ebooks tagged with “' . strtolower($subject) . ',” most-recently-released first.', '/feeds/rss/subjects/' . Formatter::MakeUrlSafe((string)$subject), WEB_ROOT . '/feeds/rss/subjects/' . Formatter::MakeUrlSafe((string)$subject) . '.xml', $ebooks); SaveFeed($subjectRssFeed, $force); } // Now create the Atom feeds // Create the 'newest' feed -$newestAtomFeed = new AtomFeed('Standard Ebooks - Newest Ebooks', 'The ' . number_format($ebooksPerNewestEbooksFeed) . ' latest Standard Ebooks, most-recently-released first.', '/atom/new-releases', WEB_ROOT . '/atom/new-releases.xml', $newestEbooks); +$newestAtomFeed = new AtomFeed('Standard Ebooks - Newest Ebooks', 'The ' . number_format($ebooksPerNewestEbooksFeed) . ' latest Standard Ebooks, most-recently-released first.', '/feeds/atom/new-releases', WEB_ROOT . '/feeds/atom/new-releases.xml', $newestEbooks); SaveFeed($newestAtomFeed, $force, $now); // Create the 'all' feed -$allAtomFeed = new AtomFeed('Standard Ebooks - All Ebooks', 'All Standard Ebooks, most-recently-released first.', '/atom/all', WEB_ROOT . '/atom/all.xml', $allEbooks); +$allAtomFeed = new AtomFeed('Standard Ebooks - All Ebooks', 'All Standard Ebooks, most-recently-released first.', '/feeds/atom/all', WEB_ROOT . '/feeds/atom/all.xml', $allEbooks); SaveFeed($allAtomFeed, $force, $now); // Generate each individual subject feed foreach($ebooksBySubject as $subject => $ebooks){ krsort($ebooks); - $subjectAtomFeed = new AtomFeed('Standard Ebooks - ' . (string)$subject . ' Ebooks', 'Standard Ebooks tagged with “' . strtolower($subject) . ',” most-recently-released first.', '/atom/subjects/' . Formatter::MakeUrlSafe((string)$subject), WEB_ROOT . '/atom/subjects/' . Formatter::MakeUrlSafe((string)$subject) . '.xml', $ebooks); + $subjectAtomFeed = new AtomFeed('Standard Ebooks - ' . (string)$subject . ' Ebooks', 'Standard Ebooks tagged with “' . strtolower($subject) . ',” most-recently-released first.', '/feeds/atom/subjects/' . Formatter::MakeUrlSafe((string)$subject), WEB_ROOT . '/feeds/atom/subjects/' . Formatter::MakeUrlSafe((string)$subject) . '.xml', $ebooks); SaveFeed($subjectAtomFeed, $force, $now); } ?> diff --git a/templates/Header.php b/templates/Header.php index 33c385a9..60baf928 100644 --- a/templates/Header.php +++ b/templates/Header.php @@ -40,7 +40,9 @@ - + + + diff --git a/templates/OpdsAcquisitionFeed.php b/templates/OpdsAcquisitionFeed.php index 8c5cc069..bec27955 100644 --- a/templates/OpdsAcquisitionFeed.php +++ b/templates/OpdsAcquisitionFeed.php @@ -2,7 +2,7 @@ /* Notes: -- *All* OPDS feeds must contain a rel="http://opds-spec.org/crawlable" link pointing to the /opds/all feed +- *All* OPDS feeds must contain a rel="http://opds-spec.org/crawlable" link pointing to the /feeds/opds/all feed - The element is required to note this as a "Complete Acquisition Feeds"; see https://specs.opds.io/opds-1.2#25-complete-acquisition-feeds @@ -19,9 +19,9 @@ xmlns:fh="http://purl.org/syndication/history/1.0"> - + - + <?= Formatter::ToPlainXmlText($title) ?> diff --git a/templates/OpdsNavigationFeed.php b/templates/OpdsNavigationFeed.php index 563a1932..a5d58e97 100644 --- a/templates/OpdsNavigationFeed.php +++ b/templates/OpdsNavigationFeed.php @@ -10,8 +10,8 @@ - - + + <?= Formatter::ToPlainXmlText($title) ?> diff --git a/www/ebooks/opensearch.xml b/www/ebooks/opensearch.xml index 71654409..98a42364 100644 --- a/www/ebooks/opensearch.xml +++ b/www/ebooks/opensearch.xml @@ -7,7 +7,7 @@ open UTF-8 UTF-8 - - + + diff --git a/www/atom/index.php b/www/feeds/atom/index.php similarity index 70% rename from www/atom/index.php rename to www/feeds/atom/index.php index bc59ef36..fc59b923 100644 --- a/www/atom/index.php +++ b/www/feeds/atom/index.php @@ -9,13 +9,13 @@

Note that some RSS readers may show these feeds ordered by when an ebook was last updated, even though the feeds are ordered by when an ebook was first released. You should be able to change the sort order in your RSS reader.

  • -

    New releases

    -

    /atom/new-releases

    +

    New releases

    +

    /feeds/atom/new-releases

    The thirty latest Standard Ebooks, most-recently-released first.

  • -

    All ebooks

    -

    /atom/all

    +

    All ebooks

    +

    /feeds/atom/all

    All Standard Ebooks, most-recently-released first.

@@ -24,9 +24,8 @@
  • -

    -

    -

    /atom/subjects/

    +

    +

    /feeds/atom/subjects/

diff --git a/www/atom/style.php b/www/feeds/atom/style.php similarity index 98% rename from www/atom/style.php rename to www/feeds/atom/style.php index e130c5c2..24c1791d 100644 --- a/www/atom/style.php +++ b/www/feeds/atom/style.php @@ -2,7 +2,7 @@ require_once('Core.php'); // `text/xsl` is the only mime type recognized by Chrome for XSL stylesheets -header('Content-Type: text/xsl'); +header('Content-Type: text/xsl; charset=utf-8'); print("\n") ?> diff --git a/www/feeds/atom/subjects/index.php b/www/feeds/atom/subjects/index.php new file mode 100644 index 00000000..e0bec2c2 --- /dev/null +++ b/www/feeds/atom/subjects/index.php @@ -0,0 +1,18 @@ + 'Atom Ebook Feeds by Subject', 'description' => 'A list of available Atom 1.0 feeds of Standard Ebooks ebooks by subject.']) ?> +
+
+

Atom 1.0 Feeds by Subject

+
    + +
  • +

    +

    /feeds/atom/subjects/

    +
  • + +
+
+
+ diff --git a/www/feeds/index.php b/www/feeds/index.php index 8af36544..7d085910 100644 --- a/www/feeds/index.php +++ b/www/feeds/index.php @@ -18,8 +18,8 @@

OPDS feeds are designed for use with ereading systems like KOreader or Calibre, or with ereaders like Foliate. They allow you to search, browse, and download from our catalog, directly in your ereader. They’re also perfect for organizations who wish to download and process our catalog efficiently.

@@ -40,13 +40,13 @@

Note that some RSS readers may show these feeds ordered by when an ebook was last updated, even though the feeds are ordered by when an ebook was first released. You should be able to change the sort order in your RSS reader.

  • -

    New releases

    -

    /atom/new-releases

    +

    New releases

    +

    /feeds/atom/new-releases

    The thirty latest Standard Ebooks, most-recently-released first.

  • -

    All ebooks

    -

    /atom/all

    +

    All ebooks

    +

    /feeds/atom/all

    All Standard Ebooks, most-recently-released first.

@@ -55,9 +55,8 @@
  • -

    -

    -

    /atom/subjects/

    +

    +

    /feeds/atom/subjects/

@@ -68,13 +67,13 @@

RSS feeds are an alternative to Atom feeds. They contain less information than Atom feeds, but might be better supported by some RSS readers.

  • -

    New releases

    -

    /rss/new-releases

    +

    New releases

    +

    /feeds/rss/new-releases

    The thirty latest Standard Ebooks, most-recently-released first.

  • -

    All ebooks

    -

    /rss/all

    +

    All ebooks

    +

    /feeds/rss/all

    All Standard Ebooks, most-recently-released first.

@@ -83,9 +82,8 @@
  • -

    -

    -

    /rss/subjects/

    +

    +

    /feeds/rss/subjects/

diff --git a/www/opds/search.php b/www/feeds/opds/search.php similarity index 69% rename from www/opds/search.php rename to www/feeds/opds/search.php index 2bf566c8..8babe049 100644 --- a/www/opds/search.php +++ b/www/feeds/opds/search.php @@ -16,14 +16,14 @@ include(WEB_ROOT . '/404.php'); exit(); } -print("\n\n"); +print("\n\n"); ?> - /opds/all?query= - + /feeds/opds/all?query= + - - + + Search Results Results for “”. diff --git a/www/opds/style.php b/www/feeds/opds/style.php similarity index 94% rename from www/opds/style.php rename to www/feeds/opds/style.php index 89ba2a23..4e33a74f 100644 --- a/www/opds/style.php +++ b/www/feeds/opds/style.php @@ -2,7 +2,7 @@ require_once('Core.php'); // `text/xsl` is the only mime type recognized by Chrome for XSL stylesheets -header('Content-Type: text/xsl'); +header('Content-Type: text/xsl; charset=utf-8'); print("\n") ?> @@ -36,7 +36,7 @@
- + @@ -48,7 +48,7 @@

- + diff --git a/www/opds/subjects/.gitignore b/www/feeds/opds/subjects/.gitignore similarity index 100% rename from www/opds/subjects/.gitignore rename to www/feeds/opds/subjects/.gitignore diff --git a/www/rss/index.php b/www/feeds/rss/index.php similarity index 61% rename from www/rss/index.php rename to www/feeds/rss/index.php index 0b5a23db..fd214abd 100644 --- a/www/rss/index.php +++ b/www/feeds/rss/index.php @@ -8,13 +8,13 @@

RSS feeds are an alternative to Atom feeds. They contain less information than Atom feeds, but might be better supported by some RSS readers.

  • -

    New releases

    -

    /rss/new-releases

    +

    New releases

    +

    /feeds/rss/new-releases

    The thirty latest Standard Ebooks, most-recently-released first.

  • -

    All ebooks

    -

    /rss/all

    +

    All ebooks

    +

    /feeds/rss/all

    All Standard Ebooks, most-recently-released first.

@@ -23,9 +23,8 @@
  • -

    -

    -

    /rss/subjects/

    +

    +

    /feeds/rss/subjects/

diff --git a/www/rss/style.php b/www/feeds/rss/style.php similarity index 97% rename from www/rss/style.php rename to www/feeds/rss/style.php index 10d74a3e..d97e41e0 100644 --- a/www/rss/style.php +++ b/www/feeds/rss/style.php @@ -2,7 +2,7 @@ require_once('Core.php'); // `text/xsl` is the only mime type recognized by Chrome for XSL stylesheets -header('Content-Type: text/xsl'); +header('Content-Type: text/xsl; charset=utf-8'); print("\n") ?> diff --git a/www/feeds/rss/subjects/index.php b/www/feeds/rss/subjects/index.php new file mode 100644 index 00000000..ad36a41a --- /dev/null +++ b/www/feeds/rss/subjects/index.php @@ -0,0 +1,18 @@ + 'RSS Ebook Feeds by Subject', 'description' => 'A list of available RSS 2.0 feeds of Standard Ebooks ebooks by subject.']) ?> +
+
+

RSS 2.0 Feeds by Subject

+
    + +
  • +

    +

    /feeds/rss/subjects/

    +
  • + +
+
+
+