Jump to content

Append a thumbnail image to multiple notes...


Recommended Posts

Can anyone think of a way to append the same identical thumbnail image to a selection of notes? With one action. A lot to ask, I know. It's a weird workflow for sure... so any workaround would be great... no matter how convoluted ?

Link to comment
  • Level 5*

Could try exporting the notes to an ENEX file and try a find/replace, if there is something you can latch onto that is the same in all the notes, maybe at the top of the note. 

Link to comment
  • Level 5*
15 hours ago, CalS said:

Could try exporting the notes to an ENEX file and try a find/replace, if there is something you can latch onto that is the same in all the notes, maybe at the top of the note. 

Non-trivial exercise in ENML:

  • need to find a place in the markup to put the image reference; probably right at the top, after the "<en-note>" tag would be easiest.
  • need to generate the markup that holds the image reference. From a note that I exported: 
<div><en-media hash="b1d6713d3f27286f40095f84789246115" type="image/png" width="54"/></div>

The <div></div> wrapper may be unnecessary. Generating the hash, might be problematic; I don't know if that's covered by Evernote rules or what. I'd have to research.

  • OK, so now you need to stick the image in there. Down towards the bottom, in the <resource> section, you need a <data> element that holds the image content, encoded into characters:
<resource><data encoding="base64">
iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAAAXNSR0IArs4c6QAAAARnQU1BAACx
jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAu
MTnU1rJkAAAa1klEQVR4Xu2da6wkx13FzfslAiiYCIQiEZAQH+ADCAESEuKLeYj1hthgEgRSIgVE
  
  ... and so on ---
  
7ACGP1Go5WV6aZxiwbcmMBlCkh2JTg0vw0uSTzRG0SgmKEQz5wDnenrfoY2H8HfR7ESGl6Qmonkc
M+WwCUGz9d2MYJbC4zI44f/uecnoktSnaDrHhF0jk0uSJMWra675f29qTdcNrBTeAAAAAElFTkSu
QmCC
</data><mime>image/png</mime><width>256</width><height>256</height><recognition><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE recoIndex PUBLIC "SYSTEM" "http://xml.evernote.com/pub/recoIndex.dtd"><recoIndex docType="unknown" objType="image" objID="b1d6713d3f27286f40095f84789246115" engineVersion="7.0.24.1" recoType="service" lang="en" objWidth="256" objHeight="256"/>
]]>><resource-attributes><source-url>file://C:\Users\Jeff\Desktop\MyIcon_256x256.png</source-url><file-name>MyIcon_256x256.png</file-name></resource-attributes></resource>

Note how the objID matches the hash from above.

So, a fair bit of work there. You'd probably be better off picking up Python and using the Evernote SDK. You might also be able to be able to do this using AppleScript if you're on the Mac, but that's not my realm...

Link to comment
  • Level 5*
2 hours ago, jefito said:

So, a fair bit of work there.

Yowsa!!!  Depending upon how many notes, might be easier to just merge a note with the pic with each of the needed notes.

Link to comment
  • Level 5*
2 hours ago, jefito said:

You might also be able to be able to do this using AppleScript if you're on the Mac, but that's not my realm...

Applescript (Mac) has my vote
The process would pass through the set of notes and add the image using the statement:  
append theNote attachment the_file

Link to comment
  • Level 5*
22 minutes ago, CalS said:

Yowsa!!!  Depending upon how many notes, might be easier to just merge a note with the pic with each of the needed notes.

If only the merge didn't put the original notes into the trash...

13 minutes ago, DTLow said:

The process would be to pass through the set of notes and add the image using the statement:  
append theNote attachment the_file

That's really the thing about Mac Evernote that makes me jealous. An equivalent Evernote scripting tool for Windows would be fantastic.

Hey, Evernote -- how about open sourcing the ENScript tool??? It's make a great starter kit for a beginning SDK user, right?

Link to comment
  • Level 5*
1 hour ago, jefito said:

If only the merge didn't put the original notes into the trash...

For sure, just have to have the image in an ENEX on the desktop.  Double click to add each time.  PITA, but it would work pending alternatives one was comfortable with.  

Link to comment

Archived

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

×
×
  • Create New...