40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
|
import mainTemplates from './mainTemplates.mjs'
|
||
|
import constants from './folders.js'
|
||
|
|
||
|
/**
|
||
|
* configuration générale à importer dans les utilitaires
|
||
|
*/
|
||
|
class config_rangement {
|
||
|
log_level = 'info' // 'debug' | 'warn' |'info'
|
||
|
version = '1.0.0'
|
||
|
iso_date_format = 'yyyy-MM-DDTHH.mm.ss' // target format for dates in file names
|
||
|
tagSeparator = ' '
|
||
|
tagSectionSeparator = '--'
|
||
|
keepFreeText = true
|
||
|
keepTags = true
|
||
|
replaceUnderscoreWithSpaces = true
|
||
|
renameFolders = false
|
||
|
enableTestsLocally = false
|
||
|
reportStatistics = false
|
||
|
constants = constants
|
||
|
base_archive_folder = constants.base_archive_folder
|
||
|
templates = mainTemplates;
|
||
|
|
||
|
/**
|
||
|
* override config if we want
|
||
|
* @param overridingConfig
|
||
|
*/
|
||
|
constructor (overridingConfig) {
|
||
|
console.log('overridingConfig', overridingConfig)
|
||
|
let keys = Object.keys(overridingConfig)
|
||
|
let self = this;
|
||
|
keys.forEach(elem=>{
|
||
|
if(self[key]){
|
||
|
self[key] = elem
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
|
||
|
const rangement_instance = new config_rangement({});
|
||
|
export default rangement_instance
|