diff --git a/Archive/media/img/my/work/sync-flash.sh b/Archive/media/img/my/work/sync-flash.sh index 0ce6f5f9..0d68203e 100755 --- a/Archive/media/img/my/work/sync-flash.sh +++ b/Archive/media/img/my/work/sync-flash.sh @@ -288,8 +288,8 @@ while true ; do while true ; do echo "Copying files from ${BASE}${DRIVE} (~`du -hs "${BASE}${DRIVE}" | cut -f 1`)..." - echo "# $COPY $COPYFLAGS ${BASE}${DRIVE}/* "$DIR"" - echo "# 2> >(tee "${DIR}"/copy-err.log)" + #echo "# $COPY $COPYFLAGS ${BASE}${DRIVE}/* "$DIR"" + #echo "# 2> >(tee "${DIR}"/copy-err.log)" $COPY $COPYFLAGS ${BASE}${DRIVE}/* "$DIR" \ 2> >(tee "${DIR}"/copy-err.log) # no errors -> remove log... @@ -358,7 +358,7 @@ fi if ! [ -z "$SNAPSHOT" ] \ && [ -e "$SNAPSHOT" ] ; then - eval "$SNAPSHOT" + "$SNAPSHOT" fi # XXX add report... diff --git a/Viewer/features/filesystem.js b/Viewer/features/filesystem.js index 60f13c95..547def0a 100755 --- a/Viewer/features/filesystem.js +++ b/Viewer/features/filesystem.js @@ -2386,8 +2386,8 @@ var FileSystemWriterActions = actions.Actions({ exportImages: ['- File/Export/Export ribbons as directories', core.doc`Export ribbons as directories - .exportImages(path) - .exportImages(settings) + .exportImages([images, ]path) + .exportImages([images, ]settings) settings format: @@ -2416,12 +2416,35 @@ var FileSystemWriterActions = actions.Actions({ var that = this var base_dir = this.location.path + var images + if(path == 'current' + || path instanceof Array){ + images = path + ;[path, pattern, level_dir, size, include_virtual, clean_target_dir, logger] + = [...arguments].slice(1) } + + var settings if(path && typeof(path) != typeof('str')){ settings = path path = settings.path } settings = settings || this.config['export-settings'] || {} + + images = (images + ?? settings.images) + || images + if(images != null){ + images = + typeof(images) == 'string' ? + (this.data.getImage(images) + ?? this.data.getImages(images)) + : this.data.getImages(images) + images = new Set( + images instanceof Array ? + images + : [images] ) } + // XXX resolve env variables in path... // ...also add ImageGrid specifics: $IG_INDEX, ... // XXX @@ -2489,6 +2512,10 @@ var FileSystemWriterActions = actions.Actions({ var total_len = that.data.length that.data.ribbons[ribbon].forEach(function(gid){ + if(images != null + && ! images.has(gid)){ + return } + var img = that.images[gid] // XXX get/form image name... @@ -2554,7 +2581,9 @@ var FileSystemWriterActions = actions.Actions({ '/'+level_dir : '' - return res })) }] + return res })) }], + exportImage: ['- File/Export/Export current image', + 'exportImages: "current" ... -- '], }) @@ -2655,6 +2684,22 @@ var FileSystemWriterUIActions = actions.Actions({ 'clean_target_dir', ], }, + 'Current image': { + alias: 'image', + action: 'exportImage', + data: [ + //'name', + 'pattern', + 'size', + 'export_mode', + // XXX do we save virtual images??? + //'include_virtual', + 'base_path', + 'target_dir', + //'clean_target_dir', + ], + }, + //*/ }, // diff --git a/Viewer/package.json b/Viewer/package.json index 7dd446e9..5e0e0b52 100644 --- a/Viewer/package.json +++ b/Viewer/package.json @@ -1,7 +1,7 @@ { "name": "ImageGrid.Viewer.g4", "main": "index.html", - "version": "4.0.11a", + "version": "4.0.12a", "author": "Alex A. Naanou (https://github.com/flynx)", "contributors": [], "repository": "github:flynx/ImageGrid",