Can the 'summary service' be used on the command line in Mac OS X?
I have already tried piping, using the text file as an argument and sending the text file as stdin.
|
Can the 'summary service' be used on the command line in Mac OS X? I have already tried piping, using the text file as an argument and sending the text file as stdin. |
|||||||
|
|
Try this AppleScript (say it's called summarize.scpt) and call from the command line using "osascript summarize.scpt
Alternately, you could use a one liner something like this:
|
||||
|
|
Unfortunately without writing an application (AppleScript ObjC, or even a true Obj-C app) to interact with NSService, no. Even then Summary Service is exclusively a GUI application so it would bring up the GUI. However some Services (if an Automator Workflow) can be run manually on the command line by using |
|||
|
|
|
There's also an open text summarization library called libots that includes a command line "ots" executable that one can pipe to. Summary Service and OTS seem to give different results, in brief testing I'm not sure which one I would give higher marks. |
|||
|
|