hop
This commit is contained in:
parent
1c1f9ed5fd
commit
e88493c58e
2
index.ts
2
index.ts
|
@ -16,8 +16,6 @@ import * as path from 'node:path'
|
||||||
import rangement_instance from './conf/configs'
|
import rangement_instance from './conf/configs'
|
||||||
import finder from './utils/finder'
|
import finder from './utils/finder'
|
||||||
|
|
||||||
let mini_arguments
|
|
||||||
let expandedFileList = []
|
|
||||||
|
|
||||||
log.setLevel(rangement_instance.log_level)
|
log.setLevel(rangement_instance.log_level)
|
||||||
log.info(' ')
|
log.info(' ')
|
||||||
|
|
|
@ -185,9 +185,7 @@ export default class finder {
|
||||||
|
|
||||||
if (rangement_instance.reportStatistics || this.mini_arguments.stats) {
|
if (rangement_instance.reportStatistics || this.mini_arguments.stats) {
|
||||||
finder.reportStatistics()
|
finder.reportStatistics()
|
||||||
}
|
} }
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static makeFileNameFromProperties(fileProperties: fileDestructuration) {
|
static makeFileNameFromProperties(fileProperties: fileDestructuration) {
|
||||||
|
@ -198,9 +196,13 @@ export default class finder {
|
||||||
tagPlace = ' ' + rangement_instance.tagSectionSeparator + ' ' + fileProperties.tags.join(rangement_instance.tagSeparator)
|
tagPlace = ' ' + rangement_instance.tagSectionSeparator + ' ' + fileProperties.tags.join(rangement_instance.tagSeparator)
|
||||||
}
|
}
|
||||||
log.debug('fileProperties.dateStampExif', fileProperties.dateStampExif)
|
log.debug('fileProperties.dateStampExif', fileProperties.dateStampExif)
|
||||||
|
let spacer = '';
|
||||||
|
if(fileProperties.dateStampExif && fileProperties.freeText && rangement_instance.keepFreeText){
|
||||||
|
spacer = ' '
|
||||||
|
}
|
||||||
let newName = ''
|
let newName = ''
|
||||||
+ fileProperties.dateStampExif
|
+ fileProperties.dateStampExif
|
||||||
// + ' '
|
+ spacer
|
||||||
+ (rangement_instance.keepFreeText ? fileProperties.freeText : '')
|
+ (rangement_instance.keepFreeText ? fileProperties.freeText : '')
|
||||||
+ tagPlace.trim()
|
+ tagPlace.trim()
|
||||||
+ fileProperties.extension.trim()
|
+ fileProperties.extension.trim()
|
||||||
|
@ -462,31 +464,43 @@ export default class finder {
|
||||||
|
|
||||||
let moments = []
|
let moments = []
|
||||||
|
|
||||||
log.debug(' finder - exif data : ', exifData) // Do something with your data!
|
console.log(' finder - exif data : ', exifData)
|
||||||
|
log.info(' finder - exif data : ', exifData)
|
||||||
if (exifData.DateTimeOriginal) {
|
if (exifData.DateTimeOriginal) {
|
||||||
log.debug(' finder - image créée le : DateTimeOriginal : ', exifData.DateTimeOriginal) // Do something with your data!
|
log.debug(' finder - image créée le : DateTimeOriginal : ', exifData.DateTimeOriginal)
|
||||||
moments.push(exifData.DateTimeOriginal)
|
moments.push(exifData.DateTimeOriginal)
|
||||||
}
|
}
|
||||||
|
if (exifData.FileModificationDateTime) {
|
||||||
|
log.debug(' finder - image créée le : File Modification Date/Time : ', exifData.FileModificationDateTime)
|
||||||
|
moments.push(exifData.FileModificationDateTime)
|
||||||
|
}
|
||||||
|
if (exifData.FileModificationDate) {
|
||||||
|
log.debug(' finder - image créée le : File Modification Date/Time : ', exifData.FileModificationDate)
|
||||||
|
moments.push(exifData.FileModificationDate)
|
||||||
|
}
|
||||||
if (exifData.ModificationDateTime) {
|
if (exifData.ModificationDateTime) {
|
||||||
log.debug(' finder - image créée le : ModificationDateTime : ', exifData.ModificationDateTime) // Do something with your data!
|
log.debug(' finder - image créée le : ModificationDateTime : ', exifData.ModificationDateTime)
|
||||||
moments.push(exifData.ModificationDateTime)
|
moments.push(exifData.ModificationDateTime)
|
||||||
}
|
}
|
||||||
if (exifData.ModifyDate) {
|
if (exifData.ModifyDate) {
|
||||||
log.debug(' finder - image créée le : ModifyDate : ', exifData.ModifyDate) // Do something with your data!
|
log.debug(' finder - image créée le : ModifyDate : ', exifData.ModifyDate)
|
||||||
moments.push(exifData.ModifyDate)
|
moments.push(exifData.ModifyDate)
|
||||||
}
|
}
|
||||||
if (exifData.FileAccessDateTime) {
|
if (exifData.FileAccessDateTime) {
|
||||||
moments.push(exifData.FileAccessDateTime)
|
moments.push(exifData.FileAccessDateTime)
|
||||||
}
|
}
|
||||||
|
if (exifData.DateTime) {
|
||||||
|
moments.push(exifData.DateTime)
|
||||||
|
}
|
||||||
if (exifData.FileInodeChangeDateTime) {
|
if (exifData.FileInodeChangeDateTime) {
|
||||||
moments.push(exifData.FileInodeChangeDateTime)
|
moments.push(exifData.FileInodeChangeDateTime)
|
||||||
}
|
}
|
||||||
if (exifData.FileModificationDateTime) {
|
if (exifData.FileModificationDateTime) {
|
||||||
log.debug(' finder - image créée le : FileModificationDateTime : ', exifData.FileModificationDateTime) // Do something with your data!
|
log.debug(' finder - image créée le : FileModificationDateTime : ', exifData.FileModificationDateTime)
|
||||||
moments.push(exifData.FileModificationDateTime)
|
moments.push(exifData.FileModificationDateTime)
|
||||||
}
|
}
|
||||||
if (exifData.CreateDate) {
|
if (exifData.CreateDate) {
|
||||||
log.debug(' finder - image créée le : CreateDate : ', exifData.CreateDate) // Do something with your data!
|
log.debug(' finder - image créée le : CreateDate : ', exifData.CreateDate)
|
||||||
moments.push(exifData.CreateDate)
|
moments.push(exifData.CreateDate)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue