up deps folder listing node

This commit is contained in:
Tykayn 2023-07-29 16:52:53 +02:00 committed by tykayn
parent 975850a7e1
commit 9442153b32
8 changed files with 87 additions and 27 deletions

View File

@ -1,8 +1,8 @@
// lister les dossiers dans le dossier stockage syncable pour en tirer une liste de dates d'évènements
import fs from 'fs';
import fs from 'fs'
let suffix = ''
const folder_photo = `/home/poule/encrypted/stockage-syncable/photos${suffix}`;
const folder_photo = `/home/poule/encrypted/stockage-syncable/photos${suffix}`
/**
* obtenir une liste des dossiers uniquement dans le dossier courant
@ -11,8 +11,8 @@ const folder_photo = `/home/poule/encrypted/stockage-syncable/photos${suffix}`;
*/
function getDirectories (path) {
return fs.readdirSync(path).filter(function (file) {
return fs.statSync(path + '/' + file).isDirectory();
});
return fs.statSync(path + '/' + file).isDirectory()
})
}
/**
@ -37,6 +37,14 @@ function recursiveListing(folders){
for (let d3 of listing2) {
let subdir3 = subdir2 + '/' + d3
console.log(subdir3)
let listing3 = getDirectories(subdir2)
if (listing3.length) {
for (let d4 of listing3) {
let subdir4 = subdir3 + '/' + d4
console.log(subdir4)
}
}
}
}

14
package-lock.json generated
View File

@ -7,6 +7,7 @@
"name": "scripts-tykayn",
"dependencies": {
"exifr": "^7.1.3",
"minimist": "^1.2.8",
"moment": "^2.29.4",
"node-fs": "^0.1.7"
},
@ -4444,6 +4445,14 @@
"node": "*"
}
},
"node_modules/minimist": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/moment": {
"version": "2.29.4",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
@ -8767,6 +8776,11 @@
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="
},
"moment": {
"version": "2.29.4",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",

View File

@ -2,6 +2,7 @@
"name": "scripts-tykayn",
"dependencies": {
"exifr": "^7.1.3",
"minimist": "^1.2.8",
"moment": "^2.29.4",
"node-fs": "^0.1.7"
},
@ -16,6 +17,7 @@
"ts-node": "^10.9.1"
},
"scripts": {
"devine": "node rangement/index.mjs",
"test": "jest"
}
}

8
rangement/.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

6
rangement/.idea/misc.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>

8
rangement/.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/rangement.iml" filepath="$PROJECT_DIR$/.idea/rangement.iml" />
</modules>
</component>
</project>

8
rangement/.idea/rangement.iml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
rangement/.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>