6Q2LBYYTS5Z67TKMOMJRBRST5UIOW3CGRSDGCDQBO3F3DNNPVGIQC
XEYT3JUSCIZ6QFZJCZTT7UXA5ROA4LGQGOGCBFLRPG5MY4MVPC6AC
ZRQFW3UNHIZLLXHXHK4EHVK74IN7RRGASB4WKYJAS2FJA5EHA2XAC
MU3GBWGKLME6ANHMJ4NL7J23UJQTNOYL57ATZ2EPKONKAJMDWVHAC
LJWOKWMFBXKZJ3TSNWBMD6SCJW7EEOTXQ3XBZIBUL55CEWYV2F7QC
SXSLASK6UE4R24JBPAHVXH7IT4QVFU76T2ASPDIPI7HYKPF6M46QC
QX7XVNQYOTBDULUCLFRGSATHL7KWBSEV6QWNFY353S7ZIR6UGJWQC
UW4WSPWD7TVQWURMTLRNW6LKVFLUVQT7NBUP5A4WMAIVHSLUPH7AC
MCPXLE6LIQRLQA2OBQSVIH4O3HAEZZWKPQMEDERPBHN6IVOAVXVAC
TOLGMXUXRC74FQHKSAFLRNEG44GPLBMORKRDPU35EB2F424AN5QAC
PJQXKAUOGPICDWXZAZN2KANNYXTUM7YTQ7G35NDZIEZQBTZYC3ZQC
6WPF42RDWKN2YKPNQNRFMKIO4TJBQCUKRPLVY4V6ULN6KXPBQOUQC
L3PX32UXE2SC4JK3VXLL654DHBZGVXSBLZRQIGUIB4RIXEVHU5IQC
A4YDN3ZM5CNM43BMK4BAEB6I2GVQQZUKBCZYMYCRVZSS6EXRY3VAC
R4THF7FOB3LE7JE7DMA5UL6PJIYZMNUWH6TLUKDHNB2X47V4MAEQC
if (value.trim() !== "") {
// check geo data
if (b && key.startsWith('GPS')) {
// TODO ???
// if (key == "GPSLatitude")
// value = Number.parseFloat(Math.abs(value).toFixed(5));
// if (key == "GPSLongitude")
// value = Number.parseFloat(Math.abs(value).toFixed(5));
// console.log(key, value);
_geoDat[key.toLowerCase()] = value;
}
s = decamelize(key, " ");
_this.addPhotodata(s, value);
// check geo data
if (b && key.startsWith('GPS')) {
// TODO ???
// if (key == "GPSLatitude")
// value = Number.parseFloat(Math.abs(value).toFixed(5));
// if (key == "GPSLongitude")
// value = Number.parseFloat(Math.abs(value).toFixed(5));
// console.log(key, value);
_geoDat[key.toLowerCase()] = value;
<div id="media-id{{this.id}}" {{{photoMeta meta}}} {{~#if isVideo~}} data-html="#media{{id}}" {{~else~}} data-src="{{relative urls.large}}" {{~/if~}} data-exthumbimage="{{relative urls.thumbnail}}" data-filename="{{filename}}">
<div id="media-id{{this.id}}" {{{photoMeta meta @root.gallery.settings}}} {{~#if isVideo~}} data-html="#media{{id}}" {{~else~}} data-src="{{relative urls.large}}" {{~/if~}} data-exthumbimage="{{relative urls.thumbnail}}" data-filename="{{filename}}">
}
function copyMetaFiles(meta, config) {
const filename = meta.all.SourceFile.replace(".", "-") + ".json";
const sourceFile = config.folders.input + '/' + filename;
const targetFile = config.folders.output + '/media/large/' + filename;
try {
fs.copySync(sourceFile, targetFile)
return 'media/large/' + filename;
} catch (err) {
return null;
}
}
function writeMetadata(data) {
const filename = data.filename.replace('.', '_') + '.json';
var content = JSON.stringify(data);
try {
console.log("writedata:", filename)
fs.mkdirsSync(path.dirname(filename))
fs.writeFileSync(filename, content);
} catch (e) {
console.log("Cannot write file ", filename, e);
}