Add header images from upcoming 2016-wales gallery
This commit is contained in:
@@ -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
12
_scripts/photo-ids.php
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user