Patch Notification Robot: Providing you the latest update notifications. https://www.patchbot.de
Find a file
2025-11-05 10:35:21 +01:00
.github Add GitHub funding file 2021-01-26 17:31:35 +01:00
MastodonBotPHP@4b0405d4ce Update MastodonBotPHP submodule 2024-12-12 14:17:29 +01:00
modules Blender: parse directory listing due to bot protection 2025-11-05 10:35:21 +01:00
modules_test Import source 2019-07-15 22:27:48 +02:00
.gitignore Add new timestamp file to ignore list 2022-04-30 01:04:52 +02:00
.gitmodules Remove twitter-php submodule 2024-12-12 14:08:40 +01:00
cron.sh Remove code for tweeting 2024-12-12 14:12:22 +01:00
Database.php Sort objects by timestamp 2020-04-05 10:59:00 +02:00
db.json.example Rename empty example database file 2021-01-19 16:53:23 +01:00
HostOption.php.example Untrack configuration includes 2021-08-03 15:31:15 +02:00
LICENSE Update license file only 2021-01-28 15:45:40 +01:00
MastodonKey.php.example Add Mastodon toot exporter 2022-04-30 01:06:06 +02:00
PatchBase.php Add option to use last regex match 2025-11-05 10:32:21 +01:00
PatchCollector.php PatchCollector: modify output 2022-09-21 17:49:29 +02:00
PatchCollector_test.php Testdriver outputs json data 2024-06-28 17:50:14 +02:00
PatchFeeder.php PatchFeeder: use title also for description 2021-12-16 12:39:49 +01:00
PatchMastodon.php Moved bot to mastodon.social instance 2024-12-09 12:17:50 +01:00
PatchObject.php Tidy up version string 2021-06-16 00:05:24 +02:00
PatchViewer.php HTML: correct typo 2025-06-21 17:49:48 +02:00
README.md Remove legacy references to Twitter 2025-05-18 10:11:15 +02:00

PatchBot

Patch Notification Robot: Providing you the latest update notifications.

Installation

Remove .example suffix from files and modify configuration to your needs. Run periodically php PatchCollector.php to collect the latest product versions from vendor websites. Limit requests, so web servers will not overload. For data export to webpage, RSS feed and Mastodon use output of PatchViewer.php, PatchFeeder.php or PatchMastodon.php.

Writing web scraper

  • Inherit from PatchBase base class:
class MyProgram extends PatchBase {
	function __construct() {
		parent::__construct('Vendor', 'Product', 'https://www.vendor.com/product/');
		[$this->patch->setBranch('Branch');]
	}
	...
}
  • Implement check() method to extract version information from website using this template:
function check() : bool {
	if ($this->fetch[_json|_yaml]('https://www.url.com/'))
		return $this->parse...
	return false;
}
  • Currently available parser functions for JSON and RegEx:
    • parse_json(string)
    • parse_yaml(string)
    • parse(string)

Donate