Recover remaining photos

This commit is contained in:
2016-02-08 21:09:56 +00:00
parent 665ca58988
commit 677ade1682
6 changed files with 42 additions and 8 deletions

View File

@@ -78,4 +78,9 @@ photos:
date: 2014-12-21 10:43:49
file: IMG_20141221_104348
latitude: 46.207992527778
longitude: 6.1467237222222 { } { }
longitude: 6.1467237222222
44bf55d:
date: 2014-12-21 10:43:49
file: IMG_20141221_104348
latitude: 46.207992527778
longitude: 6.1467237222222

View File

@@ -66,4 +66,9 @@ photos:
date: 2014-12-21 11:59:10
file: IMG_20141221_115909
latitude: 46.201538083333
longitude: 6.1467084722222 { } { }
longitude: 6.1467084722222 { } { }
de97857:
date: 2014-12-21 11:59:10
file: IMG_20141221_115909
latitude: 46.201538083333
longitude: 6.1467084722222

View File

@@ -70,4 +70,9 @@ photos:
date: 2014-12-21 12:02:28
file: IMG_20141221_120228
latitude: 46.201538083333
longitude: 6.1467084722222 { } { }
longitude: 6.1467084722222 { } { }
a1ac979:
date: 2014-12-21 12:02:28
file: IMG_20141221_120228
latitude: 46.201538083333
longitude: 6.1467084722222

View File

@@ -99,4 +99,20 @@ photos:
model: One S
make: HTC
latitude: 56.330379472222
longitude: -2.8101570555556 { } { }
longitude: -2.8101570555556 { } { }
124902b:
aperture: f/2.9
date: 1970-01-01 00:59:59
exif:
make: OLYMPUS OPTICAL CO.,LTD
exposure: 10/300
file: Storage
model: C300Z,D550Z
2e06105:
aperture: f/2.9
date: 1970-01-01 00:59:59
exif:
make: OLYMPUS OPTICAL CO.,LTD
exposure: 10/400
file: Room
model: C300Z,D550Z

View File

@@ -53,7 +53,7 @@ layout: default
{% endfor %}
</div>
</section>
{% if false != page.comments %}
{% if page.comments != false %}
{% include disqus.html %}
{% endif %}
</section>

View File

@@ -67,7 +67,8 @@ foreach (glob(sprintf('%s%s*.yml', $sDataDir, DIRECTORY_SEPARATOR)) as $sFile) {
printf(" <%s> no date!\n", $sPhoto);
continue;
} else {
$aPhotoYaml['date'] = date('Y-m-d H:i:s', $aPhotoYaml['date']);
$sDate = @date('Y-m-d H:i:s', $aPhotoYaml['date']);
$aPhotoYaml['date'] = $sDate ? $sDate : '!';
}
if (isset($aPhotoYaml['location'])) {
$aPhotoYaml = array_merge($aPhotoYaml, $aPhotoYaml['location']);
@@ -75,8 +76,10 @@ foreach (glob(sprintf('%s%s*.yml', $sDataDir, DIRECTORY_SEPARATOR)) as $sFile) {
}
$aFix[$sPhoto] = $aPhotoYaml;
}
$sFix = substr(yamlDump(array('' => $aFix)), 1);
file_put_contents($sFile, trim(sprintf("%s%s", file_get_contents($sFile), $sFix)));
if (count($aFix) > 0) {
$sFix = substr(yamlDump(array('' => $aFix)), 1);
file_put_contents($sFile, trim(sprintf("%s%s", file_get_contents($sFile), $sFix)));
}
}
}
if ($bReferenceOnly) {