add parsing arguments
This commit is contained in:
parent
c1750aff07
commit
d1645f6744
|
@ -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) {
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -3,7 +3,8 @@ import fs from 'node-fs'
|
|||
|
||||
/**
|
||||
----------------------- parties non réalisées -----------------------
|
||||
// TODO
|
||||
* work in progress
|
||||
// TODO
|
||||
---------------------------------------------------------------------
|
||||
**/
|
||||
|
||||
|
|
Loading…
Reference in New Issue