ascendant

Where to stash extra metadata in EN notes

9 posts in this topic

Hi All,

I was wondering if anyone had some insights about where one might store extra metadata in notes- that is, data that would tell your own (third party) app how to present notes, that aren't used by Evernote itself.

For example, notes in Evernote already can store things like "create date" "location" "tag" etc. but say you created an app where you'd also want to store e.g. the "priority" of a note, or data about where it sits in a hierarchy that applies to your own app, but not to Evernote's own system.

You'd want this data to be stored in EN for sync purposes, but you wouldn't want it to be edited by the user by accident from within EN (as it could disrupt the note's functionality within your app), and you wouldn't want to co-opt any field that EN actually *does* use... is there a best practice for things like this?

Share this post


Link to post

Posted · Hidden by SethH, January 4, 2012 - No reason given

You can add metadata to the Note.attributes.sourceApplication field, which our apps don't use or expose to the user. Please insert your metadata in the form consumerkey:{metadata}, and play nicely with data that other apps might stash in this field.

Share this post


Link to post

Posted · Hidden by SethH, January 4, 2012 - No reason given

Thanks for the quick reply Seth.

Is there any favored delimiter to use to separate from metadata other apps have left, or is it just left up to each developer?

Share this post


Link to post

Posted · Hidden by SethH, January 4, 2012 - No reason given

Let's go with semicolon:

consumerkey:{metadata};consumerkey:{metadata}

etc etc

Share this post


Link to post

Posted · Hidden by SethH, January 4, 2012 - No reason given

Warning: THE ADVICE ABOVE IS OUT OF DATE As SethH responded when I quoted it on StackOverflow, Now that we've added a specific application data field, we suggest that applications stop using sourceApplication to store metadata.

1 person likes this

Share this post


Link to post

Check out the new Note.attributes.applicationData field:

Share this post


Link to post

Question: If you added custom attributes to an "Evernote blessed" HTML5 tag what would happen? My assumption is the DTD checking would throw it out. But is that right? If not that might prove useful to the OP. Of course I don't expect clients to be able to do anything with it (and fear some might strip them out).

Martin

Share this post


Link to post

Martin,

just try it and add your custom attribute to - say - the div tag. You will see that the Evernote service will reject your ENML (the "Evernote blessed HTML"), You don't need to write code, just try it using http://enml-editor.ping13.net/. You will get an error message.

Cheers

Stephan

Share this post


Link to post