diff --git a/kartaview_exif_mapper/.gitignore b/kartaview_exif_mapper/.gitignore new file mode 100644 index 00000000..43ded0db --- /dev/null +++ b/kartaview_exif_mapper/.gitignore @@ -0,0 +1 @@ +output_gpx/*.gpx \ No newline at end of file diff --git a/kartaview_exif_mapper/3596249_trace.gpx b/kartaview_exif_mapper/3596249_trace.gpx deleted file mode 100644 index d37e33f2..00000000 --- a/kartaview_exif_mapper/3596249_trace.gpx +++ /dev/null @@ -1,50 +0,0 @@ - - - - trace_gpx_de_demo - - somebody - - - 2023 - https://creativecommons.org/licenses/by-sa/2.5 - - nada - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/kartaview_exif_mapper/3596977_trace.gpx b/kartaview_exif_mapper/3596977_trace.gpx deleted file mode 100644 index fc2a78ef..00000000 --- a/kartaview_exif_mapper/3596977_trace.gpx +++ /dev/null @@ -1,285 +0,0 @@ - - - - trace_gpx_de_demo - - somebody - - - 2023 - https://creativecommons.org/licenses/by-sa/2.5 - - nada - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/kartaview_exif_mapper/README.md b/kartaview_exif_mapper/README.md index a00ad1e4..9dc64e9e 100644 --- a/kartaview_exif_mapper/README.md +++ b/kartaview_exif_mapper/README.md @@ -12,6 +12,10 @@ configurer le dossier en argument dans le script, ou bien lancer celui ci avec l ts-node main.ts --folder=/folder/path ``` +Cela va convertir en trace GPX les fichiers de métadonnées kartaview +retrouver le dossier et les photos correspondantes, et appliquer les informations exif de positionnement gps aux photos afin de les envoyer sur panoramax avec l'outil geovisio_cli. + + # trace gpx example prendre dans la section body, l'info géographique g, colonne 3 et 4 pour latitude, longitude. diff --git a/kartaview_exif_mapper/main.ts b/kartaview_exif_mapper/main.ts index add3e9fc..98f46af2 100644 --- a/kartaview_exif_mapper/main.ts +++ b/kartaview_exif_mapper/main.ts @@ -10,7 +10,8 @@ import minimist from 'minimist'; // configs let sequence_name: string = '3596977' -let folders_list_txt: any = ["3596249", +let folders_list_txt: any = [ + // "3596249", // "3596253", "3596977", // "3675557", "3675577", "3716345", "4456921", "4457241", "4457257", "4457273", "4457289", "4457689", "4457705", "4539913", "4539929", "4539945", "4559529", // "4559545", "4559561", "4559577", "4559593", "4559609", "4559625", "4559641", "4559657", "4559673", "4559689", "4559705", "4559721", "4559737", "4559753", @@ -19,11 +20,16 @@ let folders_list_txt: any = ["3596249", // "5193433", "5193449", "5201385", "5213385", "5213481", "5213529", "5234665", "5234857", "5234889", "5235001", "5324265", "5775977", "5775993", "5776009", // "5776025", "6081417", "6081433", "6081449", "6081465", "6081689", "6081705", "6092281", "6092313", "6101305", "6102457", "6102473", "6102489", "6102521", // "6102537", "6102569", "6127433", "6133465", "6242729", "6329129", "6329177", "6329241", "6329305", "6329321", "6738633", "6738809", "6738953", "6752761", - // "6752889", "6752905", "6752921", "6752937", "6752953", "6760985", "6761049", "6761289", "6794633", "7325929", "7326457", "7328265", "7330009", "7330025", + // "6752889", + // "6752905", + // "6752921", + "6752937", + // "6752953", "6760985", "6761049", "6761289", "6794633", "7325929", "7326457", "7328265", "7330009", "7330025", // "7330041", - "7330057"] + // "7330057" +] let folder = "/home/poule/encrypted/stockage-syncable/photos/imagerie kartaview carto tel/kartaview_export_storage/share2tykayn/" -let dossier_gpx: string = "." +let dossier_gpx: string = "./output_gpx" let file_gpx: string = "3596249_d875a_60a0f9bf38f99.txt" let mini_arguments: any = minimist(process.argv.slice(2)) @@ -96,6 +102,9 @@ function makeGpxFromKartaview(tableKartaviewTrace: any) { function openKartaviewTxtGPX(filepath : any) { console.log('filepath', filepath) + let boom = filepath.split('/') + let fileName = boom[boom.length - 1] + console.log('fileName', fileName) fs.readFile(filepath, 'utf8', (err, data) => { if (err) { throw err; @@ -115,13 +124,13 @@ function openKartaviewTxtGPX(filepath let gps = gpsmodel.split(';') tableKartaviewTrace.push(gps) let date = new Date(boom[0] * 1000) - console.log('*', date, gps[0], gps[1]) - + // console.log('*', date, gps[0], gps[1]) } }) + gpxData[fileName] = [...tableKartaviewTrace] let content_gpx = makeGpxFromKartaview(tableKartaviewTrace) - writeFile('' + sequence_name + '_trace.gpx', content_gpx) + writeFile('' + fileName + '_trace.gpx', content_gpx) // console.log('gpx_content', gpx_content) }) } @@ -180,6 +189,18 @@ function writeFile(fileName: string, fileContent: any) { ) } +function listPhotos(sequence_number: string){ + getAllFilesInFolder(dossier_photo + '/' + sequence_number) + .then(listOfFiles => { + + console.log('listOfFiles', listOfFiles) + // look for photos with corresponding timestamps in gpxData + // add gps exif data to matching photos + + + // let listOfFiles: any = getAllFilesInFolder(dossier_photo + '/' + sequence_number) + }) +} async function getGPXAndEnrichExifOfPhotosInFolder(sequence_number: string) { @@ -195,11 +216,12 @@ async function getGPXAndEnrichExifOfPhotosInFolder(sequence_number: string) { throw new Error(err) }) - - // let listOfFiles: any = getAllFilesInFolder(dossier_photo + '/' + sequence_number) + console.log('gpxData', gpxData) } +console.log('dossiers à traiter: ', folders_list_txt.length) folders_list_txt.forEach((elem: string) => { getGPXAndEnrichExifOfPhotosInFolder(elem) + }) diff --git a/license-osm/img/noun-artist-4516845.svg b/license-osm/img/noun-artist-4516845.svg new file mode 100644 index 00000000..e80dba75 --- /dev/null +++ b/license-osm/img/noun-artist-4516845.svg @@ -0,0 +1,73 @@ + +Created by Adrien Coquetfrom the Noun Project diff --git a/license-osm/img/noun-build-3136692.svg b/license-osm/img/noun-build-3136692.svg new file mode 100644 index 00000000..4e2a9ab2 --- /dev/null +++ b/license-osm/img/noun-build-3136692.svg @@ -0,0 +1,63 @@ + + + + + + + Created by iconfield + from the Noun Project + + diff --git a/license-osm/img/noun-cc-share-573489.svg b/license-osm/img/noun-cc-share-573489.svg new file mode 100644 index 00000000..8750fc28 --- /dev/null +++ b/license-osm/img/noun-cc-share-573489.svg @@ -0,0 +1,57 @@ + +Created by H Alberto Gongorafrom the Noun Project diff --git a/license-osm/img/noun-contributions-4513764.svg b/license-osm/img/noun-contributions-4513764.svg new file mode 100644 index 00000000..354df730 --- /dev/null +++ b/license-osm/img/noun-contributions-4513764.svg @@ -0,0 +1,63 @@ + +Created by Mas Dhimasfrom the Noun Project diff --git a/license-osm/img/noun-dollar-1324742.svg b/license-osm/img/noun-dollar-1324742.svg new file mode 100644 index 00000000..478da0fc --- /dev/null +++ b/license-osm/img/noun-dollar-1324742.svg @@ -0,0 +1,69 @@ + +Created by Adrien Coquetfrom the Noun Project diff --git a/license-osm/img/noun-guideline-5892826.svg b/license-osm/img/noun-guideline-5892826.svg new file mode 100644 index 00000000..02da9c21 --- /dev/null +++ b/license-osm/img/noun-guideline-5892826.svg @@ -0,0 +1,82 @@ + + + + + ui 61 + + + + + Created by Anggara Putra + from the Noun Project + + + + + ui 61 + + + + diff --git a/license-osm/img/noun-heart-5454846.svg b/license-osm/img/noun-heart-5454846.svg new file mode 100644 index 00000000..a76ef19d --- /dev/null +++ b/license-osm/img/noun-heart-5454846.svg @@ -0,0 +1,69 @@ + +Created by Adrien Coquetfrom the Noun Project diff --git a/license-osm/img/noun-import-1243585.svg b/license-osm/img/noun-import-1243585.svg new file mode 100644 index 00000000..7feaa790 --- /dev/null +++ b/license-osm/img/noun-import-1243585.svg @@ -0,0 +1,85 @@ + + + + + 118all + + + + + + Created by Shaa + from the Noun Project + + + + + 118all + + + + diff --git a/license-osm/img/noun-layer-1159947.svg b/license-osm/img/noun-layer-1159947.svg new file mode 100644 index 00000000..38449ff6 --- /dev/null +++ b/license-osm/img/noun-layer-1159947.svg @@ -0,0 +1,61 @@ + +Created by iconghostfrom the Noun Project diff --git a/license-osm/img/noun-open-padlock-5336638.svg b/license-osm/img/noun-open-padlock-5336638.svg new file mode 100644 index 00000000..d49a83a6 --- /dev/null +++ b/license-osm/img/noun-open-padlock-5336638.svg @@ -0,0 +1,56 @@ + +Created by sermanzfrom the Noun Project diff --git a/license-osm/img/noun-refresh-1815798.svg b/license-osm/img/noun-refresh-1815798.svg new file mode 100644 index 00000000..b05be4b2 --- /dev/null +++ b/license-osm/img/noun-refresh-1815798.svg @@ -0,0 +1,61 @@ + +Created by Trevor Dsouzafrom the Noun Project diff --git a/license-osm/img/noun-thumb-5947085.svg b/license-osm/img/noun-thumb-5947085.svg new file mode 100644 index 00000000..bc100347 --- /dev/null +++ b/license-osm/img/noun-thumb-5947085.svg @@ -0,0 +1,61 @@ + +Created by Dkarooofrom the Noun Project diff --git a/license-osm/img/noun-together-3266241.svg b/license-osm/img/noun-together-3266241.svg new file mode 100644 index 00000000..d309275d --- /dev/null +++ b/license-osm/img/noun-together-3266241.svg @@ -0,0 +1,68 @@ + + + + + + + + + Created by Larea + from the Noun Project + + diff --git a/license-osm/img/noun-warning-170417.svg b/license-osm/img/noun-warning-170417.svg new file mode 100644 index 00000000..f25021f2 --- /dev/null +++ b/license-osm/img/noun-warning-170417.svg @@ -0,0 +1,66 @@ + +Created by Gregor Cresnarfrom the Noun Project diff --git a/org-parse/index.js b/org-parse/index.js index 4fd52481..1bcbe088 100644 --- a/org-parse/index.js +++ b/org-parse/index.js @@ -8,6 +8,7 @@ import fs from 'fs'; let input_orgmode_file_name = './tasks.org'; input_orgmode_file_name = './input.org'; + fs.readFile(input_orgmode_file_name, 'utf8', function read(err, data) { if (err) { throw err; diff --git a/package-lock.json b/package-lock.json index f8a86c5a..7e1e9508 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "name": "scripts-tykayn", "dependencies": { "exifr": "^7.1.3", + "fs": "^0.0.1-security", "minimist": "^1.2.8", "moment": "^2.29.4", "node-fs": "^0.1.7" @@ -16,6 +17,7 @@ "@babel/preset-env": "^7.22.5", "@babel/preset-typescript": "^7.22.5", "@jest/globals": "^29.5.0", + "@types/minimist": "^1.2.2", "babel-jest": "^29.5.0", "jest": "^29.5.0", "nodemon": "^2.0.22", @@ -2461,6 +2463,12 @@ "@types/istanbul-lib-report": "*" } }, + "node_modules/@types/minimist": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", + "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", + "dev": true + }, "node_modules/@types/node": { "version": "20.3.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.2.tgz", @@ -3253,6 +3261,11 @@ "node": ">=8" } }, + "node_modules/fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==" + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -7285,6 +7298,12 @@ "@types/istanbul-lib-report": "*" } }, + "@types/minimist": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", + "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", + "dev": true + }, "@types/node": { "version": "20.3.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.2.tgz", @@ -7871,6 +7890,11 @@ "path-exists": "^4.0.0" } }, + "fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==" + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", diff --git a/package.json b/package.json index 547726c3..8c565ced 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "scripts-tykayn", "dependencies": { "exifr": "^7.1.3", + "fs": "^0.0.1-security", "minimist": "^1.2.8", "moment": "^2.29.4", "node-fs": "^0.1.7" @@ -11,6 +12,7 @@ "@babel/preset-env": "^7.22.5", "@babel/preset-typescript": "^7.22.5", "@jest/globals": "^29.5.0", + "@types/minimist": "^1.2.2", "babel-jest": "^29.5.0", "jest": "^29.5.0", "nodemon": "^2.0.22", diff --git a/panoramax/panoramax_bash_send.sh b/panoramax/panoramax_bash_send.sh index cce03804..51707351 100755 --- a/panoramax/panoramax_bash_send.sh +++ b/panoramax/panoramax_bash_send.sh @@ -11,8 +11,8 @@ # # ---------------------------- made by tykayn www.cipherbliss.com ----------------------------- -containing_mapillary_folders="/home/poule/encrypted/stockage-syncable/photos/imagerie_kartaview_carto_tel/mapillary" -done_mapillary_folders="/home/poule/encrypted/stockage-syncable/photos/imagerie_kartaview_carto_tel/already_sent_to_panoramax_osm_fr" +containing_mapillary_folders="/home/poule/encrypted/stockage-syncable/photos/imagerie kartaview carto tel/mapillary" +done_mapillary_folders="/home/poule/encrypted/stockage-syncable/photos/imagerie kartaview carto tel/already_sent_to_panoramax_osm_fr" panoramax_instance="https://panoramax.openstreetmap.fr" function import_mapillary_folders_and_move_in_imported_folder() { @@ -26,7 +26,7 @@ function import_mapillary_folders_and_move_in_imported_folder() { for f in *; do echo "envoi du dossier" "$containing_mapillary_folders/$f" geovisio upload --api-url $panoramax_instance "$containing_mapillary_folders/$f" - mv "$containing_mapillary_folders/$f" "$done_mapillary_folders" + # mv "$containing_mapillary_folders/$f" "$done_mapillary_folders" done }