|
|
|
@ -111,3 +111,24 @@ function getPhotoSetUrlsByPhotoSetId(int $photoSetId) : \Generator
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Map years to photo gallery ids
|
|
|
|
|
$photoGalleryIds = [
|
|
|
|
|
2016 => 3742586428944470221,
|
|
|
|
|
2017 => 3742586429170821662,
|
|
|
|
|
2018 => 3742586428889977272,
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// Check arguments
|
|
|
|
|
if ($argv[1] === '--year' && isset($photoGalleryIds[$argv[2]])) {
|
|
|
|
|
// Loop through all galleries
|
|
|
|
|
foreach (getPhotoSetUrlsByPhotoSetId($photoGalleryIds[$argv[2]]) as $photoGallery) {
|
|
|
|
|
echo $photoGallery->group.' - '.$photoGallery->date.' - '.$photoGallery->url.PHP_EOL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Print help
|
|
|
|
|
echo 'Usage: php '.$argv[0].' --year [year]'.PHP_EOL;
|
|
|
|
|
echo 'Valid years: '.implode(', ', array_keys($photoGalleryIds)).PHP_EOL;
|
|
|
|
|