Add header images from upcoming 2016-wales gallery

This commit is contained in:
2016-10-03 10:12:47 +01:00
parent c9dd5754a8
commit 7e375b5f9a
2 changed files with 13 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ github: https://github.com/boukefalos
disqus: boukefalos
analytics: UA-46375339-1
maps: AIzaSyCyIwGR-F48dFjAbwNr9JdOsfUYaUQxz1s
headers: [187b6ae, 54773b7, eae28bd, e35dddd]
headers: [187b6ae, 54773b7, eae28bd, e35dddd, d1bdfae, 59c73ce, 7de3faf, f1ae721]
# pagination
paginate: 15

12
_scripts/photo-ids.php Normal file
View File

@@ -0,0 +1,12 @@
<?php
if (!isset($argv[1]) || !is_dir($argv[1])) {
die('No directory given');
}
$sPath = realpath($argv[1]);
foreach (glob($sPath . '/*.jpg') as $sFile) {
$sId = substr(sha1_file($sFile), 0, 7);
$sBasename = basename($sFile, '.jpg');
printf("%s => %s\n", $sBasename, $sId);
$sNewFile = str_replace($sBasename, $sId, $sFile);
rename($sFile, $sNewFile);
}