PopClip Extension Test

Anyone making any PopClip extensions? If so, please create a new one with this simple code running in a .sh file…


echo $POPCLIP_TEXT > $TMPDIR/test.txt
osascript -e 'tell application id "DNtp"' -e 'set loc to do shell script "echo $TMPDIR"' -e 'import (loc & "test.txt") to  incoming group' -e 'end tell'

Is ths file importing as expected or are you getting Console.log messages like…

default	01:20:16.096971-0400	PopClip	[Extension:com.BLUEFROG.popclip.extension.test] Task stdout:
missing value
default	01:20:16.097012-0400	PopClip	[Extension:com.BLUEFROG.popclip.extension.test] Task stderr:
generate-sheet.sh:3: read-only file system: /dt-issue.tsv

Using a standard echo in Terminal instead of the PopClip echo, this code works as expected.
Also, running the code natively in Script Editor imports the file as expected.

Note: I ended up using ~/Library/Caches/TemporaryItems instead.

I also opted for a .applescript file in the extension package and called it from the shell script. No parameters were passed but still something to try out.

With PopClip “On” (nice app by the way, heard about here):

content id 117837 of database id 1

with the file test.txt imported to Inbox. File 1 byte nothing there.

Interesting… I’m been debugging this read-only file system error for awhile. I have a good secondary approach but I’m curious as to the error.

Oh well… time to crash.