JaperCaper 0 Posted December 17, 2013 Share Posted December 17, 2013 I uploaded 700+ PDF files to my Evernote. The doc titles were all in caps. They came into Evernote all in small letters. Is there a way I can toggle the case (or make them Title Case) programmatically or do I need to trudge through each record? Thanks, Tom Link to comment
Level 5 Martin Packer 162 Posted December 17, 2013 Level 5 Share Posted December 17, 2013 I don't think you can programmatically update ANY aspect of Evernote in e.g. Applescript. :-( Would love it if you could. Link to comment
John Christopher Jones 29 Posted December 18, 2013 Share Posted December 18, 2013 Actually, Evernote has a great AppleScript API. It also has APIs for almost every language, but those SDKs are a little overkill for this task. AppleScript itself has some weaknesses, like string processing, so we can use insert a little Python magic in our AppleScript to get the job done. The following code will transform all selected notes to UPPERCASE.tell application "Evernote" -- Set the notes you want to rename here. -- Just getting every selected note set notesToRename to selection -- Looping over Evernote notes. Calling the current note "n". repeat with n in notesToRename set noteTitle to title of n set noteTitle to do shell script "python -c \"import sys; print unicode(sys.argv[1], 'utf8').upper().encode('utf8')\" " & quoted form of noteTitle set title of n to noteTitle end repeatend tellYou can easily modify this code to use any simple kind of capitalization that you like. To change the capitalization, replace ".upper()" to something like ".title()". You can use any of the following:.upper() # ALL UPPER CASE.lower() # all lower case.title() # Title Case.capitalize() # Capitalize case.swapcase() # sWAP cASE Link to comment
Level 5 Martin Packer 162 Posted December 18, 2013 Level 5 Share Posted December 18, 2013 Thanks! It must be the content you can't edit in place programmatically. I once wrote some (bad) Applescript to add rows to a table (something Evernote client is fairly poor at) but had to satisfy myself with creating a second note. I hope I was wrong. :-) Link to comment
JaperCaper 0 Posted December 18, 2013 Author Share Posted December 18, 2013 Wow - this is awesome. Thanks. I didn't know you could use shell scripts in Applescript. Tom Link to comment
Idea
JaperCaper 0
I uploaded 700+ PDF files to my Evernote. The doc titles were all in caps. They came into Evernote all in small letters. Is there a way I can toggle the case (or make them Title Case) programmatically or do I need to trudge through each record?
Thanks,
Tom
Link to comment
4 replies to this idea
Recommended Posts
Archived
This topic is now archived and is closed to further replies.