The most important table is Zenattributedentity; it is denormalized; multiple object types are flattened into a single table, distinguished by their z_ent entity type column.
Z_ENT = 11: shared notebooks (zsharename)
Z_ENT = 12: note (ztitle)
Z_ENT = 13: notebook (zname)
Z_ENT = 14: attachment (zfilename)
Z_ENT = 15: saved search
Z_ENT = 17: tag
This SQL query finds all excel attachments.
SELECT "open $HOME/Library/Caches/Metadata/com.everno
After using DBIx::Class::Schema::Loader's dbicdump to extract the schema,
dbicdump -o dump_directory=/Users/mengwong/lib/perl/
The following DBIx::Class code in Zenattributedentity.pm will create some of the appropriate relationships:
# the has_many through the Z12tag table won't work if the Z12tag table doesn't type its columns.
__PACKAGE__->has_many(tag2note => 'Evernote::Schema::Result::Z12tag', "z_17tags" );
__PACKAGE__->has_many(note2tag => 'Evernote::Schema::Result::Z12tag', "z_12notes" );
__PACKAGE__->has_many(notebook2note => 'Evernote::Schema::Result::Zenattributed
__PACKAGE__->has_many(attachments => 'Evernote::Schema::Result::Zenattributed
Other relations like "a note belongs_to a notebook" are left as an exercise for the reader.
A separate table, Z12Tags, records note/tag relationships.
Please don't contact me with requests for assistance; try the Evernote forum or leave comments in this post.