From 36ebdf2714ed3361e948a5ed983861e67b7ee1a7 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Sat, 1 Jul 2023 13:14:01 +0200 Subject: [PATCH] enrich config file --- configs.mjs | 42 ++++++++++++++++++++++++++++++++++++++++-- finder.mjs | 6 ------ 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/configs.mjs b/configs.mjs index 0ec87b4..8fce51f 100644 --- a/configs.mjs +++ b/configs.mjs @@ -1,6 +1,44 @@ +export const config_rangement = { + log_level :'debug', // [ 'debug', 'none'] + version : '1.0.0', + tagSeparator : '1.0.0', + tagSectionSeparator : '1.0.0', + enableTestsLocally: false, + reportStatistics: false, + base_archive_folder: '/home/poule/encrypted/stockage-syncable/', + photos_sub_folder: 'photos', + photos_sorting_base_sub_folder: 'photos/a_dispatcher', + bazar_sub_folder: 'BAZAR', + templates : { + // example FyB8cZnWIAc21rw.jpg + 'downloaded_pic': { + 'pattern' : /^\-\w{15}\.jpg/, + 'auto_sort_folder' : '' + }, + // example -4900281569878475578_1109.jpg + 'telegram_pic': { + 'pattern' : /^\-\d{19}_\d{4}/, + 'auto_sort_folder' : '' + }, + // example IMG_20230617_092120_3.jpg + 'open_camera_default': { + 'pattern' : /^IMG_\d{8}/i, + 'auto_sort_folder' : '' + }, + // example IMG_OC_20230617_092120_3.jpg + 'open_camera_custom': { + 'pattern' : /^IMG_OC_\d{8}/i, + 'auto_sort_folder' : '' + }, + // example "Screenshot 2023-06-15 at 15-26-04 Instance Panoramax OSM-FR.png" + 'screenshot': { + 'pattern' : /^Screenshot/i, + 'auto_sort_folder': 'photos/captures écran screenshots' + } , + } +} export const tagSeparator = ' ' export const tagSectionSeparator = '--' export const enableTestsLocally = false -export const reportStatistics = false -export const version = '1.0.0' \ No newline at end of file +export const reportStatistics = false \ No newline at end of file diff --git a/finder.mjs b/finder.mjs index 790b239..68fe9c6 100644 --- a/finder.mjs +++ b/finder.mjs @@ -14,12 +14,6 @@ export default class finder { static statistics = { filesModified: 0, } - static patternsFiles = { - 'downloaded_pic': /^\-\w{15}\.jpg/, // FyB8cZnWIAc21rw.jpg - 'telegram_pic': /^\-\d{19}_\d{4}/, // -4900281569878475578_1109.jpg - 'open_camera': /^IMG_OC_\d{8}/i, // IMG_OC_20230617_092120_3.jpg - 'screenshot': /^Screenshot/i, // Screenshot 2023-06-15 at 15-26-04 Instance Panoramax OSM-FR.png - } static reportStatistics () { console.log('statistics',