Check-in [dbb0abdf71]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Case-insensitive title match |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
dbb0abdf71dfb05c16798833911cbab8 |
| User & Date: | mario 2021-04-05 06:23:43 |
Context
|
2021-04-05
| ||
| 06:24 | Comment out some test snippets check-in: b7d70e6f66 user: mario tags: trunk | |
| 06:23 | Case-insensitive title match check-in: dbb0abdf71 user: mario tags: trunk | |
| 06:23 | Note about changed cloudflare API, but code not updated yet. check-in: 7d2df178fd user: mario tags: trunk | |
Changes
Changes to cron.daily/news_fossies.php.
| ︙ | ︙ | |||
43 44 45 46 47 48 49 |
// package name and version
preg_match("~HREF=\"([\w-]+?)-(\d[\w._-]+?)(\.(zip|tar|gz|xz|bz2|pax|tgz|txt|tbz2|7z|exe))*/\"~", $html, $pkg);
if (count($pkg) < 3) { continue; }
list(, $pkg, $ver, ) = $pkg;
// package title
| | | | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
// package name and version
preg_match("~HREF=\"([\w-]+?)-(\d[\w._-]+?)(\.(zip|tar|gz|xz|bz2|pax|tgz|txt|tbz2|7z|exe))*/\"~", $html, $pkg);
if (count($pkg) < 3) { continue; }
list(, $pkg, $ver, ) = $pkg;
// package title
preg_match("~>([^<>]+)</a>~i", $html, $title);
$title = $title[1];
// convert date string
preg_match("~\((\d+ \w\w\w) \d\d:\d\d~", $html, $date);
$date = strftime("%d/%m", strtotime($date[1]));
// description
preg_match("~</a>[\s-]*([^<>]+)</DIV>~i", $html, $desc);
$desc = htmlentities($desc[1]);
// combine
$output .= "<a href=\"http://fossies.org/$pkg\" title=\"$desc\">"
. "<small>$date</small> $title <em>$ver</em></a>\n";
}
// save
file_put_contents("./template/feed.fossies.htm", $output);
}
|