2023-07-19 12:32:13 +02:00
|
|
|
/**---------------------
|
|
|
|
* @name tykayn Rangement
|
|
|
|
* @description Rangement sorts and rename files depending on their exif data
|
|
|
|
* @contact contact@cipherbliss.com
|
|
|
|
--------------------- */
|
|
|
|
/** ---------------------
|
|
|
|
libs
|
|
|
|
--------------------- */
|
|
|
|
import log from 'loglevel'
|
|
|
|
/** ---------------------
|
|
|
|
custom utilities and configuration
|
|
|
|
--------------------- */
|
|
|
|
import rangement_instance from './conf/configs'
|
|
|
|
import finder from './utils/finder'
|
2023-12-24 00:12:44 +01:00
|
|
|
import minimist from "minimist";
|
2023-07-19 12:32:13 +02:00
|
|
|
|
2023-12-24 00:12:44 +01:00
|
|
|
const mini_arguments = minimist(process.argv.slice(2))
|
2023-07-19 12:32:13 +02:00
|
|
|
|
2023-12-24 00:12:44 +01:00
|
|
|
if (mini_arguments['help'] || mini_arguments['h']) {
|
2023-07-19 12:32:13 +02:00
|
|
|
|
2023-12-24 00:12:44 +01:00
|
|
|
console.log('Rangement - aide:', `
|
|
|
|
Permet de renommer en masse des photos avec des ajouts de filetags automatiques.
|
|
|
|
Documentation: https://www.cipherbliss.com/organiser-ses-fichiers-avec-des-tags-avec-filetags
|
2023-07-19 12:32:13 +02:00
|
|
|
|
2023-12-24 00:12:44 +01:00
|
|
|
syntaxe:
|
|
|
|
rangement [fichiers] [options].
|
|
|
|
options:
|
|
|
|
-h, --help : affiche l'aide.
|
|
|
|
-lowestYear=1970 : ne garde les dates exif pour le renommage que si elles sont supérieures à ce numéro d'année
|
|
|
|
`)
|
2023-07-19 12:32:13 +02:00
|
|
|
|
2023-12-24 00:12:44 +01:00
|
|
|
} else {
|
2023-07-19 12:32:13 +02:00
|
|
|
|
2023-12-24 00:12:44 +01:00
|
|
|
|
|
|
|
log.setLevel(rangement_instance.log_level)
|
|
|
|
log.info(' ')
|
|
|
|
|
|
|
|
|
|
|
|
finder.parseArguments()
|
|
|
|
finder.guessFileNameOnAllFilesFromArguments()
|
|
|
|
|
|
|
|
}
|