Page 1 of 1

Help with Adding a pdf to the Paperless App

PostPosted: Thu Jan 03, 2013 2:17 pm
by scottfwalter
Hi,

Im trying to add a pdf document the Paperless App from Mariner Software. I can get the file to add to Paperless but I cant get the title or tags to set. Anyone have any ideas?



set this_file to theFile
set the_category to "Personal"
set the_title to "The Title"
set the_tags to "software"
set theLibraryName to "Paperless Library"

tell application "Paperless"
activate

set theDoc to (the first library whose name is theLibraryName)
tell theDoc
set result to make new document with properties {title:the_title, tag:the_tags, category:the_category, file:this_file as alias}
add result without prompting
end tell
end tell

1. The title is never set
2. If I keep the tag property the document never gets added.

Anyone know what I am doing wrong?

Re: Help with Adding a pdf to the Paperless App

PostPosted: Thu Jan 03, 2013 2:20 pm
by scottfwalter
Quick follow up. If I watch the paperless window the title gets set and then unset very quickly.

Re: Help with Adding a pdf to the Paperless App

PostPosted: Thu Jan 03, 2013 4:42 pm
by a_freyer
Does this script work outside of Hazel?

Re: Help with Adding a pdf to the Paperless App

PostPosted: Thu Jan 03, 2013 5:09 pm
by scottfwalter
After posting to the Mariner forum I found this out:

1. The disappearing title was not AppleScript related, it would also lose the title if I dragged a pdf onto Paperless. They had me go into the Library Configuration and delete a blank title. I don't know how the blank title ever got in there in the first place.

2. Paperless doesn't support tagging via AppleScript.

Re: Help with Adding a pdf to the Paperless App

PostPosted: Thu Jan 03, 2013 5:13 pm
by a_freyer
Perhaps Paperless stores its tag information within the file's metadata (instead of an internal database). If that is the case, you may be able to add the tag information independent of the Paperless API.

I'd check a Paperless tagged document with mdls to see if the tag appears.