Jump to content

John Christopher Jones

Level 2
  • Content Count

    40
  • Joined

  • Last visited

Community Reputation

28 Good

About John Christopher Jones

Recent Profile Visitors

2,136 profile views
  1. This doesn't work on the macOS client as of version 6.10. For example: I want to create a note to help me call my house, senate, and state senate and state delegates. Evernote could just let me CMD+K and type "tel:555-555-5510". Instead, well, I have to re-key the phone numbers into my phone every time I want to make a call. Footnote: I would at least like to explicitly opt into using unsupported url schema. This "safety" prohibition prevents a huge number of edge enhancements to the Evernote network. It'd be extremely useful to me to be able to add a link for FileMaker so I can use a url like "fmp://$/ProLog?script=NewCall&$tel=555-555-5510", which would let me invoke the FileMaker script "NewCall" in the already-opened datebase "ProLog", where FileMaker itself lets me invoke custom URL schema to start a phone call and create a database record to record the call log at the same time.
  2. Just because it's open source or free software doesn't mean it can't be commercial. That only means that you have to make the source code available to anyone who asks. If nothing else, you could stick a donation button in a Github readme). By the way, this is pretty awesome. I've been using the Evernote for Sublime Text package and I've been debating putting in the time to try porting it to Atom. You appear to have gone even further on features than my favorite Sublime Text package in many ways.
  3. You guys are totally right: Evernote is already using <div>s. It's right there in the developer docs on plaintext. So, Evernote wouldn't be moving any further from semantic markup, which means third-party apps probably won't break. So, I stand corrected.
  4. Although there isn't a way to do this in the Evernote client itself, ENML (the XML format Evernote notes are saved as) does provide a way. As a result, I've gotten kinda spoiled using bordaigorl's Sublime plugin for Evernote. It lets you write in Markdown, which gets converted to ENML when sent to Evernote. So, you can use block quotes and pre-formatted text blocks, in addition to various other XHTML tags that you don't normally get access to in the Evernote client. I think the easiest way to fake this in the current Evernote client is to make a 1x1 table. This will give you a box and some margin and padding around your text. It'll look a lot like a block quote on a forum.
  5. It looks like in Yosemite and/or with the Evernote ScanSnap, it's possible to wind up with ENML that the original version of my script won't work on. I've updated the script to handle this situation. Specifically, the problem is that PDFs are saved to Evernote as "Unnamed File Attachment". It turns out that sometimes the filename is actually a string of invalid UTF-8 characters (0xCA 0xCA 0xCA 0xCA). For example: <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note><div><en-media type="application/pdf" style="cursor:pointer;" width="100%" height="1082" hash="0760b2f2fcb5c4ce81ccae342f754b8f"/>ÊÊÊÊÊ</div></en-note> Updated script reproduced below in case my link breaks for some reason: -- Join PDFs in multiple Evernote notes into a single PDF in a new note-- Author: John Christopher Jones <john.christopher@alumni.virginia.edu>-- Created: 2014-11-17-- Updated: 2014-12-11 -- write utf8 and strip non-ascii characters when extracting hash values-- inspired by-- http://applehelpwriter.com/2013/03/23/how-to-merge-pdf-files-in-os-x/-- We'll join note titles together using this string-- This isn't going to be a great title, but it'll be-- a good reminder of what's in the new note.set title_separator to " | "-- Create a temporary folder for the exported Evernote attachments-- Create an output filepath to write the joined pdf toset temp_folder to do shell script "mktemp -d -t evernote_pdf"set output_filepath to temp_folder & "/" & (do shell script "uuidgen") & ".pdf"-- XSLT used to extract hash values from en-media tags-- Crazy {} translation nonsense used to work around forum post scrubbersset xslt to "{?xml version='1.0'?}{xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:en='http://xml.evernote.com/pub/enml2.dtd'} {xsl:output method='text' omit-xml-declaration='yes' indent='no'/} {xsl:strip-space elements='*'/} {xsl:template match='en-media'} {xsl:value-of select='@hash'/} {xsl:text} {/xsl:text} {/xsl:template} {xsl:template match='text()|@*'}{/xsl:template}{/xsl:stylesheet}"set my text item delimiters to "{"set xslt to text items of xsltset my text item delimiters to "<"set xslt to xslt as textset my text item delimiters to "}"set xslt to text items of xsltset my text item delimiters to ">"set xslt to xslt as text-- Write XSLT to temporary locationset xslt_path to do shell script "mktemp -t evernote_enml"tell application "Finder" to write xslt to xslt_path-- Initialize some listsset hash_values to {}set pdf_list to {}set title_list to {}tell application "Evernote" -- Loop over every attachment in every note -- Note order follows the visible sort order in the OS X Desktop Client v5.7.2 set noteList to selection repeat with n in noteList set the end of title_list to title of n -- Write the ENML to a temporary file and extract the en-media hash values set enml_text to (ENML content of n) as text set enml_path to do shell script "mktemp -t evernote_enml" tell application "Finder" to write enml_text to enml_path -- Extract the hash values from the ENML temporary file using the XSLT set hash_values to paragraphs of (do shell script "cat " & (quoted form of enml_path) & " | strings | xsltproc --novalid " & (quoted form of xslt_path) & " - ") -- Delete the temporary ENML file do shell script "rm " & (quoted form of enml_path) -- Export each attachment in the order that it appears in the note repeat with hash_value in hash_values -- Get the attachment that has this hash set a to item 1 of (attachments of n whose hash is hash_value) -- Write the attachment to the temporary folder set pdf_path to temp_folder & "/" & (do shell script "uuidgen") & ".pdf" write a to pdf_path as «class utf8» -- Save the filepath for later set the end of pdf_list to pdf_path end repeat end repeat -- We'll join PDF filepaths so that they're single-quoted and space-delimited set my text item delimiters to "' '" -- Join PDFs do shell script (quoted form of "/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py") & " --output " & (quoted form of output_filepath) & " " & ("'" & (pdf_list as text) & "'") -- Create a new note with a title built from the titles of the selected notes set my text item delimiters to title_separator set new_note to create note from file output_filepath title (title_list as text) -- Open the newly created note in a new window so the user doesn't have to wonder -- where the thing is and if it was actually created. open note window with new_note -- Delete all of the remaining temporary files do shell script "rm -r " & quoted form of temp_folder do shell script "rm " & quoted form of xslt_pathend tell
  6. I totally respect that a lot of people expect a, more or less, RTF Wordpad/TextEdit-like experience with formatting. I can appreciate that using non-semantic tags like div can give you that most easily. However, I'm worried about third-party integration if my Evernote notes have less resemblance to standard semantic HTML. There are some really neat third-party applications that will probably start to break down if the semantic markup falls away. For example, I'm a huge fan of postach.io, which lets you blog directly from an Evernote notebook. I use postach.io for my blog, vorpal.club. Editors that convert markdown to Evernote notes might also have some trouble. For example, writers tend to like to get as far away from fonts and font sizes as possible, focusing on structure—words, emphasis, paragraphs, headings, etc. See, for example Byword (which publishes to Evernote), iA Writer, and nvAlt. (I've also gotta plug bordaigorl's excellent Sublime plugin for Evernote.) There's a huge market (at least among my followees) for these minimalist structural editors that I'd love to see Evernote embrace as a platform. My ideal would be if paragraphs automatically put a full empty line of margin between themselves (markup: <p>first para</p><p>second para</p>), but I could hit ⌥⏎ to insert a line return within a paragraph (markup: <p>first para<br/>new line</p>). This is very much how Microsoft Word works and close to what the resulting XML looks like, so it would boost compatibility with third party apps, including exporting/importing to Word, and give Evernote's editor some beautiful+fast editing oomph. I haven't used Word on Windows in years, but I'm pretty sure there's an equivalent "force newline" keyboard shortcut (probably ⇧⏎ or ⌃⏎?), which you could use on the Web client to get perfect editing parity. And, yeah, iOS and OS X are using very different stylesheets. To demonstrate, here's a public notebook with a copy of a note that I publish on Postach.io: https://www.evernote.com/pub/teluial/demo2 How I'd like the note to look is basically how appears on my blog. On the beta web client the spacing is much less cramped than it appears in the OS X client. This crampedness isn't really a change from 5.x to 6.x, but it's a rough platform difference.
  7. Since I posted that link back in January, I've taken to using this feature a lot. The problem is just getting the link out of Mail in a decent form. Once you've got the link you can throw it in Evernote, throw it in Things, TextEdit, or whatever, and it'll just magically work both in iOS and OS X. The message link should technically be a URN, but it's formatted as a URL. The format is message://<message-id>, with the angle brackets. However, to get consistent results the angle brackets need to be encoded (that's %3c and %3e). Anyhow, here's some AppleScript. I throw this into a Keyboard Maestro macro and use the hot key CMD+CTRL+C, which is a the same hotkey I use for my "copy file path" macro for Finder. tell application "Mail" set _sel to get selection set _links to {} repeat with _msg in _sel set _messageURL to "message://%3c" & _msg's message id & "%3e" set end of _links to _messageURL end repeat set AppleScript's text item delimiters to return set messageLinks to (_links as string) set the clipboard to messageLinks end tell
  8. I agree that Evernote has more important fish to fry, but they do place a lot of importance on PDF handling in Evernote. They do this to the extent that they added inline PDF annotation, and they did this despite having developer access to Yosemite and recognizing that Apple would add their own system-wide PDF annotation extension in Yosemite. Evernote wanted PDF annotation that would work across platforms. One of the killer Evernote Premium features is priority OCR, which, while useful for the occasional JPEG and photograph of a bookshelf, really gets most of its use in PDFs. So, something like this script might be a natural feature for them to add. So, I don't blame you for wanting to warn Evernote off of yet-more PDF features in lieu of at least the dozen things we've both pointed out or read about recently. That said, it really is kinda difficult to merge PDFs that are embedded in Evernote notes without something like this.
  9. I don't think there is a way to to get the dates directly. Unless someone else knows of a way you would probably need to make an applescript to do that. I only toyed with applescript with EN so I couldn't really make one for you. I actually wrote a script to import your Finder selection as individual Evernote notes and posted here a while back. It copies the file creation and modification timestamp from the original file and saves the original file path in the Source URL field.
  10. I totally agree about wanting a merge feature. Like JMichael, I don't like Evernote's way of merging notes very much. This is especially useful when using a ScanSnap with the occasional thick stack that has to be hand-fed because of low grade paper. You can easily wind up with several notes in Evernote that ought to contain a single multi-page PDF. So, I think I solved the problem on my blog. I wrote an AppleScript to join multiple PDFs across multiple notes into a single new note with a single PDF. This script will join PDFs in the order they appear in Evernote—by notes, and by attachments within notes. So, if you need to reverse the sort order of the notes or PDFs, you'll need to reverse the order in the Evernote. In case the link ever goes down, here's the script in full. -- Join PDFs in multiple Evernote notes into a single PDF in a new note-- Author: John Christopher Jones <john.christopher@alumni.virginia.edu>-- Created: 2014-11-17-- inspired by-- http://applehelpwriter.com/2013/03/23/how-to-merge-pdf-files-in-os-x/-- We'll join note titles together using this string-- This isn't going to be a great title, but it'll be-- a good reminder of what's in the new note.set title_separator to " | "-- Create a temporary folder for the exported Evernote attachments-- Create an output filepath to write the joined pdf toset temp_folder to do shell script "mktemp -d -t evernote_pdf"set output_filepath to temp_folder & "/" & (do shell script "uuidgen") & ".pdf"-- XSLT used to extract hash values from en-media tags-- Crazy {} translation nonsense used to work around forum post scrubbersset xslt to "{?xml version='1.0'?}{xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:en='http://xml.evernote.com/pub/enml2.dtd'} {xsl:output method='text' omit-xml-declaration='yes' indent='no'/} {xsl:strip-space elements='*'/} {xsl:template match='en-media'} {xsl:value-of select='@hash'/} {xsl:text} {/xsl:text} {/xsl:template} {xsl:template match='text()|@*'}{/xsl:template}{/xsl:stylesheet}"set my text item delimiters to "{"set xslt to text items of xsltset my text item delimiters to "<"set xslt to xslt as textset my text item delimiters to "}"set xslt to text items of xsltset my text item delimiters to ">"set xslt to xslt as text-- Write XSLT to temporary locationset xslt_path to do shell script "mktemp -t evernote_enml"tell application "Finder" to write xslt to xslt_path-- Initialize some listsset hash_values to {}set pdf_list to {}set title_list to {}tell application "Evernote" -- Loop over every attachment in every note -- Note order follows the visible sort order in Evernote OS X Desktop Client v5.7.2 set noteList to selection repeat with n in noteList set the end of title_list to title of n -- Write the ENML to a temporary file and extract the en-media hash values set enml_text to (ENML content of n) as text set enml_path to do shell script "mktemp -t evernote_enml" tell application "Finder" to write enml_text to enml_path -- Extract the hash values from the ENML temporary file using the XSLT set hash_values to paragraphs of (do shell script "xsltproc --novalid " & (quoted form of xslt_path) & " " & (quoted form of enml_path)) -- Delete the temporary ENML file do shell script "rm " & (quoted form of enml_path) -- Export each attachment in the order that it appears in the note repeat with hash_value in hash_values -- Get the attachment that has this hash set a to item 1 of (attachments of n whose hash is hash_value) -- Write the attachment to the temporary folder set pdf_path to temp_folder & "/" & (do shell script "uuidgen") & ".pdf" write a to pdf_path -- Save the filepath for later set the end of pdf_list to pdf_path end repeat end repeat -- We'll join PDF filepaths so that they're single-quoted and space-delimited set my text item delimiters to "' '" -- Join PDFs do shell script (quoted form of "/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py") & " --output " & (quoted form of output_filepath) & " " & ("'" & (pdf_list as text) & "'") -- Create a new note with a title constructed from the titles of the selected notes set my text item delimiters to title_separator set new_note to create note from file output_filepath title (title_list as text) -- Open the newly created note in a new window so the user doesn't have to wonder -- where the thing is and if it was actually created. open note window with new_note -- Delete all of the remaining temporary files do shell script "rm -r " & quoted form of temp_folder do shell script "rm " & quoted form of xslt_pathend tell
  11. I had the same reaction as Scott. This does sound odd, because it ought to work. However, for whatever reason, you may need to re-index. Let us know if that helps. You can manually trigger a re-import of just Evernote notes with the following command in Terminal: mdimport -r /Applications/Evernote.app/Contents/Library/Spotlight/EvernoteSpotlightImporter.mdimporter
  12. I found a page with some more information and a script for clipping Mail message URLs into Evernote. If anyone wants something more tailored to their needs I'll see what I can cook up.
  13. It seems like a pretty serious omission from the keyboard shortcuts. If you get a better answer I'll be very interested. The best method I've found so far is: CMD+Option+F to Search Notes Return to move focus to Notes listIf you don't modify the search results then the search will be populated with the search for your current set of notes, and the focus will be left on the same note. To go the other way, I have to do something similar to get into the note, because I can't stand hitting FN to hit the function keys. You can do this: CMD+F to Search This Note Escape to move focus to note body (really)Or, you can do this CMD+L to edit note title Tab to move to note body
  14. I really love the idea. I store code snippets in Evernote already, but they lose all formatting and syntax highlighting, and *sometimes* indentation. We know ENML can handle it since syntax highlighted code you clip from the web comes through with the same formatting. What might work as a patch is a web app based on the existing javascript syntax highlighting libraries out there. You could repurpose an existing app to clip to Evernote, or if somebody puts some real elbow grease into it, Evernote Cloud API could be used.
×
×
  • Create New...