Skip to content

Commit

Permalink
Bugfix in path regex
Browse files Browse the repository at this point in the history
  • Loading branch information
sto3014 committed Jun 4, 2021
1 parent 52e69f2 commit 0d46dfd
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 23 deletions.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
cd "$(dirname "$0")"
export SCRIPT_DIR="$(pwd)"
export VERSION=1.0.0
export VERSION=1.0.0.0

cd $SCRIPT_DIR/target
echo Extract files to ~:
Expand Down
2 changes: 1 addition & 1 deletion package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export PACKAGE_NAME=LRPhotos
export TARGET_DIR_MAC="$SCRIPT_DIR/target/mac/Library/Application Support/Adobe/Lightroom"
export SOURCE_DIR=$SCRIPT_DIR/src/main/lua/$PACKAGE_NAME.lrdevplugin
export RESOURCE_DIR=$SCRIPT_DIR/res
export VERSION=1.0.0
export VERSION=1.0.0.0
#
# mac
#
Expand Down
2 changes: 0 additions & 2 deletions src/main/applescript/PhotosImport.scptd/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,5 @@
<string>1.0.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2021 , All Rights Reserved</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@

\f0\i\fs24 \cf2 -------------------------------------------------------------------------------
\f1\i0 \cf3 \
\pard\pardeftab480\slleading40\pardirnatural\partightenfactor0

\f0\i \cf2 -- Initial created by Simon Schoeters in 2011
\f1\i0 \cf3 \

\f0\i \cf2 --
\f1\i0 \cf3 \

\f0\i \cf2 -- 29.05.2021. Dieter Stockhausen. Add publishing functionality
\f0\i \cf2 -- 29.05.2021. Dieter Stockhausen. Add publishing functionality
\f1\i0 \cf3 \

\f0\i \cf2 --
Expand Down Expand Up @@ -302,7 +301,7 @@
\f0\i \cf2 -- Extract the photo descriptors from the photos file
\f1\i0 \cf3 \

\f0\i \cf2 -- Format is:
\f0\i \cf2 -- Format is:
\f1\i0 \cf3 \

\f0\i \cf2 -- image posix file path : LR photo uuid : name of LR catalog file : Photos photo ID
Expand Down Expand Up @@ -387,7 +386,7 @@
\f0\i \cf2 -- matchesRegex
\f1\i0 \cf3 \

\f0\i \cf2 -------------------------------------------------------------------------------
\f0\i \cf2 -------------------------------------------------------------------------------
\f1\i0 \cf3 \

\f2\b \cf4 on
Expand Down Expand Up @@ -673,7 +672,7 @@
\f0\i \cf2 --
\f1\i0 \cf3 \

\f0\i \cf2 -- format of albumPath:
\f0\i \cf2 -- format of albumPath:
\f1\i0 \cf3 \

\f0\i \cf2 -- "folder1/folder2/..../album"
Expand Down Expand Up @@ -713,7 +712,7 @@
\f2\b \cf4 set
\f1\b0 \cf3 \cf3 isValid\cf3
\f2\b \cf4 to
\f1\b0 \cf3 \cf10 matchesRegex\cf3 (\cf3 albumPath\cf3 , \cf7 "^(\\\\/[\\\\w\\\\s-]+)+$"\cf3 )\
\f1\b0 \cf3 \cf10 matchesRegex\cf3 (\cf3 albumPath\cf3 , \cf7 "^(\\\\/[^\\\\/]+)+$"\cf3 )\

\f2\b \cf4 if
\f1\b0 \cf3
Expand Down Expand Up @@ -1797,7 +1796,7 @@ errorMsg="\cf3 & \cf3 errorMsg\cf3 \cf11 to\cf3 \cf3 sessionFile\cf3 \
\f2\b \cf4 set
\f1\b0 \cf3 \cf3 argv\cf3
\f2\b \cf4 to
\f1\b0 \cf3 \{\cf7 "/Users/dieterstockhausen/Temp/Unbenannter Export"\cf3 \}\
\f1\b0 \cf3 \{\cf7 "/Users/dieterstockhausen/Desktop/Unbenannter Export"\cf3 \}\

\f2\b \cf4 end
\f1\b0 \cf3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@

\f0\i\fs24 \cf2 -------------------------------------------------------------------------------
\f1\i0 \cf3 \
\pard\pardeftab480\slleading40\pardirnatural\partightenfactor0

\f0\i \cf2 -- Initial created by Simon Schoeters in 2011
\f1\i0 \cf3 \

\f0\i \cf2 --
\f1\i0 \cf3 \

\f0\i \cf2 -- 29.05.2021. Dieter Stockhausen. Add publishing functionality
\f0\i \cf2 -- 29.05.2021. Dieter Stockhausen. Add publishing functionality
\f1\i0 \cf3 \

\f0\i \cf2 --
Expand Down Expand Up @@ -302,7 +301,7 @@
\f0\i \cf2 -- Extract the photo descriptors from the photos file
\f1\i0 \cf3 \

\f0\i \cf2 -- Format is:
\f0\i \cf2 -- Format is:
\f1\i0 \cf3 \

\f0\i \cf2 -- image posix file path : LR photo uuid : name of LR catalog file : Photos photo ID
Expand Down Expand Up @@ -387,7 +386,7 @@
\f0\i \cf2 -- matchesRegex
\f1\i0 \cf3 \

\f0\i \cf2 -------------------------------------------------------------------------------
\f0\i \cf2 -------------------------------------------------------------------------------
\f1\i0 \cf3 \

\f2\b \cf4 on
Expand Down Expand Up @@ -673,7 +672,7 @@
\f0\i \cf2 --
\f1\i0 \cf3 \

\f0\i \cf2 -- format of albumPath:
\f0\i \cf2 -- format of albumPath:
\f1\i0 \cf3 \

\f0\i \cf2 -- "folder1/folder2/..../album"
Expand Down Expand Up @@ -713,7 +712,7 @@
\f2\b \cf4 set
\f1\b0 \cf3 \cf3 isValid\cf3
\f2\b \cf4 to
\f1\b0 \cf3 \cf10 matchesRegex\cf3 (\cf3 albumPath\cf3 , \cf7 "^(\\\\/[\\\\w\\\\s-]+)+$"\cf3 )\
\f1\b0 \cf3 \cf10 matchesRegex\cf3 (\cf3 albumPath\cf3 , \cf7 "^(\\\\/[^\\\\/]+)+$"\cf3 )\

\f2\b \cf4 if
\f1\b0 \cf3
Expand Down Expand Up @@ -1797,7 +1796,7 @@ errorMsg="\cf3 & \cf3 errorMsg\cf3 \cf11 to\cf3 \cf3 sessionFile\cf3 \
\f2\b \cf4 set
\f1\b0 \cf3 \cf3 argv\cf3
\f2\b \cf4 to
\f1\b0 \cf3 \{\cf7 "/Users/dieterstockhausen/Temp/Unbenannter Export"\cf3 \}\
\f1\b0 \cf3 \{\cf7 "/Users/dieterstockhausen/Desktop/Unbenannter Export"\cf3 \}\

\f2\b \cf4 end
\f1\b0 \cf3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ on createOrGetAlbum(albumPath)
if albumPath is missing value or albumPath is equal to "" then
return missing value
end if
set isValid to matchesRegex(albumPath, "^(\\/[\\w\\s-]+)+$")
set isValid to matchesRegex(albumPath, "^(\\/[^\\/]+)+$")
if not isValid then
error "Albumpath " & albumPath & " is not a valid path."
end if
Expand Down Expand Up @@ -324,7 +324,7 @@ end updatePhotosFile
on run argv

if (argv = me) then
set argv to {"/Users/dieterstockhausen/Temp/Unbenannter Export"}
set argv to {"/Users/dieterstockhausen/Desktop/Unbenannter Export"}
end if
-- Read the directory from the input and define the session file
set tempFolder to item 1 of argv
Expand Down
2 changes: 1 addition & 1 deletion src/main/lua/lrphotos.lrdevplugin/Logger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
local LrLogger = import("LrLogger")
local _logger = LrLogger("PhotosServiceProvider")
_logger:enable("logfile")
local enabled = false
local enabled = true
-------------------------------------------------------------------------------
local logger = {}
-------------------------------------------------------------------------------
Expand Down
Binary file not shown.
1 change: 0 additions & 1 deletion src/main/lua/lrphotos.lrdevplugin/PhotosPublishTask.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ function PhotosPublishTask.processRenderedPhotos(_, exportContext)

local exportSession = exportContext.exportSession
local exportParams = exportContext.propertyTable
local collectionName = exportContext.publishedCollectionInfo.name
-- Export message settings
local nPhotos = exportSession:countRenditions()
local progressScope = exportContext:configureProgress {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'PhotosPublishTask'

local PhotosServiceProvider = {
hideSections = { 'postProcessing', 'exportLocation'},
-- hideSections = { 'postProcessing'},
--hideSections = { 'postProcessing'},
exportPresetFields = {
{ key = 'useAlbum', default = true },
{ key = 'albumBy', default = "service" },
Expand Down

0 comments on commit 0d46dfd

Please sign in to comment.