Patch Notification Robot: Providing you the latest update notifications. https://www.patchbot.de
Find a file
2022-06-14 17:41:34 +02:00
.github Add GitHub funding file 2021-01-26 17:31:35 +01:00
MastodonBotPHP@cf70522a80 Add new timestamp file to ignore list 2022-04-30 01:04:52 +02:00
modules Add Firefox Translations 2022-06-14 17:41:34 +02: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 Add new timestamp file to ignore list 2022-04-30 01:04:52 +02:00
.gitmodules Add new timestamp file to ignore list 2022-04-30 01:04:52 +02:00
cron.sh Add cron.sh 2022-04-30 15:47:15 +02: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 PatchBase: JSON iterator returns first hit 2021-10-24 00:26:57 +02:00
PatchCollector.php PatchCollector: exit with return code on db failure 2022-04-30 15:49:16 +02:00
PatchCollector_test.php Add shebang to PHP scripts 2021-11-02 11:17:33 +01:00
PatchFeeder.php PatchFeeder: use title also for description 2021-12-16 12:39:49 +01:00
PatchMastodon.php Add Mastodon toot exporter 2022-04-30 01:06:06 +02:00
PatchObject.php Tidy up version string 2021-06-16 00:05:24 +02:00
PatchTwitter.php PatchTwitter: rename timestamp file 2022-04-30 01:05:30 +02:00
PatchViewer.php PatchViewer: add Mastodon link 2022-04-30 11:24:58 +02:00
README.md Update README 2022-04-30 11:29:47 +02:00
TwitterKey.php.example Untrack configuration includes 2021-08-03 15:31: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, Mastodon and Twitter use output of PatchViewer.php, PatchFeeder.php, PatchMastodon.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[_json]('https://www.url.com/'))
		return $this->parse...
	return false;
}
  • Currently available parser functions for JSON and RegEx:
    • parse_json(string)
    • parse(string)

Donate