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

@@ -67,3 +67,8 @@ photos:
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

@@ -71,3 +71,8 @@ photos:
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

@@ -100,3 +100,19 @@ photos:
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,10 +76,12 @@ foreach (glob(sprintf('%s%s*.yml', $sDataDir, DIRECTORY_SEPARATOR)) as $sFile) {
} }
$aFix[$sPhoto] = $aPhotoYaml; $aFix[$sPhoto] = $aPhotoYaml;
} }
if (count($aFix) > 0) {
$sFix = substr(yamlDump(array('' => $aFix)), 1); $sFix = substr(yamlDump(array('' => $aFix)), 1);
file_put_contents($sFile, trim(sprintf("%s%s", file_get_contents($sFile), $sFix))); file_put_contents($sFile, trim(sprintf("%s%s", file_get_contents($sFile), $sFix)));
} }
} }
}
if ($bReferenceOnly) { if ($bReferenceOnly) {
printf(" references:\n - %s\n", implode("\n - ", $aReferenceOnly)); printf(" references:\n - %s\n", implode("\n - ", $aReferenceOnly));
} }