Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Notational Velocity and MarsEdit

edited November 2012 in MarsEdit
Most of my blog posts start as a markdown-formatted note in Notational Velocity. When I get them to the “almost done” stage I copy the text of the note and paste it into a new blog post in MarsEdit. Then I put on the finishing touches in MarsEdit and post to my blog from there.

Is there a simple way to automate the process of moving the post from Notational Velocity to MarsEdit? It’s a bit more than “select all; copy; switch; new post; paste” because I also want the title of the note to be the title of the post. I don’t know if it matters, but my NV notes are stored as individual text files in the Finder.



  • Hi - the key to automating this would be if Notational Velocity were sufficiently scriptable that you could e.g. write an AppleScript to take the title and contents of the selected note and package them up in a request to MarsEdit to create a new blog post from that info. In my cursory examination of NV (nvALT actually), I don't see the sufficient scripting support for e.g. asking for the "current note" or even enumerating over notes in the app.
  • Thanks for the reply. So how about working with the note from the Finder?

    Since I have my notes as individual text files, is there a way to write a script that would take a plain text file and send it to ME w/ the name of the file as the post title and the contents of the file as the post contents? Of course, then I would need a way to initiate the action from NV — but that shouldn’t be too hard because NV has a “show in Finder” menu command.

    Of course, I could just do it on my iPhone in SimpleNote or Notesy, but I was hoping for an OS X-based solution.
  • Accepted Answer
    Yes, you could automate something to streamline conversion of a text file in the Finder into a new post document in MarsEdit. Here's an example script that will create a new post in MarsEdit for each of the selected text files in the Finder:
  • Thanks!

    I added the following to take off the file extension:

    tell application "System Events" to tell disk item (thisItem as text) to set {postTitle, fileExtension} to {name, name extension}
    if fileExtension is not "" then set postTitle to text 1 thru -((count fileExtension) + 2) of postTitle

    log postTitle & tab & fileExtension

    I’m not much of a programer, I just found this code somewhere. Is there a better way to do it?

    Now I just need to find a way to initiate the action from within NValt (including selecting the note in the Finder).
  • Hi scribe - AppleScript is pretty limited for some basic programming stuff, so as far as I know something like what you've done to get the extnsion off is just about as good as anything. I'm not sure about getting the location of the note in the Finder from NValt. Unfortunately I couldn't find anything to correlate to the "selected item". But you might find my other app, FastScripts, useful for triggering the script from within NValt. It's free for up to 10 keyboard shortcuts:
Sign In or Register to comment.