Add descriptions

This commit is contained in:
2020-10-03 18:00:48 +03:00
parent f1045fa2f0
commit 82d3366b80
5 changed files with 33 additions and 3 deletions

View File

@@ -59,7 +59,17 @@ function processAlbum(folderName: string) {
} else {
console.error(red(`Error: File ${albumPath}/album.yml does not contains "${item}" key!`));
}
})
});
if (parsedData['photoDescription']) {
Object.keys(parsedData['photoDescription']).forEach(item => {
if (!photos.includes(item)) {
console.warn(yellow(`Warning: Description for ${albumPath}/photos/${item} , but it doesn't exist!`));
}
});
config['photoDescription'] = parsedData['photoDescription'];
}
}
} else {
console.error(red(`Error: File ${albumPath}/album.yml does not exists!`));