Patch Notification Robot: Providing you the latest update notifications. https://www.patchbot.de
Find a file
2021-01-14 12:52:18 +01:00
modules Add Decentraleyes 2021-01-14 12:52:18 +01:00
modules_test Import source 2019-07-15 22:27:48 +02:00
twitter-php@450baa2fd7 Update submodule twitter-php to v4.1.2 2020-07-25 15:43:21 +02:00
.gitignore Don't track database and timestamp files in repo 2020-05-01 15:07:47 +02:00
.gitmodules Add Twitter for PHP 2019-12-01 18:17:21 +01:00
Database.php Sort objects by timestamp 2020-04-05 10:59:00 +02:00
empty.json Import source 2019-07-15 22:27:48 +02:00
LICENSE Initial commit 2019-07-15 22:10:35 +02:00
PatchBase.php Add RegEx filter to JSON parsing 2020-10-09 21:34:02 +02:00
PatchCollector.php New feature: Branch name for software products 2020-04-01 17:25:40 +02:00
PatchCollector_test.php Test driver modified 2020-12-30 00:24:09 +01:00
PatchFeeder.php Encode HTML chars in RSS feed 2020-12-31 18:49:05 +01:00
PatchObject.php Tidy up GitHub release tags 2020-05-01 15:10:56 +02:00
PatchTwitter.php Twitter client prints tweet length 2020-04-24 19:38:06 +02:00
PatchViewer.php Encode chars in HTML page 2021-01-02 18:57:01 +01:00
README.md Update Readme 2020-06-14 23:35:06 +02:00
TwitterKeys.php Add example config for Twitter 2020-04-01 17:34:15 +02:00

PatchBot

Patch Notification Robot: Providing you the latest update notifications.

Installation

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 Twitter use output of PatchViewer.php, PatchFeeder.php or PatchTwitter.php. Twitter requires a separate developer registration.

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('https://www.url.com/' [, true]))
		return $this->parse...
	return false;
}
  • Currently available parser functions for JSON and RegEx:
    • parse_json(string)
    • parse(string)

Donate