add parsing arguments

This commit is contained in:
Tykayn 2023-06-29 18:59:12 +02:00 committed by tykayn
parent c1750aff07
commit d1645f6744
3 changed files with 13 additions and 14 deletions

View File

@ -21,6 +21,7 @@ import finder from './finder.mjs'
let mini_arguments;
console.log(' ')
function parseArguments () {
mini_arguments = minimist(process.argv.slice(2))
// console.log('arguments', mini_arguments)
@ -28,8 +29,6 @@ function parseArguments () {
parseArguments()
const pathFolder = '/home/poule/encrypted/stockage-syncable/photos/a_dispatcher/tout'
const sortingFolder = '/home/poule/encrypted/stockage-syncable/photos/a_dispatcher'
function renameFile (originalFileName, fileMixedNewName) {
fs.rename(originalFileName, fileMixedNewName, function (err) {
@ -37,12 +36,6 @@ function renameFile (originalFileName, fileMixedNewName) {
})
}
const fileDefinition = {
dateStamp: '',
freeText: '',
tags: [],
extension: '',
}
function makeFileNameFromProperties (fileProperties) {
return finder.cleanSpaces(fileProperties.dateStamp + ' ' + fileProperties.freeText + ' ' + tagSectionSeparator + ' ' + fileProperties.tags.join(tagSeparator) + fileProperties.extension)
@ -58,11 +51,6 @@ function prependFileName (fileProperties, newText) {
return fileProperties
}
/**
* work in progress
*
*/
// run tests
if (enableTestsLocally) {

View File

@ -1,6 +1,16 @@
import finder from './finder.mjs'
const pathFolder = '/home/poule/encrypted/stockage-syncable/photos/a_dispatcher/tout'
const sortingFolder = '/home/poule/encrypted/stockage-syncable/photos/a_dispatcher'
const fileDefinition = {
dateStamp: '',
freeText: '',
tags: [],
extension: '',
}
export function TestScreenShotIsFoundAndRenamed() {
let screenShotMockFileName = 'Screenshot 2023-06-15 at 15-28-21 Instance Panoramax OSM-FR.png'

View File

@ -3,6 +3,7 @@ import fs from 'node-fs'
/**
----------------------- parties non réalisées -----------------------
* work in progress
// TODO
---------------------------------------------------------------------
**/