rangement/conf/mainTemplates.ts

66 lines
1.8 KiB
TypeScript
Raw Permalink Normal View History

2023-07-19 12:32:13 +02:00
import constants from './folders'
2023-09-10 11:30:50 +02:00
interface fileDetectionTemplate {
2023-07-19 12:32:13 +02:00
'example': string,
'pattern': any,
2023-09-10 11:30:50 +02:00
'auto_tag'?: string,
'auto_sort_folder'?: string
2023-07-19 12:32:13 +02:00
}
2023-09-10 11:30:50 +02:00
2023-07-19 12:32:13 +02:00
interface AssemblyOfFileDetection {
downloaded_pic: fileDetectionTemplate,
telegram_pic: fileDetectionTemplate,
open_camera_default: fileDetectionTemplate,
open_camera_custom: fileDetectionTemplate,
screenshot: fileDetectionTemplate,
gopro_front: fileDetectionTemplate,
2023-09-10 11:30:50 +02:00
gopro_back: fileDetectionTemplate
2023-07-19 12:32:13 +02:00
}
2023-07-19 10:04:08 +02:00
2023-09-10 11:30:50 +02:00
const setOfFileDetections: AssemblyOfFileDetection = {
'downloaded_pic': {
2023-07-19 10:04:08 +02:00
'example': 'FyB8cZnWIAc21rw.jpg',
'pattern': /^\-\w{15}\.jpg/,
2023-09-10 11:30:50 +02:00
'auto_tag': '',
2023-07-19 10:04:08 +02:00
'auto_sort_folder': constants.bazar_sub_folder
},
'telegram_pic': {
'example': '-4900281569878475578_1109.jpg',
'pattern': /^\-\d{19}_\d{4}/,
2023-09-10 11:30:50 +02:00
'auto_tag': '',
2023-07-19 10:04:08 +02:00
'auto_sort_folder': constants.bazar_sub_folder
},
'open_camera_default': {
'example': 'IMG_20230617_092120_3.jpg',
'pattern': /^IMG_\d{8}/i,
2023-09-10 11:30:50 +02:00
'auto_tag': '',
2023-07-19 10:04:08 +02:00
'auto_sort_folder': constants.panoramax_captures_folder
},
'open_camera_custom': {
'example': 'IMG_OC_20230617_092120_3.jpg',
'pattern': /^IMG_OC_\d{8}/i,
2023-09-10 11:30:50 +02:00
'auto_tag': '',
2023-07-19 10:04:08 +02:00
'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,
2023-09-10 11:30:50 +02:00
'auto_tag': 'screenshots',
2023-07-19 10:04:08 +02:00
'auto_sort_folder': 'photos/captures écran screenshots'
},
'gopro_front': {
'example': 'GF010041.jpg',
'pattern': /^GP?F\d+\.jpg/i,
2023-09-10 11:30:50 +02:00
'auto_tag': 'gopro-front gopro',
2023-07-19 10:04:08 +02:00
'auto_sort_folder': constants.gopro_capture_folder
},
'gopro_back': {
'example': 'GB010041.jpg',
'pattern': /^GP?B\d+\.jpg/i,
2023-09-10 11:30:50 +02:00
'auto_tag': 'gopro-back gopro',
2023-07-19 10:04:08 +02:00
'auto_sort_folder': constants.gopro_capture_folder
},
2023-07-19 12:32:13 +02:00
}
export default setOfFileDetections;