addRemote('github-user', null, 'Mikescher', 'Mikescher'); //$v->addRemote('github-user', null, 'Mikescher', 'Sam-Development'); //$v->addRemote('github-repository', null, 'Mikescher', 'Anastron/ColorRunner'); $v->addRemote('gitea-repository', null, 'Mikescher', 'Mikescher/server-scripts'); $v->addRemote('gitea-repository', null, 'Mikescher', 'Mikescher/apache-sites'); $v->addRemote('gitea-repository', null, 'Mikescher', 'Mikescher/MVU_API'); $v->setColorScheme($CONFIG['egh_theme']); $v->ConnectionGithub->setAPIToken($CONFIG['egh_token']); $v->ConnectionGitea->setURL('https://gogs.mikescher.com'); return $v; } public static function getPathRenderedData() { return __DIR__ . '/../dynamic/egh.html'; } public static function includeRender() { if (file_exists(__DIR__ . '/../dynamic/egh.html')) include __DIR__ . '/../dynamic/egh.html'; } public static function checkConsistency() { $p = self::getPathRenderedData(); if (!file_exists($p)) return ['result'=>'err', 'message' => 'Rendered data not found']; if (filemtime($p) < time()-(3*7*24*60*60)) return ['result'=>'warn', 'message' => 'Rendered data is older than 3 weeks']; return ['result'=>'ok', 'message' => '']; } }