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 date: 2014-12-21 10:43:49
file: IMG_20141221_104348 file: IMG_20141221_104348
latitude: 46.207992527778 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 date: 2014-12-21 11:59:10
file: IMG_20141221_115909 file: IMG_20141221_115909
latitude: 46.201538083333 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 date: 2014-12-21 12:02:28
file: IMG_20141221_120228 file: IMG_20141221_120228
latitude: 46.201538083333 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 model: One S
make: HTC make: HTC
latitude: 56.330379472222 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 %} {% endfor %}
</div> </div>
</section> </section>
{% if false != page.comments %} {% if page.comments != false %}
{% include disqus.html %} {% include disqus.html %}
{% endif %} {% endif %}
</section> </section>

View File

@@ -67,7 +67,8 @@ foreach (glob(sprintf('%s%s*.yml', $sDataDir, DIRECTORY_SEPARATOR)) as $sFile) {
printf(" <%s> no date!\n", $sPhoto); printf(" <%s> no date!\n", $sPhoto);
continue; continue;
} else { } 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'])) { if (isset($aPhotoYaml['location'])) {
$aPhotoYaml = array_merge($aPhotoYaml, $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; $aFix[$sPhoto] = $aPhotoYaml;
} }
$sFix = substr(yamlDump(array('' => $aFix)), 1); if (count($aFix) > 0) {
file_put_contents($sFile, trim(sprintf("%s%s", file_get_contents($sFile), $sFix))); $sFix = substr(yamlDump(array('' => $aFix)), 1);
file_put_contents($sFile, trim(sprintf("%s%s", file_get_contents($sFile), $sFix)));
}
} }
} }
if ($bReferenceOnly) { if ($bReferenceOnly) {