add dev script
This commit is contained in:
parent
51731aad08
commit
217d9de761
12
development.sh
Normal file
12
development.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#/bin/bash
|
||||
#
|
||||
# -------------------------
|
||||
# this should work for dev purposes
|
||||
# alias should be set in you bash aliases files:
|
||||
#
|
||||
# alias range="node /home/poule/encrypted/stockage-syncable/www/development/html/rangement/index.mjs --dry-run=true "
|
||||
# -------------------------
|
||||
range /home/poule/encrypted/stockage-syncable/www/development/html/rangement/testFiles/misnamed_file/2000-01-01T01.01.01\ FyB8cZnWIAc21rw\ --\ meme.jpg
|
||||
|
||||
# you should see that the debug logs find a misnamed file name
|
||||
# and want to rename it to the 2023 date of modification, not the 2000 year date.
|
@ -54,6 +54,13 @@ describe('modification in file name', () => {
|
||||
)
|
||||
.toBe('mon texte ajouté à la fin du texte libre')
|
||||
})
|
||||
test('should prepend to file name in the right place', () => {
|
||||
let modifiedProperties = finder.prependFileName(properties, 'ajouté au début du texte libre ')
|
||||
expect(
|
||||
modifiedProperties.freeText
|
||||
)
|
||||
.toBe('ajouté au début du texte libre mon texte')
|
||||
})
|
||||
test('should replace text in file name', () => {
|
||||
let searchString = 'vacances', replaceString = 'machin'
|
||||
let replacedString = finder.searchAndReplaceInFileName(searchString, replaceString, fileNameOriginal)
|
||||
|
@ -220,6 +220,7 @@ export default class finder {
|
||||
* @returns {string}
|
||||
*/
|
||||
static findEarliestDateInExifData (exifData) {
|
||||
log.debug(' finder - findEarliestDateInExifData')
|
||||
if (exifData) {
|
||||
|
||||
let moments = []
|
||||
@ -263,7 +264,7 @@ export default class finder {
|
||||
|
||||
return minDate.format(rangement_instance.iso_date_format)
|
||||
} else {
|
||||
log.debug(' finder - pas de exif data')
|
||||
log.debug(' finder - /!\\ pas de exif data')
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user