split tags
This commit is contained in:
parent
98487704f3
commit
2a2ece88a7
|
@ -38,7 +38,7 @@ function getExifCreationDate (filepath) {
|
|||
|
||||
let moments = []
|
||||
|
||||
console.log('exif data : ', exifData) // Do something with your data!
|
||||
// console.log('exif data : ', exifData) // Do something with your data!
|
||||
if (exifData.DateTimeOriginal) {
|
||||
|
||||
// console.log('image créée le : DateTimeOriginal : ', exifData.DateTimeOriginal) // Do something with your data!
|
||||
|
@ -75,6 +75,19 @@ function getExifCreationDate (filepath) {
|
|||
|
||||
}
|
||||
|
||||
const tagSeparator = ' '
|
||||
const tagSectionSeparator = '--'
|
||||
function findTagSectionInString(inputString){
|
||||
let listOfTags = []
|
||||
if(inputString.includes(tagSectionSeparator)){
|
||||
let boom = inputString.splice(tagSectionSeparator)
|
||||
if(boom.length){
|
||||
listOfTags = [...boom.splice(tagSeparator)]
|
||||
}
|
||||
}
|
||||
return listOfTags;
|
||||
}
|
||||
|
||||
/**
|
||||
* écrit un nouveau nom de fichier formatté
|
||||
* @param convertedToName
|
||||
|
@ -123,4 +136,5 @@ const patternsFiles = {
|
|||
}
|
||||
|
||||
|
||||
getExifCreationDate('/home/poule/encrypted/stockage-syncable/photos/a_dispatcher/2023-06-23T18.36.47.jpg')
|
||||
// getExifCreationDate('/home/poule/encrypted/stockage-syncable/photos/a_dispatcher/2023-06-23T18.36.47 -- machin bidule.jpg')
|
||||
findTagSectionInString('2023-06-23T18.36.47 -- machin bidule.jpg')
|
Loading…
Reference in New Issue