Last active
January 7, 2019 09:30
-
-
Save RobinDev/e8d43e4befbb14baadd44194eb70d179 to your computer and use it in GitHub Desktop.
Dev.piedweb.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
composer require piedweb/github | |
php render.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'vendor/autoload.php'; | |
use \PiedWeb\Github\ExtractRepoMetaData; | |
$args = new Symfony\Component\Console\Input\ArgvInput($argv); | |
$urls = [ | |
'Tyrol' => 'https://github.com/PiedWeb/piedweb-tyrol-free-bootstrap-4-theme', | |
'https://github.com/PiedWeb/CMS', | |
'https://github.com/PiedWeb/RenderHtmlAttribute', | |
'https://github.com/PiedWeb/FileCache', | |
'https://github.com/PiedWeb/Github', | |
]; | |
$packages = []; | |
$i = 2; | |
foreach ($urls as $name => $url) { | |
$github = new ExtractRepoMetaData($url, $name); | |
$key = (intval($github->getStars()) + $i/1000)*1000; | |
$packages[$key] = $github; | |
$i++; | |
} | |
krsort($packages); | |
foreach ($packages as $github) { | |
$name = $github->getName(); | |
$description = $github->getDescription(); | |
$stars = $github->getStars(); | |
echo $name.' | '.$stars.' ☆'.chr(10).$description; | |
echo chr(10).'---------------------'.chr(10); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment