Hi,
I’m currently looking into opening an eaglefiler record automatically from a shell script, given the corresponding file or folder’s full path and the name of the library.
In particular, I’d like to look up a record’s eaglefiler recordGUID using the record’s underlying file path, then open the record from my script via the special eaglefiler URL syntax.
What would be the best way to find a record’s eaglefiler recordGUID based on library name and full file system path?
You can use AppleScript to look up a record by path (library record whose file is "…") and to get the record link or GUID.
Great, thanks for the quick reply! Will check this out.
Here’s a more complete example for you. If you save a lookup.applescript file like this:
on run _argv
set _path to item 1 of _argv
set _file to POSIX file _path
tell application "EagleFiler"
tell library document 1
set _record to first library record where its file is _file
return _record's URL
end tell
end tell
end run
You can run it from your shell script like this:
osascript lookup.applescript /Users/you/Documents/EFLibrary/Files/folder/file.pdf
to get the x-eaglefiler URL.
1 Like