OPML
This may be getting a bit crazy, but I'd love to see an OPML or OO3 Outline previewed in Marked. It could use the same assumptions as multimarkdown composer in terms of headers and notes (though I would like to be able to specify a header level at which text becomes an unordered list).
If I'm currently working on an outline, my workflow to preview is open in MMComposer, export to MD, oz preview in Marked. A bit on the annoying side if I'm using OPML as my primary organizing tool.
Just a thought! Not sure if this is feasible.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 18 Apr, 2013 05:12 PM
You should be able to do this with a custom processor using the tools provided as part of the MultiMarkdown 3 package.
2 Posted by Teddy Svoronos on 18 Apr, 2013 05:18 PM
Interesting, tools like the OPML2MMD command, or am I thinking in the wrong direction?
Support Staff 3 Posted by Brett on 18 Apr, 2013 05:28 PM
Exactly like that. You'd need to have a custom processor that read the OPML and then passed it to MultiMarkdown itself, returning just the resulting HTML. The problem is going to be that the OPML extension will trigger a warning from Marked, so you'd probably have to rename the OPML files with a different (e.g. txt or md) extension. I'll work on a fix for that in the near future.
-Brett
4 Posted by Teddy Svoronos on 18 Apr, 2013 05:39 PM
Aha, so it's not sufficient o have the processor spit out MMD formatted text, since it then bypasses Marked's standard processor? Any way to specify a pre processor or something along those lines?
Thanks a ton for being so responsive Brett.
Support Staff 5 Posted by Brett on 18 Apr, 2013 06:08 PM
There is in the next incarnation of Marked, but not presently. A custom processor has to take input on STDIN and return HTML on STDOUT.
-Brett
6 Posted by tsvoronos on 09 Nov, 2014 08:01 PM
Hi Brett, I haven't actually given this a shot yet but I wanted to check to see if the kind of preprocessor that we discussed in this thread is now possible with marked? Still trying to get OPML to marked preview.
Support Staff 7 Posted by Brett on 09 Nov, 2014 08:13 PM
There's a preprocessor option in Marked 2 that can pass back Markdown for whatever processor (or custom processor) is selected to handle.
8 Posted by tsvoronos on 14 Nov, 2014 02:48 PM
Hi Brett,
Sorry to keep needling you about this, but I'm trying to use Fletcher's OPML2MMD perl script so that I can preview/export OPML files without having to first go to MMD Composer, exporting as MMD, then sending through Marked.
I have
/Users/tsvoronos/Library/Application\ Support/MultiMarkdown/bin/mmd2OPML.pl
as the preprocessor, but still getting the rich text fail dialog. Does this mean that it’s just not possible, or is there something wrong with how I’m specifying this?Any help would be great.
Teddy
Support Staff 9 Posted by Brett on 14 Nov, 2014 02:53 PM
Marked does a quick check based on file extension, and throws that error
if "opml" is detected. Would it be possible to use a different extension
on the files you're previewing? "opmlmd" or something? Or just "md"?
-Brett
10 Posted by tsvoronos on 14 Nov, 2014 03:06 PM
Bummer. Changing the file extension sort of defeats the purpose because then omnioutliner/mindnode say they can't open it anymore.
That said, even if I do that my strategy isn't working as it only produces the first few lines of the OPML file itself (not converted to MMD), which makes me think that my preprocessor is being specified wrong:
<?xml version=“1.0” encoding=“utf–8”?>
0,1,2,8,12,14,25,27,29,31,36,38,47,57,58,63,64,65,67,68,70,72
Support Staff 11 Posted by Brett on 14 Nov, 2014 03:19 PM
Yeah, your preprocessor is being bypassed, probably due to an error. Try
putting the script in /usr/local/bin/, making sure it's executable and
works from the command line with `cat filename.opml |
/usr/local/bin/opml2mmd`, and then drag the entire /usr/local/bin folder
to Marked to make sure it has permissions. Then try opening a renamed
OPML file in Marked and see what happens.
I'm happy to remove the extension name restriction in the next update,
but the only way around it right now is to change the extension.
-Brett
12 Posted by tsvoronos on 14 Nov, 2014 03:27 PM
Fantastic! Works like a charm. It was just a permissions error as you thought.
If you can remove that extension name restriction that would be fantastic, as that would let me write an outline in OmniOutliner and preview/export it in marked directly. Thanks a lot for your help Brett.