Jump to content
We apologize for the inconvenience, but chat support is currently unavailable. Please feel free to submit an email ticket or reach out at discussion.evernote.com. Thank you for understanding. ×

Archived

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

  • 0
JaperCaper

mac (Archived) Programmatically change CaSe of note titles?

Idea

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?

 

Thanks,

Tom

 

Share this post


Link to post

4 replies to this idea

Recommended Posts

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. :-)

Share this post


Link to post

I don't think you can programmatically update ANY aspect of Evernote in e.g. Applescript. :-( Would love it if you could.

Share this post


Link to post

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

Share this post


Link to post
Guest
This topic is now closed to further replies.

×
×
  • Create New...