Test generation of gallery from gps-tagged (fixed) photographs from spain-2015

This commit is contained in:
2015-12-23 22:30:21 +00:00
parent 1022d750a5
commit c29894f171
5 changed files with 121 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
<?php
$a = 'D:\Todo\Gallery';
$f = [];
foreach (glob($a . '/*') as $b) {
$b = basename($b);
if (strpos($b, 'spain-2015') === 0) {
foreach (glob($a . '/' . $b . '/*.jpg') as $c) {
$f[basename($c)] = $c;
}
}
}
$d = 'D:\Rik\Photographs\Reis\Spanje 2015';
$e = [];
foreach (glob($d . '/*') as $b) {
if ($b != '.' && $b != '..') {
if (is_dir($b)) {
foreach (glob($b . '/*.jpg') as $c) {
$e[basename($c)] = $c;
}
}
}
}
$h = array_intersect_key($f, $e);
$g = array_keys($h);
foreach ($h as $i => $x) {
copy($e[$i], $x);
}
print_r(array_keys(array_diff_key($f, $h)));