dgivnish 0 Posted March 19, 2017 Share Posted March 19, 2017 I'd like to import files that have been tagged in macOS. The tags are lost now on import into EN. Link to comment
Level 5* DTLow 5,721 Posted March 19, 2017 Level 5* Share Posted March 19, 2017 On 2017-03-19 at 9:19 AM, dgivnish said: I'd like to import files that have been tagged in macOS. The tags are lost now on import into EN. Does this apply only to the Mac platform; - where we implement an import folder using Applescript.My solution would be to add this logic to the script I'm also interested in the reverse; Preserve Evernote Tags on Export Link to comment
Level 5* JMichaelTX 4,108 Posted March 19, 2017 Level 5* Share Posted March 19, 2017 41 minutes ago, dgivnish said: I'd like to import files that have been tagged in macOS. The tags are lost now on import into EN. You may want to checkout the AppleScript provided by Veritrope:See Evernote Mac Import Folder Using AppleScript from Veritrope.com You should be able to add the macOS file tags to this script. Link to comment
dgivnish 0 Posted March 23, 2017 Author Share Posted March 23, 2017 It works well. However, the file tag of sample.tag is coming in as "sample.tag". Do I use a different delimiter in the string $_.strip.end_with?(\",\") ? $_.strip[0...-1] : $_.strip; puts each if each != \"\"'")? Link to comment
Level 5* DTLow 5,721 Posted March 21, 2017 Level 5* Share Posted March 21, 2017 On 2017-03-19 at 9:19 AM, dgivnish said: I'd like to import files that have been tagged in macOS. The tags are lost now on import into EN. Following up on this, I found this post at https://n8henrie.com/2015/08/converting-osx-finder-tags-to-evernote-tags-with-applescript/ with a script Here's a rough script triggered by folder actions Evernote Folder copy.scpt I borrowed the "set the_tags" code from the link I posted. It works, but is incredibly complex and I need time to study it. Documentation on folder action scripts is here https://developer.apple.com/library/content/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_folder_actions.html The important points are - store the script at ~/Library/Scripts/Folder Action Scripts - right click on your import folder, click on Services > Folder Actions Setup - click on + to attach the script to the folder on adding folder items to this_folder after receiving new_Files delay 5 repeat with new_file in new_Files set the_tags to paragraphs of (do shell script "mdls -raw -name kMDItemUserTags " & quoted form of POSIX path of new_file & " | sed 's/^[()]$//g' | ruby -ne 'each = $_.strip.end_with?(\",\") ? $_.strip[0...-1] : $_.strip; puts each if each != \"\"'") tell application "Evernote" to create note from file new_file tags the_tagstell application "Finder" to delete new_file end repeat end adding folder items to Link to comment
Idea
dgivnish 0
I'd like to import files that have been tagged in macOS. The tags are lost now on import into EN.
Link to comment
4 replies to this idea
Recommended Posts
Archived
This topic is now archived and is closed to further replies.