rangement/conf/mainTemplates.ts

66 lines
1.8 KiB
TypeScript

import constants from './folders'
interface fileDetectionTemplate {
'example': string,
'pattern': any,
'auto_tag'?: string,
'auto_sort_folder'?: string
}
interface AssemblyOfFileDetection {
downloaded_pic: fileDetectionTemplate,
telegram_pic: fileDetectionTemplate,
open_camera_default: fileDetectionTemplate,
open_camera_custom: fileDetectionTemplate,
screenshot: fileDetectionTemplate,
gopro_front: fileDetectionTemplate,
gopro_back: fileDetectionTemplate
}
const setOfFileDetections: AssemblyOfFileDetection = {
'downloaded_pic': {
'example': 'FyB8cZnWIAc21rw.jpg',
'pattern': /^\-\w{15}\.jpg/,
'auto_tag': '',
'auto_sort_folder': constants.bazar_sub_folder
},
'telegram_pic': {
'example': '-4900281569878475578_1109.jpg',
'pattern': /^\-\d{19}_\d{4}/,
'auto_tag': '',
'auto_sort_folder': constants.bazar_sub_folder
},
'open_camera_default': {
'example': 'IMG_20230617_092120_3.jpg',
'pattern': /^IMG_\d{8}/i,
'auto_tag': '',
'auto_sort_folder': constants.panoramax_captures_folder
},
'open_camera_custom': {
'example': 'IMG_OC_20230617_092120_3.jpg',
'pattern': /^IMG_OC_\d{8}/i,
'auto_tag': '',
'auto_sort_folder': constants.panoramax_captures_folder
},
'screenshot': {
'example': 'Screenshot 2023-06-15 at 15-26-04 Instance Panoramax OSM-FR.png',
'pattern': /^Screenshot/i,
'auto_tag': 'screenshots',
'auto_sort_folder': 'photos/captures écran screenshots'
},
'gopro_front': {
'example': 'GF010041.jpg',
'pattern': /^GP?F\d+\.jpg/i,
'auto_tag': 'gopro-front gopro',
'auto_sort_folder': constants.gopro_capture_folder
},
'gopro_back': {
'example': 'GB010041.jpg',
'pattern': /^GP?B\d+\.jpg/i,
'auto_tag': 'gopro-back gopro',
'auto_sort_folder': constants.gopro_capture_folder
},
}
export default setOfFileDetections;