Jump to content
  • 0

(Archived) Programmatically change CaSe of note titles?



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 :blink: through each record?





Link to comment

4 replies to this idea

Recommended Posts

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 tell

You 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

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


This topic is now archived and is closed to further replies.

  • Create New...