diff options
| author | Philip Wittamore <philip@wittamore.com> | 2026-02-25 09:23:51 +0100 |
|---|---|---|
| committer | Philip Wittamore <philip@wittamore.com> | 2026-02-25 09:23:51 +0100 |
| commit | 559871cd8af1f161df473bc967c9f651664e4371 (patch) | |
| tree | f6f9e98bd883f36d435559626cb4b6b7766f53ad | |
| parent | 2444adfe7afba6bed2608bfcd6cccc79eccf39f3 (diff) | |
| download | scripts-master.tar.gz scripts-master.tar.bz2 scripts-master.zip | |
| -rwxr-xr-x | getfeeds.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/getfeeds.php b/getfeeds.php index a632c5f..c561247 100755 --- a/getfeeds.php +++ b/getfeeds.php @@ -20,16 +20,11 @@ if (file_exists("$root/$hs")) { copy("$root/$hs", "$root/gophermap"); $dt = new DateTime("now", new DateTimeZone('Europe/Paris')); file_put_contents("$root/gophermap", "last update: ".$dt->format('Y-m-d H:i:s')."\n\n", FILE_APPEND); -}else{ - echo "$root/$hs not found, aborting"; - exit; } // iterate through feed directories -// each directory contains the feed url and title -// and receives the constructed gophermap foreach ($dir as $subdir) { - # if config files missing go to next directory + # get feed settings from directory if (!file_exists("$subdir/$fs")) continue; if (!file_exists("$subdir/$ts")) continue; @@ -111,6 +106,7 @@ foreach ($dir as $subdir) { $itemlist .= $rssstring; } } + file_put_contents("$subdir/gophermap", $itemlist); file_put_contents("$subdir/gophermap", str_repeat("\n ", 30), FILE_APPEND); @@ -125,7 +121,7 @@ foreach ($dir as $subdir) { unset($itemlist); } -// add empty lines to gophermap +// add empyu lines to gophermap file_put_contents("$root/gophermap", str_repeat("\n ", 30), FILE_APPEND); ?> |
