aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraleteoryx <alyx@aleteoryx.me>2024-11-12 15:40:00 -0500
committeraleteoryx <alyx@aleteoryx.me>2024-11-12 15:40:00 -0500
commit433ec701892d4abe2eb3bd65202ce33631bdf5b0 (patch)
tree5654edd518373db4bed893cc44b36ed88200361d
parentabf8b1d21bf2c355c588e990decf043011750376 (diff)
downloadrss_dot_php-433ec701892d4abe2eb3bd65202ce33631bdf5b0.tar.gz
rss_dot_php-433ec701892d4abe2eb3bd65202ce33631bdf5b0.tar.bz2
rss_dot_php-433ec701892d4abe2eb3bd65202ce33631bdf5b0.zip
non-code
-rw-r--r--LICENSE18
-rw-r--r--README.md29
2 files changed, 47 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..747c822
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,18 @@
+-- TPL Public Domain Dedication v1.0
+-- <https://amehut.dev/~aleteoryx/tpl>
+------------------------------------------------------------------------
+
+This repository is dedicated entirely to the public domain. The author
+waives all intellectual property rights to the work as much as is
+possible in any relevant jurisdictions.
+
+In other words, do what you want.
+
+THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..3db3cdc
--- /dev/null
+++ b/README.md
@@ -0,0 +1,29 @@
+# rss_dot_php
+
+A minimal configurable RSS/Atom reader in about 200 lines of PHP.
+
+This tool isn't intended for standalone reading, instead it's
+intended to be used as an aggregator for personal feeds, that can be
+embedded into a website via an &lt;iframe&gt;.
+
+## Usage
+
+To use this tool, just download the main rss.php file and edit it.
+Each entry in the `$feeds` array corresponds to a feed that will be
+displayed. The key of the entry is the name.
+
+The following options are supported per-feed:
+
+- `$feeds[feed]["url"]`: **REQUIRED**: The URL of the RSS/Atom feed.
+- `$feeds[feed]["ttl"]`: How long to cache the feed for, in seconds. Defaults to 1 hour.
+- `$feeds[feed]["linkrel"]`: For Atom, which `rel=` value to prefer when getting a link.
+
+The remaining config options are set on the `$config` array, and are documented inside
+the file.
+
+## Caching
+
+The cache uses PHP's builtin `serialize`/`unserialize` functions, and stores entries at
+`{$config["cache_dir"]}/{md5($feed["url"])}`. Only one cache file will ever exist for
+a feed, and it is safe for multiple instances to share a cache directory, even if feed
+URLs overlap.