Now that marked can handle opening files much better, the only problem to tackle is to transform the nvalt [[links]] to correct markdown [links](/Users/yseult/Documents/file.txt). This can be done with a super simple custom preprocessor. See the code below in ruby. The only smart thing going on here happens in line 19 which, as all regular expressions, is a bit difficult to read.
My plan is after all my plain text files are added into Drafts I can use a dedicated workspace for all my nvAlt notes. So the script Greg provided was modified to use the first full word of the .MD file name as a tag and tag the note nvalt as well.4
ffe2fad269