starting from the AppleScript you provided, I tried to use the functionality to convert webarchives outside EagleFiler to PDFs. Essentially I am calling the cl tool like this:
do shell script “/Applications/EagleFiler/EagleFiler.app/Contents/Frameworks/WashFramework.framework/Resources/efweb2pdf ‘/Users/myusername/Desktop/EagleFilerAppleScripts.webarchive’ ‘/Users/myusername/Desktop/EagleFilerAppleScripts.pdf’ id”
This works, i.e. the PDF is created, but after that the cl tool crashes.
Thread 0 Crashed:
0 com.apple.CoreFoundation 0x9391bd38 TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION + 0
1 libobjc.A.dylib 0x90a134e8 objc_exception_throw + 68
2 com.apple.CoreFoundation 0x9391bc9c +[NSException raise:format:arguments:] + 136
3 com.apple.CoreFoundation 0x9391bcd4 +[NSException raise:format:] + 52
4 com.apple.Foundation 0x94941b3c -[NSCFDictionary setObject:forKey:] + 268
5 efweb2pdf 0x000035a8 -[PDFLoader savePDF:] + 1180
6 efweb2pdf 0x000030e0 main + 356
7 efweb2pdf 0x00002a34 _start + 744
8 efweb2pdf 0x00002744 start + 44
Judging from the additional argument id, there seems to be a side effect, i.e. the tool tries to hand data to EagleFiler or the database or the like, which it does not have. I am not sure though, since your original script does not seem to hand over data to the tool except the source and target paths.
Is there a way to call the tool just for conversion, i.e. without any side effects, or could you change it to make this possible?
BTW, I guess you’d receive a big “Hooray!” if you made this available as a separate command line tool to be included in AppleScripts or Automator Workflows. There are a lot of people out there who would like to get hold of something like this.